View previous topic :: View next topic |
Author |
Message |
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Fri Dec 04, 2009 9:17 pm Post subject: |
|
|
thumper wrote: | HelAu wrote: | Ouch - you're right
Where is a documentation for how to setup networking correctly with openrc ? |
Good question... I've been standing in that line for some time now...
Till some usable docs show up, I just set a simple static address, and then manually setup the rest of what I needed in it's own init script.. I got the idea from the Gentoo KVM howto, although it's outdated as well with respect to the networking config portion.
George |
That's how it's supposed to work
You learn about the right tools (even the Linux craptastic ones) instead of using complicated wrappers around the poor tools that often get it wrong.
Truthfully, I don't have the time to spend writing documentation for Gentoo and it looks like Gentoo needs some help here.
Anyone willing to step up? _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
HelAu n00b
Joined: 09 Feb 2004 Posts: 59
|
Posted: Fri Dec 04, 2009 9:28 pm Post subject: |
|
|
UberLord wrote: | For the new style, currently none.
Not because I'm lazy, but because all my networking needs are handled by dhcpcd-5.
dhcpcd-5 has excellent documentation
I also run a server as my home router/gateway. Admittedly it runs NetBSD, but the new style network scripts are inspired by it's simple setup.
This is all documented in conf.d/network and conf.d/staticroute. |
Now I'm even more puzzled
The problem is, I have my own gentoo based distribuition and I have to setup networking by autodetecting capabilities and writing the correct values to config files/add the correct scripts to startup.
All current documention afaik is written for net.eth0/net.lo especially all wireless howto's.
So I guess I have to use the old style net.xxx way, because most users wouldn't be able to setup wireless networking without working howtos. Am I right with that ? |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Fri Dec 04, 2009 10:55 pm Post subject: |
|
|
HelAu wrote: | So I guess I have to use the old style net.xxx way, because most users wouldn't be able to setup wireless networking without working howtos. Am I right with that ? |
Not really. I just configure wpa_supplicant *to run in the default runlevel. dhcpcd picks up link notifications (ie, wireless up) and it just works.
I also write dhcpcd-gtk which has a very simple gui with Access Point selection. This also talks to wpa_supplicant via DBus.
So all the system configurator has to do is tell which interface wpa_supplicant to start on, because wpa_supplicant can't work it out by itself. Upstream even rejected my patches to enable this. Oh well. Luckily the init script * can do this for you.
* OpenRC tarball has a wpa_supplicant init script, but it's not installed by default. You currently have to do this yourself. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
HelAu n00b
Joined: 09 Feb 2004 Posts: 59
|
Posted: Sat Dec 05, 2009 12:03 am Post subject: |
|
|
So if I get you right, for dhcp I have to activate dhcpcd for static ip I add staticroute to the boot runlevel.
Both will use the network init script, and configuration is done inside the three according conf files.
And for wpa I should take:
http://roy.marples.name/projects/openrc/browser/init.d.misc/wpa_supplicant.in
?!
Just another OpenRC Question:
What is the preferred way to set dependencies ?
Inside the init script or in /etc/conf.d/foo via the rc_foo variables ? |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
eXtIO n00b
Joined: 26 Aug 2003 Posts: 46 Location: Germany
|
Posted: Sat Dec 05, 2009 5:33 pm Post subject: |
|
|
Hi,
thx, my "new style" network config works now!
So for getting wireless configuration with wpa_supplicant working, these steps must be made:
- Configure ethernet devices in /etc/conf.d/network
- Install dhcpcd 5 (4.0.x doesn't contain dhcpcd init script), I use 5.1.3-r1
- Disable net.* rc scripts
- Enable network, wpa_supplicant and dhcpcd rc scripts
- Configure wpa_supplicant (either by hand or with wpa_gui)
Maybe there is are better solutions (e.g. i read something about custom init scripts etc...), but it works |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3414 Location: Canada
|
Posted: Sun Dec 06, 2009 4:40 am Post subject: |
|
|
eXtIO wrote: | Hi,
thx, my "new style" network config works now!
So for getting wireless configuration with wpa_supplicant working, these steps must be made:
- Configure ethernet devices in /etc/conf.d/network
- Install dhcpcd 5 (4.0.x doesn't contain dhcpcd init script), I use 5.1.3-r1
- Disable net.* rc scripts
- Enable network, wpa_supplicant and dhcpcd rc scripts
- Configure wpa_supplicant (either by hand or with wpa_gui)
Maybe there is are better solutions (e.g. i read something about custom init scripts etc...), but it works |
So now dhcpcd is supposed to be continously running ? |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sun Dec 06, 2009 5:12 pm Post subject: |
|
|
Yes. |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3414 Location: Canada
|
Posted: Sun Dec 06, 2009 6:54 pm Post subject: |
|
|
dmpogo wrote: | So now dhcpcd is supposed to be continously running ? |
I wonder, doing what ? Just trying to wrap my head around possible networking scenarios that I envisage for myself.
Can't yet see a point of continuously running dhcp client daemon |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sun Dec 06, 2009 7:14 pm Post subject: |
|
|
We should ask Roy about that subject. |
|
Back to top |
|
|
HelAu n00b
Joined: 09 Feb 2004 Posts: 59
|
Posted: Sun Dec 06, 2009 9:12 pm Post subject: |
|
|
Hi,
Next problem. On my machine Wake on Lan does not work with the new net scripts.
In the old rc file there was a paramter RC_DOWN_INTERFACE who takes care of not shutting down the iface.
Is there anything I am missing ? |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Dec 07, 2009 1:35 pm Post subject: |
|
|
dmpogo wrote: | I wonder, doing what ? Just trying to wrap my head around possible networking scenarios that I envisage for myself.
Can't yet see a point of continuously running dhcp client daemon |
For the most part waiting.
Every DHCP client waits around until the leased address is due for renewal and then re-requests it.
dhcpcd is a little different - it also waits around for network events, such as a cable being plugged in, associating to an access point, etc.
What's more, it's the only DHCP client to effectively manage >1 DHCP enabled interface.
dhcpcd also supports IPv4LL and needs to be active to defend its address in-case of conflict.
In a nutshell, it doesn't just configure the interface _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Dec 07, 2009 1:37 pm Post subject: |
|
|
HelAu wrote: | Hi,
Next problem. On my machine Wake on Lan does not work with the new net scripts.
In the old rc file there was a paramter RC_DOWN_INTERFACE who takes care of not shutting down the iface.
Is there anything I am missing ? |
The new network script does not take down the interface, and neither does dhcpcd.
Or are you referring to the net.* scripts? If so, you need to alter /etc/inttab and remove the -i options. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
HelAu n00b
Joined: 09 Feb 2004 Posts: 59
|
Posted: Mon Dec 07, 2009 2:19 pm Post subject: |
|
|
Hi,
Thanks for the info !
Is there an example for the wpa_supplicant config file /etc/wpa_supplicant.conf available ?
Bye
Helmut |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
HelAu n00b
Joined: 09 Feb 2004 Posts: 59
|
Posted: Mon Dec 07, 2009 2:54 pm Post subject: |
|
|
UberLord wrote: | I believe the wpa_supplicant ebuild installs one. But it's been a while since I looked. |
You're right - /usr/share/doc/wpa_supplicant-0.6.9/wpa_supplicant.conf.bz2 is an example |
|
Back to top |
|
|
ferrarif5 Apprentice
Joined: 06 Sep 2003 Posts: 211 Location: Manchester, UK
|
Posted: Tue Dec 08, 2009 10:48 pm Post subject: |
|
|
Hi,
Am running OpenRC 0.5.3, just updated from 0.3.0 to which I was having the same problem as stated below though I can't remember it saying SIGTERM and my filesystem was always marked clean which isn't the case now.
The problem:
When I go to shutdown or reboot the system, stopping localmount results in SIGTERM, below is the rc.log:
Code: |
rc shutdown logging started at Tue Dec 8 22:38:26 2009
* Caching service dependencies... [ ok ]
* Stopping local... [ ok ]
* Saving random seed... [ ok ]
* Deactivating swap devices... [ ok ]
* Disabling numlock on ttys... [ ok ]
* Stopping cupsd... [ ok ]
* Storing ALSA Mixer Levels... [ ok ]
* Stopping kdm... [ ok ]
* Unmounting network filesystems... [ ok ]
* Unmounting NFS filesystems... [ ok ]
* Stopping NFS statd... [ ok ]
* Stopping portmap... [ ok ]
* Deleting static routes... SIOCDELRT: No such process [ ok ]
* Bringing down interface eth0 *
Stopping dhcpcd on eth0... [ ok ]
* Removing addresses
* Bringing down interface lo
* Removing addresses
* Stopping Hardware Abstraction Layer daemon... [ ok ]
* Stopping ConsoleKit daemon... [ ok ]
* Stopping syslog-ng... [ ok ]
* Stopping D-BUS system messagebus... [ ok ]
* Unmounting loopback devices
* Unmounting filesystems
* Unmounting /lib/rc/init.d...
* rc: caught SIGTERM, aborting
|
Any ideas? Cheers _________________ Asus P6X58D-E Mobo
Intel Core i7 920
18GB Corsair DDR3
User:335876 | Screenshot |
|
Back to top |
|
|
nichocouk Guru
Joined: 10 Mar 2005 Posts: 585 Location: Glasgow
|
Posted: Sun Dec 13, 2009 11:14 pm Post subject: |
|
|
Hi,
I have started another thread as I thought I had issues with glibc and NIS setup, but I now realise after having read previous posts that it must be related to my recent upgrade from openrc-0.5.2-r2 to openrc-0.5.3
I am confused with which init scripts should be used, and I probably have now a configuration with an oldish setup and/or init scripts which are missing and/or init scripts which are started but should not.
My needs are:
- I have a static IP address and AFAIK I am not using DHCP.
- I need to start ypbind to bind to the NIS server
- I need to start autofs as my /home is on a network
Now as explained in the other thread, I cannot start ypbind because it cannot find the NIS server. However my box has no problem connecting to the outside world.
I wonder what is the correct config file for network setup. I have both conf.d/net and conf.d/network set up with the following:
Code: | # cat /etc/conf.d/net
dns_domain="my.dns.dom"
dns_servers="dns1 dns2 dns3"
nis_domain="my.nis.dom"
nis_servers="nis1"
config_eth0="123.456.78.901 netmask 255.255.255.0 brd 123.456.78.255"
routes_eth0="default via 123.456.78.1"
|
Code: | # cat /etc/conf.d/network
ifconfig_eth0="123.456.78.901 netmask 255.255.255.0"
domainname="my.nis.dom"
defaultroute="123.456.78.1"
|
Currently (box not really usable as I can only log in as root):
Code: | # rc-status
Runlevel: default
hdparm [ started ]
metalog [ started ]
acpid [ started ]
ntp-client [ started ]
ypbind [ stopped ]
hald [ started ]
autofs [ started ]
xdm [ started ]
cupsd [ started ]
ntpd [ started ]
sshd [ started ]
udev-postmount [ started ]
vixie-cron [ started ]
local [ started ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed
sysfs [ started ]
udev-mount [ started ]
localmount [ started ]
net.eth0 [ started ]
rpcbind [ started ]
xdm-setup [ started ]
Dynamic Runlevel: manual
|
Do I need to have init scripts such as network, or staticroute, or whatever, running, in order to have ypbind starting and finding the NIS server?
Any help appreciated! _________________ nichocouk
L'Etat, c'est moi. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
nichocouk Guru
Joined: 10 Mar 2005 Posts: 585 Location: Glasgow
|
Posted: Mon Dec 14, 2009 11:27 am Post subject: |
|
|
Thanks for the clarification Uberlord. Getting there but not quite there yet
Here is the boot level log
Code: | * Setting NIS domainname: my.nis.dom ...
[ ok ]
* Starting network
[ ok ]
* Setting default route 123.456.78.1...
[ ok ]
* Mounting USB device filesystem [usbfs]...
[ ok ]
* Mounting NFS filesystem...
[ ok ]
* Adding static routes...
route: netmask doesn't match route address
Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables
route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.
route {-h|--help} [<AF>] Detailed usage syntax for specified AF.
route {-V|--version} Display version/author and exit.
-v, --verbose be verbose
-n, --numeric don't resolve names
-e, --extend display other/more information
-F, --fib display Forwarding Information Base (default)
-C, --cache display routing cache instead of FIB
<AF>=Use '-A <af>' or '--<af>'; default: inet
List of possible address families (which support routing):
inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)
netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)
x25 (CCITT X.25)
[ ok ]
* Activating swap devices...
[ ok ]
|
My staticroute config is:
Code: | staticroute="net 123.456.78.901 netmask 255.255.255.0 gw 123.456.78.1" |
and my conf.d/network is as posted previously.
Obviously I've done something wrong... _________________ nichocouk
L'Etat, c'est moi. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
nichocouk Guru
Joined: 10 Mar 2005 Posts: 585 Location: Glasgow
|
Posted: Mon Dec 14, 2009 12:10 pm Post subject: |
|
|
Indeed, but it does not give me the solution It would be nice if it would!
I'm afraid I don't know how to find the correct address. _________________ nichocouk
L'Etat, c'est moi. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
nichocouk Guru
Joined: 10 Mar 2005 Posts: 585 Location: Glasgow
|
Posted: Mon Dec 14, 2009 12:24 pm Post subject: |
|
|
Removing netmask from the staticroute config seems to be in the right direction, but I get
Code: | [ * ] Adding static routes...
SIOCADDRT: Invalid argument [ ok ]
|
_________________ nichocouk
L'Etat, c'est moi. |
|
Back to top |
|
|
nichocouk Guru
Joined: 10 Mar 2005 Posts: 585 Location: Glasgow
|
Posted: Mon Dec 14, 2009 2:22 pm Post subject: |
|
|
UberLord wrote: | Code: | route: netmask doesn't match route address |
Should be self explanitory as to why your config does not work... |
I think the problem does not come from netmask itself, but the numeric argument after 'net' in staticroute. The address I have put (123.456.78.901) is what my box's IP address should be, but I realize that must be wrong. However I am not sure what it should be. I'll try to find that out.
Cheers. _________________ nichocouk
L'Etat, c'est moi. |
|
Back to top |
|
|
|