DHCPD with more than 2 NICs

vodka7 used Ask the Experts™
The Setup I have right now is:  Cable modem connected to eth0 (set to dhcp), eth1 connected to the upstairs hub, eth2 connected to the downstairs hub.  With the GUI Internet Sharing I can only enable one of the interfaces, either eth1 or 2... if I try to enable both, one after the other, they both have the same IP  I've tried doing it manually by editing ifcfg-eth1 and 2 so they have different IPs, and editing dhcpd.conf so there is an entry for eth2 (set it to and edited the shorewall interfaces,zones etc... but still only eth1 works and the other is down, both interfaces are up with valid private addresses, but the computers on the LAN are unable to grab addresses... The computers that can get addresses (from eth1) can ping (eth2)and use the net normally..  Can somebody please tell me how to properly setup Internet Sharing with more than 2 NICs?  I'm using Mandrake 2.4.19 Kernel
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2006

I'm a sad git - I tend to only use the command line ;)

First - Just check that your ethernet addresses aren't eth0 and eth1? They should automatically start at eth0!

So - bin the GUI :), and let's try doing this manually!

ifconfig eth0 up address netmask
ifconfig eth1 up     #Without parameters it uses the defaults in the config files

ifconfig eth0 down   #Shuts down eth0

ifconfig             #Without anything gives you the interface status..and should tell you whether eth2 really does exist?...and not eth0?
Top Expert 2006

Sorry - should have read the question - oops - 3 interfaces! Anyway - you get the idea about doing it from the command line as above:)

dhcpd, on the command line, takes a list of interfaces on which it will respond to dhcp queries. Check that this includes eth2.

In /etc/dhcpd.conf, check that there is a subnet declaration for
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.


Yup, checked dhcpd.conf... didn't see any declarations for eth1 or 2... just a subnet declartion for and the address range to assign... so I simply copied what was there and changed the addresses to Is there anyway to bind the dhcp declarations to the specific eth interface in dhcpd.conf?  Or can I just subnet to both eth1 and 2?

i would say that the ip for eth1 should be and eth2 should be - then you just set up under "servers" in the DHSP. conf file both of those ip's


Commented: is the network address though and is the gateway right?  Can u give me an example of a dhcpd.conf with a servers section? the man page for dhcpd and the examples are sorely lacking... Or can I run 2 instances of dhcpd and bind them to each interface?
I would think that eth1 as,
then eth2 as
set 2 subnets of and
set subnet mask to and set ranges as you want.
the clients on the subnet should use as their gateway, and
the clients should use as their gateway.
You may find it easier to setup with webmin if you have it installed.
https://(serverIP):10000 where serverIP is the IP address of your internet server.(or if you run it locally).
alternatively,if you are running the server for internet routing only, try downloading the clarkconnect ISO from www.clarkconnect.com/dowmload/1.2.html.
it is a very capable ICS router and firewall,based on redhat, and has multiple ethernet card options.
Warning:Itwill wipe your hard drive as part of the install.
I use it on a couple of sites running on p133 pcs


Thanks, configured dhcpd in sysconfig/network-scripts to read INTERFACES="eth1 eth2" it works, now I have a different problem...DNS... how can I set DNS in /etc/dhcpd.conf   option domain-name-servers for eth1 and eth2 to dynamic (that is, grab whatever IP the DNS server on eth0 is set to...because eth0 is set to dhcp from my ISP)


AND, I can't seem to communicate between interfaces...like computers located on eth1 cannot communicate with computers on eth2... do I need to setup a route between the two?
i have suse 7.3 pro, but here is what i have:


line 11 aprox. should be
DHCP_INTERFACE="eth1, eth2"

if that doesn't work try this as well:

line 5 aprox. should be
option domain-name-servers,;

if still not working, remove the comma's

oops - the first one should be /etc/rc.config.d/dhcp.rc.config , but mandrake may be different
you need to set up a caching only dns server on eth0, and set the default dns on the other subnetworks' client options to eth0' address.
also, if you want the 2 subnets to communicate, you need to set up a route .
you may also want to change the subnet mask to
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial