Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
two NIC's, network stops working after a period of time
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
awesomescot
n00b
n00b


Joined: 02 Oct 2005
Posts: 15

PostPosted: Sun Oct 21, 2007 8:38 pm    Post subject: two NIC's, network stops working after a period of time Reply with quote

Here is what I'm trying to do. I have a Gentoo box with two NIC's. One conected to the internet with an IP. One connected to a LAN behind a hardware firewall/router. I want to have programs, such as samba, to run only on the LAN. And I want to run apache and sshd on both WAN and LAN.


Here's my problem. After boot both NIC's get an IP by DHCP. And the route table looks like this.
Code:

humus ~ # route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
208.106.105.0   0.0.0.0         255.255.255.0   U     1      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 eth0
0.0.0.0         208.106.105.1   0.0.0.0         UG    1      0        0 eth1


Then I edit the route table so that only 192.168.1.0-255 trafic goes to eth0.
Code:

humus ~ # route del -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.1
humus ~ # route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
208.106.105.0   0.0.0.0         255.255.255.0   U     1      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         208.106.105.1   0.0.0.0         UG    1      0        0 eth1

I'm not sure if this is right but it makes sence to me.

So at first I'm able to ssh in and access the http server, but after some amount of time it stops working. And the network stops working on the server. Ping doesn't respond and can'[/code]t access anything. It seems like anything that has to do with the network doesn't respond. I have to crtl-c to get out of 'ping google.com' or '/etc/init.d/net.eth1 restart', they don't respond.

Anybody know what's happening here?? Also if anyone has tips on iptables or route tables I would love to know.
Thanks
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Sun Oct 21, 2007 10:09 pm    Post subject: Reply with quote

The fact that the network script just hangs is indicative of a driver bug - does dmesg show anything interesting after the problem occurs?
Back to top
View user's profile Send private message
awesomescot
n00b
n00b


Joined: 02 Oct 2005
Posts: 15

PostPosted: Sun Oct 21, 2007 10:36 pm    Post subject: Reply with quote

I don't think it's a driver problem because when I unplug the LAN connection, the WAN connection it keeps working for days no prob. And I've switched which NIC is LAN and WAN, so I know they both work fine when only one has a connection. Right now I only have one NIC connected so it doesn't freeze, but next time I have it frozen I will try 'dmesg' and give you the output.

Any other ideas?
Back to top
View user's profile Send private message
awesomescot
n00b
n00b


Joined: 02 Oct 2005
Posts: 15

PostPosted: Sat Nov 03, 2007 11:08 pm    Post subject: Reply with quote

So I have changed my /etc/conf.d/net file to have this.

Code:

config_eth1=( "dhcp" )
config_eth0=( "dhcp" )
dhcp_eth0="release nodns nontp nonis nogateway"



Thinking this would help because there would only be one default gateway. But sadly I have the same results. Works great for a short period of time then everything having to do with the network stops working.

Help please
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum