LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-22-2008, 07:54 AM   #1
geraldomanaus
Member
 
Registered: Nov 2002
Location: Amazonas/Brasil (Rain Forest)
Distribution: GNU/Slackware
Posts: 43

Rep: Reputation: 15
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.
 
Old 04-22-2008, 09:56 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
 
Old 04-23-2008, 09:25 AM   #3
geraldomanaus
Member
 
Registered: Nov 2002
Location: Amazonas/Brasil (Rain Forest)
Distribution: GNU/Slackware
Posts: 43

Original Poster
Rep: Reputation: 15
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?
 
Old 04-23-2008, 03:00 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
eth0, eth1, dhcp, slackware 11 problem q3noob Slackware 5 07-31-2007 09:26 AM
Dhcp eth0 and XP eth1 internet sharing props666999 Slackware 8 08-20-2005 09:48 AM
Firewall WAN eth0 LAN eth1 self-bridges, eth0 does all routeing. Nichole_knc Linux - Networking 5 07-29-2004 02:33 PM
Internal Routing eth1 to eth0 Dataforce Linux - Networking 3 04-02-2004 09:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration