Two IPs on one NIC

Simon Hobson dhcp1 at
Wed Sep 16 18:43:25 UTC 2009

Jeff Haran wrote:

>Just an FYI, I was able to run two dhcpcd client instances on the 
>same linux machine (custom Brocade hardware platform) to accomplish 
>this. Each client instance had to be passed a unique client ID on 
>it's command line and likewise one was started up to service an 
>interface name while the other was started up to service an 
>interface alias, e.g. eth0 and eth0:0. The only other things that I 
>can recall were to make sure each client instance locate it's data 
>files in a separate directory, but that was just a command line 
>option in the script that started them, and to modify the way the 
>client generated it's XID so that each XID was unique. The 
>unmodified dhcpcd client code generated it's XID using a hash of the 
>MAC address and time(), which meant that each client generated the 
>same XID which confused the servers big time. I just added the pid 
>of the client process to what got hashed to make sure each client 
>got it's own XID.

Right, so you generated client-ids that would ensure churn by 
changing one every boot - thus appearing to be a different client to 
the server.

And you did nothing to deal with the ambiguities of routing ? One 
client gets router A, the other gets router B - what is your default 
route now ? You lose one of the leases for some reason, now what is 
your default route and how does it get set properly ?

Similarly DNS servers - if you lose one lease, that could potentially 
mean you lose access to the DNS servers configured.

As I suggested, there are a lot of combinations of sequences to 
consider, and a lot of potential conflicts. Far from trivial - though 
many of them also apply if you use DHCP client on two separate 

Simon Hobson

Visit for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

More information about the dhcp-users mailing list