Guest bridged adapter using Host MAC Address

Discussions related to using VirtualBox on Mac OS X hosts.

Guest bridged adapter using Host MAC Address

Postby Raef » 23. Jun 2012, 06:21

The bridged networking section of VirtualBox documentation gave me the impression that the bridged interface would be using a separate MAC address from the Host OS. When I ping a second computer on my LAN from the host then the guest, they're both using the Host's MAC Address.

If this is the expected behavior, is there anyway to get the guest adapter to use the MAC address I specified in the VB network settings?

Thanks,
Raef
Raef
 
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Postby BillG » 23. Jun 2012, 09:29

Traffic to and from the vm should indeed use its own MAC address, not the host's. The bridge filter driver should separate the traffic at the hardware layer and the traffic for the vm should never reach the host's IP stack.

What tool are you using to determine the MAC address used?
Bill
BillG
Volunteer
 
Posts: 4169
Joined: 19. Sep 2009, 04:44
Location: Sydney, Australia
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 7,8,Server

Re: Guest bridged adapter using Host MAC Address

Postby mpack » 23. Jun 2012, 11:23

Raef wrote:When I ping a second computer on my LAN from the host then the guest, they're both using the Host's MAC Address.

That says you are using NAT, not bridged.
mpack
Site Moderator
 
Posts: 29718
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Guest bridged adapter using Host MAC Address

Postby Raef » 23. Jun 2012, 14:17

BillG wrote:Traffic to and from the vm should indeed use its own MAC address, not the host's. The bridge filter driver should separate the traffic at the hardware layer and the traffic for the vm should never reach the host's IP stack.

What tool are you using to determine the MAC address used?


I'm using wireshark and just checking the machine's arp cache.
Raef
 
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Postby Raef » 23. Jun 2012, 14:19

mpack wrote:
Raef wrote:When I ping a second computer on my LAN from the host then the guest, they're both using the Host's MAC Address.

That says you are using NAT, not bridged.


The only adapter I have setup with this VM is bridged and not NAT'd.
Raef
 
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Postby Martin » 23. Jun 2012, 15:22

Are you using WLAN or a wired ethernet adapter?
Martin
Volunteer
 
Posts: 2226
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Linux, OS/2

Re: Guest bridged adapter using Host MAC Address

Postby Raef » 23. Jun 2012, 15:28

Martin wrote:Are you using WLAN or a wired ethernet adapter?


I'm using the built-in wireless adapter on a macbook air. The guest VM's adapter is setup as a cable connected, bridged adapter.
Raef
 
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Postby Perryg » 23. Jun 2012, 15:33

Post the results of VBoxManage showvminfo <VM Name> --details & VBoxManage list bridgedifs
As well as the guests log file (as an attachment)
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Guest bridged adapter using Host MAC Address

Postby Raef » 23. Jun 2012, 16:25

Perryg wrote:Post the results of VBoxManage showvminfo <VM Name> --details & VBoxManage list bridgedifs
As well as the guests log file (as an attachment)


Thanks everyone who has replied for the assistance.

showvminfo:
Code: Select all   Expand viewCollapse view
Name:            Linux
Guest OS:        Oracle (64 bit)
UUID:            585207a7-5c24-4285-a7be-22b85332db95
Config file:     /Users/user/VirtualBox VMs/Linux/Linux.vbox
Snapshot folder: /Users/user/VirtualBox VMs/Linux/Snapshots
Log folder:      /Users/user/VirtualBox VMs/Linux/Logs
Hardware UUID:   585207a7-5c24-4285-a7be-22b85332db95
Memory size:     512MB
Page Fusion:     off
VRAM size:       64MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
PAE:             on
Time offset:     0 ms
RTC:             UTC
Hardw. virt.ext: on
Hardw. virt.ext exclusive: off
Nested Paging:   on
Large Pages:     on
VT-x VPID:       on
State:           powered off (since 2012-06-23T12:40:06.000000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Storage Controller Name (0):            IDE Controller
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            SATA Controller
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      1
Storage Controller Bootable (1):        on
IDE Controller (0, 0): Empty
IDE Controller (1, 0): Empty
SATA Controller (0, 0): /Users/user/VirtualBox VMs/Linux/Linux.vdi (UUID: cf76199a-f7fa-4c21-96ed-1d3b7f763e67)
NIC 1:           MAC: 080027B73BAC, Attachment: Bridged Interface 'en0: Wi-Fi (AirPort)', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: allow-all
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
Audio:           enabled (Driver: CoreAudio, Controller: AC97)
Clipboard Mode:  Bidirectional
VRDE:            disabled
USB:             enabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Shared folders: 

Name: 'user', Host path: '/Users/user' (machine mapping), writable

VRDE Connection:    not active
Clients so far:     0

Guest:

Configured memory balloon size:      0 MB
OS type:                             Oracle_64
Additions run level:                 0
Additions version:                   4.1.12


Guest Facilities:

No active facilities.


bridgedifs:
Code: Select all   Expand viewCollapse view
Name:            en0: Wi-Fi (AirPort)
GUID:            00306e65-0000-4000-8000-1040f3837cd2
Dhcp:            Disabled
IPAddress:       192.168.1.108
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 10:40:f3:83:7c:d2
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-en0: Wi-Fi (AirPort)

Name:            p2p0
GUID:            30703270-0000-4000-8000-0240f3837cd2
Dhcp:            Disabled
IPAddress:       0.0.0.0
NetworkMask:     0.0.0.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 02:40:f3:83:7c:d2
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-p2p0
Attachments
VBox.log
(79.53 KiB) Downloaded 46 times
Raef
 
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Postby Perryg » 23. Jun 2012, 16:53

Code: Select all   Expand viewCollapse view
Promisc Policy: allow-all

Did you set this to be enabled yourself? Set it to deny and see what happens.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Guest bridged adapter using Host MAC Address

Postby Raef » 23. Jun 2012, 17:29

Perryg wrote:
Code: Select all   Expand viewCollapse view
Promisc Policy: allow-all

Did you set this to be enabled yourself? Set it to deny and see what happens.


Yes. I set it to deny and still no love. The guest is still coming up with the host's MAC address in network traffic.
Are there any other settings that might impact this configuration?

Does anyone have a Mac OS X host, bridged interface guest setup where the MAC is correctly distinct?
Raef
 
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Postby Martin » 23. Jun 2012, 20:54

The concept of promiscous mode is not really defined for WLAN. There are many adapters which don't support it.
If I remember correctly Vbox detects this and implemented some kind of "trick" to get it to work, but in this case all packets will contain the hosts MAC address.
Martin
Volunteer
 
Posts: 2226
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Linux, OS/2

Re: Guest bridged adapter using Host MAC Address

Postby Raef » 23. Jun 2012, 22:17

Martin wrote:The concept of promiscous mode is not really defined for WLAN. There are many adapters which don't support it.
If I remember correctly Vbox detects this and implemented some kind of "trick" to get it to work, but in this case all packets will contain the hosts MAC address.


Thanks Martin. Do you have any idea why I am experiencing the same behavior when I deny promiscuous mode on that interface?
Raef
 
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Postby Martin » 23. Jun 2012, 22:54

I'm not sure, but I guess that the setting doesn't matter because Vbox was already using the "workaround" for the not working promiscous mode.
Martin
Volunteer
 
Posts: 2226
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Linux, OS/2

Re: Guest bridged adapter using Host MAC Address

Postby Bluehawk » 9. Sep 2012, 13:56

I'm noticing the same problem. I've been trying to create some firewall rules on the router to block access to the VM under certain conditions however i'm unable to set the VM to a local static IP address in the router because the VM & Host share the same MAC address. So when the Host boots up it is assigned the static IP because they share the same MAC address. Any known workarounds to get the VM to have a unique MAC address?

Using a :
Win 7 Host
D-Link Wireless Adapter (USB)
Ubuntu 12.04 Guest
Bridged Networking Setup
MAC address in VM settings is set to a unique MAC (different from Host)
Bluehawk
 
Posts: 2
Joined: 9. Dec 2010, 13:42
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 9.10; Windows XP

Next

Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: No registered users and 12 guests