View previous topic :: View next topic |
Author |
Message |
magowiz Veteran
Joined: 17 Feb 2005 Posts: 1029 Location: Italy/Milan/Bresso
|
Posted: Tue Oct 20, 2009 4:30 pm Post subject: eth0 lost default gateway |
|
|
Hi,
I'm having the following problem : If I launch amule, after some time I get the whole connection unusable: for example I cannot ping www.google.it neither using directly its ip (so it isn't a resolving issue). I thought it was a buffer problem but also if I close amule and wait some minutes I get nothing, after the ping command I get no output at all (but ping keeps running). So I tried to run ifconfig to check it's all right and I have an output similar to other pc that works. So I tried to have a look to route table :
Code: |
#route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.240 U 0 0 0 eth0
2.1.21.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default * 0.0.0.0 U 0 0 0 eth0
|
it seems somehow I lost default gateway that should be 2.1.21.1 , infact if I do :
Code: | #route add default gw 2.1.21.1 eth0
#ping www.google.it
PING google.navigation.opendns.com (208.67.217.230) 56(84) bytes of data.
64 bytes from google.navigation.opendns.com (208.67.217.230): icmp_seq=1 ttl=50 time=100 ms
64 bytes from google.navigation.opendns.com (208.67.217.230): icmp_seq=2 ttl=50 time=100 ms
64 bytes from google.navigation.opendns.com (208.67.217.230): icmp_seq=3 ttl=50 time=100 ms
64 bytes from google.navigation.opendns.com (208.67.217.230): icmp_seq=4 ttl=50 time=100 ms
64 bytes from google.navigation.opendns.com (208.67.217.230): icmp_seq=5 ttl=50 time=100 ms
64 bytes from google.navigation.opendns.com (208.67.217.230): icmp_seq=6 ttl=50 time=100 ms
64 bytes from google.navigation.opendns.com (208.67.217.230): icmp_seq=7 ttl=50 time=100 ms
|
Mine network configuration is :
Code: |
config_eth0=("dhcp"
"192.168.1.2 netmask 255.255.255.240 broadcast 192.168.1.255"
)
dhcp_eth0="release nodns"
routes_eth0=("default")
|
What should it be ?
Obviously also if I restart net.eth0 service I get back connection. |
|
Back to top |
|
|
Helena Veteran
Joined: 02 Apr 2003 Posts: 1114 Location: Den Dolder, The Netherlands
|
Posted: Tue Oct 20, 2009 6:09 pm Post subject: |
|
|
what a strange network configuration...
why don't you use a simple blank configuration - since you seem to use DHCP - or a simple static configuration like Code: | config_eth0=( "192.168.1.100/24" )
routes_eth0=( "default via 192.168.1.1" ) | I always use one of these and never had that problem. |
|
Back to top |
|
|
magowiz Veteran
Joined: 17 Feb 2005 Posts: 1029 Location: Italy/Milan/Bresso
|
Posted: Tue Oct 20, 2009 6:16 pm Post subject: |
|
|
Helena wrote: | what a strange network configuration...
why don't you use a simple blank configuration - since you seem to use DHCP - or a simple static configuration like Code: | config_eth0=( "192.168.1.100/24" )
routes_eth0=( "default via 192.168.1.1" ) | I always use one of these and never had that problem. |
Mine configuration is like this because I use dhcp and ip aliasing, the real ip is given by dhcp and 192.168.1.2 is the alias IP I use for example for have static references to machines to use ssh on my LAN. |
|
Back to top |
|
|
Helena Veteran
Joined: 02 Apr 2003 Posts: 1114 Location: Den Dolder, The Netherlands
|
Posted: Tue Oct 20, 2009 6:28 pm Post subject: |
|
|
So you're performing NAT by hand, are you? Network configuration is tricky. It seems that you have a ISP with DHCP (as I do). Do you use a router (you have a LAN you said)? Does this router (or another active component like a WiFi accesspoint) also perform DHCP? Is there any chance that your IP alias is also used by another DHCP server? Etc.etc.
I wonder if this has a particular Gentoo origin or is general network problem. |
|
Back to top |
|
|
magowiz Veteran
Joined: 17 Feb 2005 Posts: 1029 Location: Italy/Milan/Bresso
|
Posted: Tue Oct 20, 2009 6:32 pm Post subject: |
|
|
Helena wrote: | So you're performing NAT by hand, are you? Network configuration is tricky. It seems that you have a ISP with DHCP (as I do). Do you use a router (you have a LAN you said)? Does this router (or another active component like a WiFi accesspoint) also perform DHCP? Is there any chance that your IP alias is also used by another DHCP server? Etc.etc.
I wonder if this has a particular Gentoo origin or is general network problem. |
Mine ISP is a big NAT , each one gets a IP in a preset of 5 private fixed IP assigned via dhcp , is not a proper router anyway it performs dhcp . The problem comes out only with amule, I have other machines with the same configuration and I have no problems.
EDIT : And also in this pc I get no problems if I don't start amule so I don't think mine configuration is wrong. |
|
Back to top |
|
|
magowiz Veteran
Joined: 17 Feb 2005 Posts: 1029 Location: Italy/Milan/Bresso
|
Posted: Tue Oct 20, 2009 11:37 pm Post subject: |
|
|
It happened again but this time I found the cause , it is the buffer saturation.
Amule fills the buffer space, then when dhcpd tries to renew the lease it gets a "no buffer space available" and fall backs with ipv4ll that assigns a random IP and perhaps alters the route table as described above. I tried to disable ipv4ll support in dhcpd appending the -L option to dhcp_eth0 parameters in /etc/conf.d/net but I don't know if it will work.
Is there a way if a lease fails to preserve ip and routing table ? |
|
Back to top |
|
|
magowiz Veteran
Joined: 17 Feb 2005 Posts: 1029 Location: Italy/Milan/Bresso
|
Posted: Wed Oct 21, 2009 9:28 am Post subject: |
|
|
It seems that options -A and -E suite me, I added them to dhcp_eth0 into /etc/conf.d/net and I hope it will work. |
|
Back to top |
|
|
magowiz Veteran
Joined: 17 Feb 2005 Posts: 1029 Location: Italy/Milan/Bresso
|
Posted: Thu Oct 22, 2009 9:14 am Post subject: |
|
|
It didn't work, is there a way to add statically a route to eth0 in /etc/conf.d/net ? I would like that this route will be kept and dhcpcd doesn't delete it. |
|
Back to top |
|
|
|