DHCPD with more than 2 NICs

vodka7
vodka7 used Ask the Experts™
on
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 192.168.1.1...  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 192.168.2.1)... 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 192.168.2.1 (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
Comment
Watch Question

Do more with

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

Commented:
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 192.168.0.2 netmask 255.255.255.0
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

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

Commented:
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 192.168.2.0
CompTIA Cloud+

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

Author

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

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

Author

Commented:
192.168.1.0 is the network address though and 192.168.1.1 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 192.168.1.1,
then eth2 as 192.168.2.1
set 2 subnets of 192.168.1.0 and 192.168.2.0
set subnet mask to 255.255.255.0 and set ranges as you want.
the clients on the 192.168.1.0 subnet should use 192.168.1.1 as their gateway, and
the 192.168.2.0 clients should use 192.168.2.1 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 127.0.0.1 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

Author

Commented:
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)

Author

Commented:
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?
Commented:
i have suse 7.3 pro, but here is what i have:

/etc/

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

if that doesn't work try this as well:

/etc/dhcpd.conf
line 5 aprox. should be
option domain-name-servers 192.168.1.0, 192.168.1.1;

if still not working, remove the comma's

Commented:
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 255.255.0.0
vodka7:
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 
EXPERTS:
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