Page 1 of 2

Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 06:21
by Raef
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

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 09:29
by BillG
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?

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 11:23
by mpack
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.

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 14:17
by Raef
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.

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 14:19
by Raef
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.

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 15:22
by Martin
Are you using WLAN or a wired ethernet adapter?

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 15:28
by Raef
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.

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 15:33
by Perryg
Post the results of VBoxManage showvminfo <VM Name> --details & VBoxManage list bridgedifs
As well as the guests log file (as an attachment)

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 16:25
by Raef
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

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

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

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 16:53
by Perryg

Code: Select all

Promisc Policy: allow-all
Did you set this to be enabled yourself? Set it to deny and see what happens.

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 17:29
by Raef
Perryg wrote:

Code: Select all

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?

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 20:54
by Martin
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.

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 22:17
by Raef
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?

Re: Guest bridged adapter using Host MAC Address

Posted: 23. Jun 2012, 22:54
by Martin
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.

Re: Guest bridged adapter using Host MAC Address

Posted: 9. Sep 2012, 13:56
by Bluehawk
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)