VirtualBox

Ticket #20302 (new defect)

Opened 20 months ago

Last modified 20 months ago

Client ID prevails over MAC based mapping with the NAT Network DHCP server

Reported by: jcb Owned by:
Component: network/NAT Version: VirtualBox 6.1.18
Keywords: DHCP, ClientID, HDCP option 61, DHCPd Cc:
Guest type: Linux Host type: Linux

Description

I've got two Ubuntu (though what matters here is Systemd-Network) guest VMs connected to a NAT Service network with the DHCP service enabled. I have added a static mapping between the guests NIC MAC addresses and their assigned IPs. The NatNetwork-Dhcpd.config file shows what I mean:

<Config MACAddress="08:00:27:00:00:01" name="59c98231-ac44-4e62-8bfe-1bd937c3fff1/0" fixedAddress="192.168.40.101"/>

<Config MACAddress="08:00:27:00:00:02" name="824e3a1b-2542-454d-bfee-c8aad2ad1c90/0" fixedAddress="192.168.40.102"/>

The same information is reflected in VirtualBox.xml (the global config file) though when using VBoxManage to set up the mapping I did use the first NIC of each guest to set the mapping hence the /0 after the guest VM UUID:

<Config MACAddress="08:00:27:00:00:01" name="59c98231-ac44-4e62-8bfe-1bd937c3fff1/0" fixedAddress="192.168.40.101"/>

<Config MACAddress="08:00:27:00:00:02" name="824e3a1b-2542-454d-bfee-c8aad2ad1c90/0" fixedAddress="192.168.40.102"/>

Now it comes the twist: DHCP Client ID in machines running Systemd-Network use /etc/machine-id to construct it but both machines have the same contents (due to cloning, you know) in this file hence the Client ID sent to the DHCP is always the same (as seen in NatService-Dhcpd.log)... and the dhcp server in the Nat Service returns the same IP address for both guests.

Is it a bug, a feature or just RFC compliance? Thanks in advance.

Change History

comment:1 Changed 20 months ago by jcb

  • Status changed from new to awaitsfeedback

I meant "DHCP option 61" (Client-identifier) in the ticket keywords.

comment:2 Changed 20 months ago by jcb

  • Status changed from awaitsfeedback to new

comment:3 Changed 20 months ago by vushakov

It looks like there are gaps in inconsistencies in the way DHCP server handles client id, but regardless of what the code actually does currently the question is what it should do.

I'd say that client-id takes precedence b/c that's clearly the intent behind it - to provide an identity that is independent of the hardware.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use