LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Eth0 using DHCP and eth1 using static ip: eth0 receive internal ip not the router ip (http://www.linuxquestions.org/questions/linux-networking-3/eth0-using-dhcp-and-eth1-using-static-ip-eth0-receive-internal-ip-not-the-router-ip-637019/)

geraldomanaus 04-22-2008 08:54 AM

Eth0 using DHCP and eth1 using static ip: eth0 receive internal ip not the router ip
 
Hello all,

I have two nics: eth0 connected to a modem/router and another connected in the internal lan (with static ip). In the lan we have a Dhcp server for the local machines but the problem is the eth0 is receiving the ip from the internal dhcp server not the router, why could this occurring? Im using Slackware 12 and UDEV to set the nics.
Thanks to all.

theNbomr 04-22-2008 10:56 AM

Your configuration is probably quite common; I use the very same arrangement myself. Here are the config files I use for each NIC.
Code:

# more /etc/sysconfig/network-scripts/ifcfg-eth0

# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
HWADDR=00:40:f4:84:01:8a
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet

# more /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.0.122
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
BOOTPROTO=none
HWADDR=00:60:67:3b:01:2a
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet

Note the 'BOOTPROTO' records in particular. I have two identical NICs in this installation, and the 'HWADDR' records seem to make the drivers consistently associate with the correct NIC. If your NICs are of different make/model, you may not need those records in you config files. You will, of course, need to substitute appropriate local values for your installation.

--- rod.

geraldomanaus 04-23-2008 10:25 AM

Hello all,
Thanks theNbomr. I have one nic Sis900 onboard and Realtek 8139 offboard. Could be a problem with the software DHCPCD? Or could be a problem with an onboard nic, because a time ago I had some problems in another situation. Every time the onboard nic was activated It had to be eth0. What could be occurring?

theNbomr 04-23-2008 04:00 PM

Your DHCP server may be misconfigured. If it is serving addresses to clients on the WAN side, then that is probably not what you want.
With respect to your dual NIC configuration: in general the name of the config script mus match its content, as well as the alias named in the driver configuration file, modprobe.conf. There may be other requirements.
--- rod.


All times are GMT -5. The time now is 07:26 PM.