View previous topic :: View next topic |
Author |
Message |
jeffk l33t
Joined: 13 Sep 2003 Posts: 671
|
Posted: Fri Mar 25, 2011 6:37 pm Post subject: What does /etc/conf.d/networks do? Need bridged eth0/wlan0 |
|
|
I need to set up bridged eth0 and wlan0 for the benefit of my qemu-kvm windows guest.
I see a some applicable commented-out commands in /etc/conf.d/networks, owned by openrc-0.8.0.
If those commands were to be uncommented and adapted, I presume something runs them at boot time.
Are these commands something that would get run every time an interface service starts?
Thanks, just looking for a decent way to do this. I've let wicd handle my laptop's networking for a long time and haven't kept up with Gentoo's openrc changes. |
|
Back to top |
|
|
BradN Advocate
Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Sat Mar 26, 2011 10:20 pm Post subject: |
|
|
I'm not sure, but I think basic ethernet bridging used to be handled by conf.d/net - perhaps there's something useful in an example file there as well. But, if things have moved to using a networks file instead, maybe that's the better place to do it. |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Sat Mar 26, 2011 11:19 pm Post subject: |
|
|
I'd imagine something like this in /etc/conf.d/net might work
Code: |
bridge_br0="eth0 wlan0"
brctl_br0=( "setfd 0" "sethello 0" "stp off" )
rc_need_br0="net.eth0 net.wlan0"
config_br0=( "192.168.1.85/24" )
routes_br0=( "default via 192.168.1.1" )
dns_domain_br0="yourdomain.com"
dns_servers_br0="192.168.1.1"
dns_search_br0="yourdomain.com"
config_wlan0=( "null" )
config_eth0=( "null" )
|
you'd need the requisite support for bridging in the kernel, need config_tun, need to emerge bridge-utils, and need to symlink init scripts for net.eth0 and net.wlan0
Now, as to whether or not you'll actually have a functional network after this? I can't say. And some wifi cards don't support bridging.
But that's more or less how one would set up the bridge. I derived that from my setup of tap interfaces for KVM, so, untested, usual disclaimers apply
I'm not even sure you need to add wlan0 to the bridge
I would think it would be enough to just add eth0 to br0, and then add tap0,tap1, etc to br0
then when you need wireless? handle it just as you would normally.
since you ARE using this for KVM, maybe posting my full /etc/conf.d/net might be something for you to work from:
Code: |
bridge_br0="eth0 tap0 tap1 tap2 tap3"
brctl_br0=( "setfd 0" "sethello 0" "stp off" )
rc_need_br0="net.tap0 net.tap1 net.tap2 net.tap3"
config_br0=( "192.168.1.85/24" )
routes_br0=( "default via 192.168.1.1" )
dns_domain_br0="mydomain.com"
dns_servers_br0="192.168.1.1"
dns_search_br0="mydomain.com"
config_tap0=( "null" )
tuntap_tap0="tap"
tunctl_tap0="-u myuser"
mac_tap0="52:54:00:12:34:56"
config_tap1=( "null" )
tuntap_tap1="tap"
tunctl_tap1="-u myuser"
mac_tap1="52:54:00:12:34:57"
config_tap2=( "null" )
tuntap_tap2="tap"
tunctl_tap2="-u myuser"
mac_tap2="52:54:00:12:34:58"
config_tap3=( "null" )
tuntap_tap3="tap"
tunctl_tap3="-u myuser"
mac_tap3="52:54:00:12:34:59"
config_eth0=( "null" )
|
_________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
|
|
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
|
|