Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Information in /etc/conf.d/net seems to be ignored!
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
kr0z
n00b
n00b


Joined: 24 Mar 2007
Posts: 9

PostPosted: Sat Jul 05, 2008 5:43 pm    Post subject: Information in /etc/conf.d/net seems to be ignored! Reply with quote

Dear sirs!

My Internet Service Provider has DHCP server. But it often fails. In this case the only way to make Internet working is to configure network manually. Following script does it successfully:
Code:
$ cat ~/isp

#!/bin/sh

ifconfig eth0 1.2.3.4 netmask 255.255.255.0
route add default gw 1.2.3.254


This is a bit inconvenient, so I decided to make corresponding configuration in the system. Here it is:

Code:
$ cat /etc/conf.d/net

modules=( "ifconfig" )

mac_eth0="00:01:41:81:B1:91"
dhcpcd_eth0="-t 30"
config_eth0=( "dhcp" )
fallback_eth0=( "eth0 1.2.3.1 netmask 255.255.255.0" )
fallback_route_eth0=( "default via 1.2.3.254" )


Please, note, that before that this file was exactly the same except last two lines (fallback_*)

But /etc/init.d/net.eth0 seem to ignore this configuration!
Quote:
$ /etc/init.d/net.eth0 restart
* WARNING: you are stopping a boot service.
* Shutting down Azureus daemon ... [ ok ]
* Stopping nas ... [ ok ]
* Unmounting network filesystems ... [ ok ]
* Stopping ntpd ... [ ok ]
* Stopping proftpd ... [ ok ]
* Stopping eth0
* Bringing down eth0
* Stopping dhcpcd on eth0 ... [ ok ]
* Shutting down eth0 ... [ ok ]
* Starting eth0
* Changing MAC address of eth0 ... [ ok ]
* changed to 00:01:41:81:B1:91
* Bringing up eth0
* dhcp
* Running dhcpcd ...
err, eth0: timed out
warn, eth0: using IPV4LL address 169.254.26.111 [ ok ]
* eth0 received address 169.254.26.111/16
* Starting Azureus daemon ... [ ok ]
* Starting nas ... [ !! ]
* Mounting network filesystems ... [ ok ]
* Starting ntpd ... [ ok ]
* Starting proftpd ... [ ok ]


So, as you can see, my fallback configuration ignored and eth0 received address 169.254.26.111. Thus I have two questions: 1) Why? 2) How to make proper fallback configuration?

Thank you in advance.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sat Jul 05, 2008 6:48 pm    Post subject: Reply with quote

dhcpcd, by default, supports zeroconf. Thus, it never fails and you want it to :)
You need to read the dhcpcd man page and put the right option in /etc/conf.d/net (hint:- dhcpcd_eth0-"-L") or emerge dhcpcd without the zeroconf USE flag.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
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