Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHCP and multiple network cards

Status
Not open for further replies.

Hobbes

MIS
May 11, 1999
53
US
I have a question regarding DHCP and the use of multiple network cards in one system. The boss wants to use a docking station on occasion with his laptop, and it serves up its own MAC ID. How do I alter dhcpd.conf to allow the system to grab an address, regardless of which card it sees? Do I just add a second "hardware ethernet xx:xx:xx: xx:xx:xx" to the host, or do I need to do something else?

Thanks in advance for your help,
Hobbes

"Order is for idiots, genius can handle chaos"
 
Hi,











If you have something like the following in your /etc/dhcpd.conf :











subnet 192.168.1.0 netmask 255.255.255.0 {





range 192.168.1.1 192.168.1.50;




option routers 192.168.1.5;





option subnet-mask 255.255.255.0;





option broadcast-address 192.168.1.255;





option domain-name-servers 192.168.1.10;





default-lease-time 21600;





max-lease-time 43200;





}

















Then any dhcp client that contacts the server should get an address from the pool defined. So, if the laptop's network adapter is configured for dhcp then it should get a lease as for any conventional network adapter. You can, of course, have your dhcpd.conf arranged to give out specific IP addresses to certain mac addresses - e.g. for security purposes or so that you retain central control but can effectively give people static IP addresses. If you have it setup that way then, yes, you would just add another entry to /etc/dhcpd.conf associating the MAC address of the notebook adapter with a specific reserved lease. For example :







host notebook {



        hardware ethernet 00:00:88:88:aa:aa;



        fixed-address 192.168.0.2;



}








Hope this helps


 
Thanks...
But I'm a bit unclear...
Would I create a new entry from scratch, or simply add the new mac id into the existing entry for the system? And if it's a new entry, can I name it anything?

Basically, would it be:
host notebook {
hardware ethernet 00:00:88:88:aa:aa;
fixed-address 192.168.0.2;
}

host notebook-docked {
hardware ethernet 00:00:88:88:aa:bb;
fixed-address 192.168.0.2;
}

or

host notebook {
hardware ethernet 00:00:88:88:aa:aa;
hardware ethernet 00:00:88:88:aa:bb;
fixed-address 192.168.0.2;
}

Thanks again,
Hobbes





 
Hi,

Hmmmm. I see more what you mean now. I'm not certain on this but I think it would be the two separate blocks. However, is it vital to allocate the same IP address to both cards ? That seems like asking for trouble to me because you would no doubt end up with the server having an active lease in dhcpd.leases for that IP from the first used adapter. Presumably dhcpd would not allocate another indentical lease even if the MAC address was specifically given. I think you really have to use two different IP addresses here (or get the dhcp client to release the lease at every closedown).

Regards
 
Hi

Forgot to add.. the obvious thing might just be to use a static IP configuration for the notebook - that should work if you use reserved leases.

Regards
 
There's some good info in the pcmcia howto.
Seems to me that the network.opts scheme effectively
allows for this type of scenario without dhcp server
tweaking.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top