View previous topic :: View next topic |
Author |
Message |
mv Watchman
Joined: 20 Apr 2005 Posts: 6749
|
Posted: Tue Oct 20, 2009 9:32 am Post subject: |
|
|
I must say that this is not an appropriate solution: Your "solution" is to use oldnet but not the network script. However, the "new style" how it should work is only with the network script. For this, I also sometimes get false paths.
I suppose that it is really a bug in dhcpcd: Sometimes the route is set correctly, but usually not at the first run. Only after stopping and restarting dhcpcd the route is set correctly.
More precisely: If dhcpcd "works" (usually only after the second start) I get the output
Code: | $ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
[correct ip] 0.0.0.0 255.255.254.0 U 202 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 [correct gateway] 0.0.0.0 UG 202 0 0 eth0 |
but if it does not work, the last line is simply missing from the output. dhcpcd must have got its lease, because otherwise the first line could not be there, so it must have simlpy "forgotten" to add the route.
I guess a bug should be reported to Uberlord, but currently I have to many other things to do... |
|
Back to top |
|
|
Guinpen Guru
Joined: 08 Dec 2004 Posts: 393
|
Posted: Tue Oct 20, 2009 9:39 am Post subject: |
|
|
I see. BTW, what is meaning of the second line and why is it there? |
|
Back to top |
|
|
Mike Hunt Watchman
Joined: 19 Jul 2009 Posts: 5287
|
Posted: Tue Oct 20, 2009 1:35 pm Post subject: |
|
|
Hmmm, I have not had the experience of false paths or the need to restart dhcpcd with openrc-0.5.0
I'm not getting that second line either. What can that be if there is no interface. Code: | 127.0.0.0 - 255.0.0.0 ! 0 - 0 - |
Code: | # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
[correct ip] 0.0.0.0 255.255.255.0 U 202 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 [correct gateway]0.0.0.0 UG 202 0 0 eth0 |
|
|
Back to top |
|
|
sera Retired Dev
Joined: 29 Feb 2008 Posts: 1017 Location: CET
|
Posted: Tue Oct 20, 2009 2:25 pm Post subject: |
|
|
Godji wrote: | I see. BTW, what is meaning of the second line and why is it there? |
This means there is an unreachable route to the loopback interface and it's done in the network script, therefore, Mike Hunt, you wont see it. I asked UberLord why but didn't got an answer so far.
Edit: Here post 6016059 |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6749
|
Posted: Wed Oct 21, 2009 8:35 pm Post subject: |
|
|
Finally, I found some time to look in the thing again. The cause for the problem is rather simple: If /etc/init.d/network runs after dhcpcd, it mangles some of the routes which dhcpcd has set. Therefore the non-reproducing effect: It appears not to be defined by dependencies what starts earlier. So I have just put
/etc/conf.d/dhcpcd wrote: | rc_need="network" |
and everything is fine now. (Well, everything except for the lack of support for pppd in the new network scripts, but this is another story - unfortunately more serious, for which I still see no reasonable solution except for using oldnet.) |
|
Back to top |
|
|
gcasillo l33t
Joined: 23 Sep 2003 Posts: 739 Location: Cincinnati, Ohio, USA
|
Posted: Sat Oct 24, 2009 6:27 am Post subject: Re: [SOLVED] OpenRC 0.5.1 does not start my network correctl |
|
|
Godji wrote: | 4) Add the following to /etc/dhcpcd.conf:
|
Just wanted to say thanks for sharing this tip. Appears to resolve the issue I was having. |
|
Back to top |
|
|
|