Eth0 using DHCP and eth1 using static ip: eth0 receive internal ip not the router ip
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.