LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux Gateway (CentOS) Randomly Loses Internet Connection (http://www.linuxquestions.org/questions/linux-networking-3/linux-gateway-centos-randomly-loses-internet-connection-4175442310/)

dschuett 12-20-2012 09:58 AM

Linux Gateway (CentOS) Randomly Loses Internet Connection
 
I have been using a Debian box as my gateway at my house. It has always worked great, but I decided to switch to CentOS because I am more familiar with it. However, I have been running into a very weird issue. Every once in awhile I will lose connection to the internet on eth0 (my WAN interface). The weird part is 'ifconfig' shows that I still have my public IP, 'route -n' shows all the correct routes, and 'ps ax | grep dhcpclient' shows:
Code:

/sbin/dhclient -1 -q -cf /etc/dhcp/dhclient-eth0.conf -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
I have tried restarting networking, but I am still unable to route traffic across the internet. The only thing that seems to fix it is if I reboot the machine. It's almost as if when the modem goes offline, the box just never reconnects (even though it still shows that I have my public IP). Also, here is my /etc/sysconfig/network-scripts/ifcfg-eth0 file:

Code:

DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="00:1B:B9:86:F4:D8"
ETHTOOL_OPTS="autoneg off speed 100 duplex full"
NM_CONTROLLED="no"
PEERDNS="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="5fecd87a-416b-4acc-8572-22bd04e16dac"

Hope someone can help me find the root cause of this strange issue.

Thanks for your time.

nikmit 12-20-2012 11:15 AM

You shoudl get back to debian :p

On a more serious note - it could be a DHCP issue, or a NIC bug. Run tcpdump on eth0 the next time you lose connectivity and see what you get. If it is a DHCP issue you might see requests going out and no replies. You can also try restarting the modem during the failure to see if it will reset it.
Are you using the same physical box with CentOS installed instead of Debian or a different PC?

Nik


All times are GMT -5. The time now is 10:01 AM.