Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Network start issue. Default gateway missing.
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
JarekG
Apprentice
Apprentice


Joined: 26 Jan 2005
Posts: 160
Location: Poland | Birmingham [UK]

PostPosted: Fri Nov 20, 2009 3:13 pm    Post subject: Network start issue. Default gateway missing. Reply with quote

Hi,

I've got an urgent problem with networking start. I'm just after 8h downtime as my brilliant ISP where my server is, can't help me as it's dedicated server - my problem. Bollocks.

Anyway... after fixing some problems with all the stuff I noticed that server is booting up but network doesn't want to start... or it's starting but some other process overwrites the existing settings. I created couple of crontab scripts which pasted me the input from ifconfig and route and were run every minute. The problem is nothing generally has changed in the system settings since I've got that server, but something weird happened with the network configuration. To start the server I had to put into crontab script which will restore default gateway route. So... server is booting up and after 1 minute you could see:
Code:
Kernel IP routing table                                                                                                                                                     
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface                                                                                               
XXX.XXX.XXX.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0                                                                                               
0.0.0.0         XXX.XXX.XXX.254  0.0.0.0         UG    0      0        0 eth0


After a minute:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
XXX.XXX.XXX.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       -               255.0.0.0       !     0      -        0 -   
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo


When cron executed my script to fix the route:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
XXX.XXX.XXX.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       -               255.0.0.0       !     0      -        0 -
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
0.0.0.0         XXX.XXX.XXX.254  0.0.0.0         UG    0      0        0 eth0


What did I miss ? Why it's doing such a thing ?
/etc/conf.d/net
Code:

config_eth0=( "XXX.XXX.XXX.144 netmask 255.255.255.0" )
routes_eth0=( "default gw XXX.XXX.XXX.254" )


Code:

ll /etc/init.d/net*
lrwxrwxrwx 1 root root     6 11-20 14:50 /etc/init.d/net.eth0 -> net.lo
-rwxr-xr-x 1 root root 15143 11-20 00:46 /etc/init.d/net.lo
-rwxr-xr-x 1 root root  2031 11-20 00:46 /etc/init.d/netmount
-rwxr-xr-x 1 root root  5349 11-20 00:46 /etc/init.d/network


Code:

rc-update |grep net
             netmount | default
              network | default                 boot
             net.eth0 | default                 boot
                local | default                      nonetwork


Any ideas ? What do you need more to know to help me ?

Appreciate any help.

Regards,
Jarek
_________________
Pozdrawiam
Jarosław Grząbel
HERE I AM
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54827
Location: 56N 3W

PostPosted: Fri Nov 20, 2009 3:44 pm    Post subject: Reply with quote

JarekG,
Code:
              network | default                 boot
             net.eth0 | default                 boot
is wrong.

First, netwoking, other than local, should be in the defualt runlevel, not boot.

You also have two network scripts trying to do the same thing - they will fight over the interfaces and you will get in a mess.
It appears as if you are running baselayout2 and updated open-rc in the brief period when it installed the new network script (called network).
That new script removed a lot of functionality that users were accustomed to and the old net.lo was reinstated.

Remove network from all runlevels and revert to the old net.eth0 script.
Only have the net.eth0 started in the default runlevel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
JarekG
Apprentice
Apprentice


Joined: 26 Jan 2005
Posts: 160
Location: Poland | Birmingham [UK]

PostPosted: Fri Nov 20, 2009 4:10 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Remove network from all runlevels and revert to the old net.eth0 script.
Only have the net.eth0 started in the default runlevel.

Thank you for your answer. It's better to move forward so maybe I shall reconfigure network:
Code:
ifconfig_eth0="XXX.XXX.XXX.144 netmask 255.255.255.0"                   
defaultroute="XXX.XXX.XXX.254"


and remove net.eth0 then. What do you think ?

Regards,
Jarek
_________________
Pozdrawiam
Jarosław Grząbel
HERE I AM
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54827
Location: 56N 3W

PostPosted: Fri Nov 20, 2009 4:14 pm    Post subject: Reply with quote

JarekG,

net.eth0 must be in the default runlevel - thats all.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
JarekG
Apprentice
Apprentice


Joined: 26 Jan 2005
Posts: 160
Location: Poland | Birmingham [UK]

PostPosted: Fri Nov 20, 2009 4:19 pm    Post subject: Reply with quote

Thank you. I will try that tonight and let you know if that helped me.

Regards,
Jarek
_________________
Pozdrawiam
Jarosław Grząbel
HERE I AM
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