The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Default route missing on boot

Discussion in 'General Discussion' started by rkula, Feb 9, 2011.

  1. rkula

    rkula Member

    Joined:
    Mar 22, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I have come across an odd networking issue that I'm having a hard time solving.

    My customer is running:

    OS: CentOS release 5 (Final)
    cPanel/WHM: WHM 11.28.76

    On boot, the default route does not get added to the routing table. All other entries get added (e.g. all IP routes and networks are added). I have checked the following items:

    1. /etc/sysconfig/network contains the line (obviously the x.x.x.x is the IP for the gateway):
    GATEWAY=x.x.x.x
    2. The /etc/init.d/network script is setup to execute in runlevels 3,4, and 5.

    Are there any additional places I should look to determine why the default route is not being added on boot?

    Thank you,

    Russ Kula
     
  2. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    While it wouldn't necessarily explain the absence of a default route, system startup also reads gateway configuration from the interface configuration file. If there is a conflicting entry in there, this may explain your startup issues. For eth0:

    Code:
    /etc/sysconfig/network-scripts/ifcfg-eth0
     
  3. rkula

    rkula Member

    Joined:
    Mar 22, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I probably should have mentioned that I also checked the /etc/sysconfig/network-scripts/ifcfg-eth0 as well. There was no entry for the gateway. I've already tried booting with a gateway entry in the ifcfg-eth0 file.

    Incidentally, if I run /etc/init.d/network after bootup, the default route is added as expected.

    Thank you,

    Russ Kula
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello Russ,

    Could you show us the entries you have in /etc/sysconfig/network-scripts/ifcfg-eth0 file? Also, you don't have any other /etc/sysconfig/network-scripts/ifcfg-eth0* files right? I've seen people create a backup of the main file before and the server will try to load those on boot and sometimes cause a conflict (such as ifcfg-eth0.bak file).

    Next, I show 2,3,4,5 run levels for both network and ipaliases on my machine:

    Code:
    root@vps [~]# chkconfig network --list
    network        	0:off	1:off	2:on	3:on	4:on	5:on	6:off
    root@vps [~]# chkconfig ipaliases --list
    ipaliases      	0:off	1:off	2:on	3:on	4:on	5:on	6:off
    Does your machine have ipaliases set to start on boot as well?

    Thanks.
     
  5. rkula

    rkula Member

    Joined:
    Mar 22, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    The network script is setup to execute in run level 2 as well (that was an oversight on my part). I even went so far to make sure that the links were present in the rc2.d, rc3.d, rc4.d, and rc5.d directories. Yes, ipaliases is setup to execute on boot:

    Code:
    -bash-3.1# chkconfig network --list
    network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
    -bash-3.1# chkconfig ipaliases --list
    ipaliases       0:off   1:off   2:on    3:on    4:on    5:on    6:off
    Here is the ifcfg-eth0 file:

    Code:
    # Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet
    DEVICE=eth0
    HWADDR=00:30:48:5e:97:62
    IPADDR=69.x.x.x
    NETMASK=255.255.255.224
    ONBOOT=yes
    NETWORK=69.x.x.x
    TYPE=Ethernet
    There doesn't appear to be any additional ifcfg-eth* files:

    Code:
    -bash-3.1# ls -tl /etc/sysconfig/network-scripts/ifcfg-eth*
    -rw-r--r-- 3 root root 181 Feb  9 11:43 /etc/sysconfig/network-scripts/ifcfg-eth0
    -rw-r--r-- 3 root root 177 Feb  6 15:40 /etc/sysconfig/network-scripts/ifcfg-eth1
    Thank you,

    Russ Kula
     
  6. rkula

    rkula Member

    Joined:
    Mar 22, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I was able to solve my problem.

    The customer had inadvertently added the main ip (that is listed in /etc/sysconfig/network-scripts/ifcfg-eth0) to the /etc/ips file. After removing it from the /etc/ips file (and rebooting), the default route was added.

    Thank you,

    Russ Kula
     
Loading...

Share This Page