Guest bridged adapter using Host MAC Address

Discussions related to using VirtualBox on Mac OS X hosts.
Raef
Posts: 7
Joined: 23. Jun 2012, 06:16

Guest bridged adapter using Host MAC Address

Post 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
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Guest bridged adapter using Host MAC Address

Post 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?
Bill
mpack
Site Moderator
Posts: 39156
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

Post 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.
Raef
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Post 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.
Raef
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Post 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.
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Guest bridged adapter using Host MAC Address

Post by Martin »

Are you using WLAN or a wired ethernet adapter?
Raef
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Post 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.
Perryg
Site Moderator
Posts: 34369
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

Post by Perryg »

Post the results of VBoxManage showvminfo <VM Name> --details & VBoxManage list bridgedifs
As well as the guests log file (as an attachment)
Raef
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Post 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
Attachments
VBox.log
(79.53 KiB) Downloaded 58 times
Perryg
Site Moderator
Posts: 34369
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

Post 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.
Raef
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Post 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?
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Guest bridged adapter using Host MAC Address

Post 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.
Raef
Posts: 7
Joined: 23. Jun 2012, 06:16

Re: Guest bridged adapter using Host MAC Address

Post 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?
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Guest bridged adapter using Host MAC Address

Post 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.
Bluehawk
Posts: 2
Joined: 9. Dec 2010, 13:42
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 9.10; Windows XP

Re: Guest bridged adapter using Host MAC Address

Post 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)
Post Reply