VirtualBox

Opened 3 years ago

Last modified 3 years ago

#20302 new defect

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 (3)

comment:1 by jcb, 3 years ago

Status: newawaitsfeedback

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

comment:2 by jcb, 3 years ago

Status: awaitsfeedbacknew

comment:3 by Valery Ushakov, 3 years ago

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.

© 2023 Oracle
ContactPrivacy policyTerms of Use