Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OpenRC support thread, 2d Edition
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6355
Location: Blighty

PostPosted: Fri Dec 04, 2009 9:17 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
HelAu
n00b
n00b


Joined: 09 Feb 2004
Posts: 54

PostPosted: Fri Dec 04, 2009 9:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6355
Location: Blighty

PostPosted: Fri Dec 04, 2009 10:55 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
HelAu
n00b
n00b


Joined: 09 Feb 2004
Posts: 54

PostPosted: Sat Dec 05, 2009 12:03 am    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6355
Location: Blighty

PostPosted: Sat Dec 05, 2009 2:56 am    Post subject: Reply with quote

HelAu wrote:
Inside the init script or in /etc/conf.d/foo via the rc_foo variables ?


Personally I would use /etc/rc.conf as that overrides everything and your config is in one place.
But use can use /etc/conf.d/foo as well :)
_________________
Use dhcpcd for all your automated network configuration needs
Back to top
View user's profile Send private message
eXtIO
n00b
n00b


Joined: 26 Aug 2003
Posts: 46
Location: Germany

PostPosted: Sat Dec 05, 2009 5:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2277
Location: Canada

PostPosted: Sun Dec 06, 2009 4:40 am    Post subject: Reply with quote

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
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 13046
Location: Ste-Foy,Canada

PostPosted: Sun Dec 06, 2009 5:12 pm    Post subject: Reply with quote

Yes.
_________________
Sysadmin of GentooQuébec.org
Wiki
Signature
IRC on Freenode : #gentoo-quebec
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2277
Location: Canada

PostPosted: Sun Dec 06, 2009 6:54 pm    Post subject: Reply with quote

dmpogo wrote:
So now dhcpcd is supposed to be continously running ?


d2_racing wrote:
Yes.


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
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 13046
Location: Ste-Foy,Canada

PostPosted: Sun Dec 06, 2009 7:14 pm    Post subject: Reply with quote

We should ask Roy about that subject.
_________________
Sysadmin of GentooQuébec.org
Wiki
Signature
IRC on Freenode : #gentoo-quebec
Back to top
View user's profile Send private message
HelAu
n00b
n00b


Joined: 09 Feb 2004
Posts: 54

PostPosted: Sun Dec 06, 2009 9:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6355
Location: Blighty

PostPosted: Mon Dec 07, 2009 1:35 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6355
Location: Blighty

PostPosted: Mon Dec 07, 2009 1:37 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
HelAu
n00b
n00b


Joined: 09 Feb 2004
Posts: 54

PostPosted: Mon Dec 07, 2009 2:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6355
Location: Blighty

PostPosted: Mon Dec 07, 2009 2:21 pm    Post subject: Reply with quote

I believe the wpa_supplicant ebuild installs one. But it's been a while since I looked.
_________________
Use dhcpcd for all your automated network configuration needs
Back to top
View user's profile Send private message
HelAu
n00b
n00b


Joined: 09 Feb 2004
Posts: 54

PostPosted: Mon Dec 07, 2009 2:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
ferrarif5
Apprentice
Apprentice


Joined: 06 Sep 2003
Posts: 211
Location: Manchester, UK

PostPosted: Tue Dec 08, 2009 10:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
nichocouk
Guru
Guru


Joined: 10 Mar 2005
Posts: 568
Location: Glasgow

PostPosted: Sun Dec 13, 2009 11:14 pm    Post subject: Reply with quote

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! :wink:
_________________
nichocouk

L'Etat, c'est moi.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6355
Location: Blighty

PostPosted: Mon Dec 14, 2009 9:33 am    Post subject: Reply with quote

Don't mix conf.d/network and conf.d/net - only one should be used.
Remove net.eth0 from init.d and ensure that staticroute and network are in the boot runlevel.
_________________
Use dhcpcd for all your automated network configuration needs
Back to top
View user's profile Send private message
nichocouk
Guru
Guru


Joined: 10 Mar 2005
Posts: 568
Location: Glasgow

PostPosted: Mon Dec 14, 2009 11:27 am    Post subject: Reply with quote

Thanks for the clarification Uberlord. Getting there but not quite there yet :wink:
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... :oops:
_________________
nichocouk

L'Etat, c'est moi.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6355
Location: Blighty

PostPosted: Mon Dec 14, 2009 12:04 pm    Post subject: Reply with quote

Code:
route: netmask doesn't match route address


Should be self explanitory as to why your config does not work...
_________________
Use dhcpcd for all your automated network configuration needs
Back to top
View user's profile Send private message
nichocouk
Guru
Guru


Joined: 10 Mar 2005
Posts: 568
Location: Glasgow

PostPosted: Mon Dec 14, 2009 12:10 pm    Post subject: Reply with quote

Indeed, but it does not give me the solution :wink: 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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6355
Location: Blighty

PostPosted: Mon Dec 14, 2009 12:11 pm    Post subject: Reply with quote

Does it work if you remove the netmask?
_________________
Use dhcpcd for all your automated network configuration needs
Back to top
View user's profile Send private message
nichocouk
Guru
Guru


Joined: 10 Mar 2005
Posts: 568
Location: Glasgow

PostPosted: Mon Dec 14, 2009 12:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
nichocouk
Guru
Guru


Joined: 10 Mar 2005
Posts: 568
Location: Glasgow

PostPosted: Mon Dec 14, 2009 2:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 5 of 10

 
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