LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-09-2004, 11:56 PM   #1
Wolfy
Member
 
Registered: Jun 2004
Location: WA
Distribution: Slackware 11 Kernel 2.6.20.7-SMP
Posts: 144

Rep: Reputation: 15
Angry Second NIC upsets IP connection


Okay, whats happening is as soon as I activate the second NIC card all connectivity is lost.
I believe it to be the second NIC is not properly configured.

Now for me to understand exactly what I'm doing I would like someone to correct my logic if it is wrong.
First, eth0 must connect to cable modem with approved MAC address.
(note: it does this successfully)
Second, eth1 must be the middle man between the network hub and the Internet.
Now here in lies the problem.
I am assuming that eth1 must have a certain amount of set values to be able to do this.
I have researched this and assigned the following:
subnet-198.162.1.0
netmask-255.255.255.0
range-192.168.1.201 192.168.1.220
default-lease-time 86400;
max-lease-time 86400;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.1.100;
option nntp-server 192.168.1.100;
With this in mind when I activate the second NIC everything goes dead as far as the Internet.
I have added route 255.255.255.255 for broadcast.
After configuration and reboot have tried [pgrep dhcpd] but don't receive any numbers.
To me it's obvious that something is not configured correctly, namely eth1.
And also perhaps trying to be a DHCP server and a router somehow don't mix well.
I have enabled IP packet routing in addition to installing DHCP server prior to this.
I am sure this is a configuration issue but I am at a loss.


Would someone please shed a little light on this for me.
 
Old 07-10-2004, 04:52 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
I'm not sure why you're adding a route for 255.255.255.255, that makes no sense. Otherwise, your problem sounds like in your config file for eth1 you have specified a default gateway (you should only have ONE default gateway per machine, not one per NIC).

do a netstat -nr with only eth0 up, then do the same after you up eth1. That will show the problem (post the output here).
 
Old 07-10-2004, 11:59 AM   #3
Wolfy
Member
 
Registered: Jun 2004
Location: WA
Distribution: Slackware 11 Kernel 2.6.20.7-SMP
Posts: 144

Original Poster
Rep: Reputation: 15
As requested here is the output of netstat after activating eth0:

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
67.171.8.0 0.0.0.0 255.255.248.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 67.171.8.1 0.0.0.0 UG 0 0 0 eth0

Then here is the output of netstat after activating eth1:

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
67.171.8.0 0.0.0.0 255.255.248.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1

I see that gateway for eth1 is different than that of eth0.
I could change eth1 to the same gateway as eth0 but I wonder if this gateway will change because eth0 receives all information from cable modem (Provider). Also I see that the netmask is different and again I can change that too.

So what do you think?
 
Old 07-12-2004, 11:54 AM   #4
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
Looks like you have a default gateway problem, as chort suggested. The correct default route through eth0 was probably assigned by your ISP, and the eth1 default route is probably somewhere in your startup scripts. Go through your /etc/rc.d startup scripts (sorry I cant tell you which one, since I dont use Debian) and remove the default gateway option for eth1. With both NICs enabled, you should only see one default route with the interface set to eth0.

It is fine that the eth0 and eth1 subnet masks are different.

After doing that, Internet connecivity should work for this machine, but I dont think it will work yet for the hosts on the 192.168 network. You didnt mention anything about setting up NAT, so if you have not done that, then the hosts on your second subnet will not be able to get to the Internet, because the 192.168 network is not an Internet routable network.

You can Google for "iptables nat setup" and there are a bunch of sites that have tutorials on how to set up NAT with iptables.
 
Old 07-12-2004, 08:58 PM   #5
Wolfy
Member
 
Registered: Jun 2004
Location: WA
Distribution: Slackware 11 Kernel 2.6.20.7-SMP
Posts: 144

Original Poster
Rep: Reputation: 15
What does NAT stand for and what does it do? I'm trying to learn how things work, so I can better diagnose my own problems.
 
Old 07-12-2004, 11:21 PM   #6
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
NAT is Network Address Translation. The 192.168.x.x networks are private networks. This means that they are not routable on the internet. You and I can both have the same networks in our own homes, but we cannot talk to each other through the Interner. So you need NAT. What NAT does is makes it appear as though you are coming from an Internet routable address. The IP address you get on eth0 is your Internet routable address. When you NAT your private network, all the traffic looks as though it is coming from the eth0 address.
 
Old 07-13-2004, 07:24 PM   #7
Wolfy
Member
 
Registered: Jun 2004
Location: WA
Distribution: Slackware 11 Kernel 2.6.20.7-SMP
Posts: 144

Original Poster
Rep: Reputation: 15
I've reinstalled FC2 and disabled services the I thought weren't needed. Things like ISDN, since I have cable Internet. Something went horribly wrong though.

With 2 NIC's in the machine at reinstall making one obtain IP via DHCP and the other static to 192.168.1.3 with mask at 255.255.255.0.
After the initial install and removal of services, eth0 not detected and unable to obtain IP from cable provider when trying to activate. Under Network configuration the device is listed as eth0 and named correctly.

What happened?
Maybe I turned off services that were needed?
I disable kudzo also because that was an issue on a previous install.

Any Idea's???
 
Old 07-14-2004, 07:24 AM   #8
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
I believe you need kudzu.

Quote:
Kudzu is the Red Hat Linux hardware probing library, and the associated configuration program. The probing library is used by various system utilities, such as anaconda, Xconfigurator, and hwbrowser. The tool runs at system boot time to determine what hardware has been added or removed from the system.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
NIC need to be reconfigured @ every boot up (by New Connection) RayY Linux - Networking 1 01-06-2005 04:16 PM
wireless card + nic = no connection miyagi Linux - Wireless Networking 3 08-26-2004 07:11 PM
GIMP freefont install upsets KDE fonts andrew_k Mandriva 0 05-31-2004 07:28 PM
Slackware 9.1 Xircom NIC Loses Connection tarpat1 Linux - Networking 0 10-02-2003 08:06 AM
NIC Detection, for Connection sharing Primetime Linux - Networking 3 01-06-2003 09:30 AM

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

All times are GMT -5. The time now is 03:56 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration