Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
new baselayout and tun/tap [solved]
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
tfosorcim
n00b
n00b


Joined: 27 Jul 2003
Posts: 13

PostPosted: Sun Jun 19, 2005 8:53 pm    Post subject: new baselayout and tun/tap [solved] Reply with quote

I'm using a bridge and a tun/tap device to communicate with an instance of user mode linux (UML). My configuration already worked fined with the 'old' baselayout.
I switched to the new baselayout recently. Since then I can't connect the UML instance via the net any more, while the bridge itself is functional after editing the /etc/conf.d/net, so I can connect my box from other machines on the local net.
I suspect the problem with the tun/tap mechanism because I found in the log of the UML instance the error TUNSETIFF failed, errno=1.

These are the relevant lines from my /etc/conf.d/net:

Code:
brctl_br0=( "setfd 0" "sethello 0" "stp off" )
bridge_br0="eth0 tap0"
config_br0=("192.168.222.105 broadcast 192.168.222.255 netmask 255.255.255.0")
routes_br0=("default gw 192.168.222.104")
config_tap0=("null")
config_eth0=("null")

depend_br0() {
  need net.eth0 net.tap0
}


All /etc/init.d/net.* are symbolic links to /etc/init.d/net.lo

TIA!

Matthias


Last edited by tfosorcim on Fri Jun 24, 2005 6:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
bigfunkymo
Apprentice
Apprentice


Joined: 23 Jan 2004
Posts: 237

PostPosted: Sun Jun 19, 2005 9:28 pm    Post subject: Reply with quote

I have a similar setup. Here is my new /etc/conf.d/net file. I've been using the new baselayout a while now and never had any troubles.
Code:
# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# eth0 : WAN
# eth1 : Untrusted wireless network
# eth2 : Trusted wired network, bridged with tap0 / Zero configuration segment
# tap0 : OpenVPN clients from untrusted network, bridged with eth2
# br0  : Ethernet bridge of trusted wired network and VPN clients from wireless.

# Globals
modules=( "iproute2" )

# WAN Interface
config_eth0=( "dhcp" )
fallback_eth0=( "192.168.100.11/24" )

# Untrusted wireless network
config_eth1=( "172.25.2.254/24" )

# Trusted wired network and bridge
config_eth2=( "null" )
config_tap0=( "null" )
bridge_br0=( "eth2 tap0" )
brctl_br0=( "setfd 0" "sethello 0" "stp off" )
config_br0=( "172.25.1.254/24")

depend_tap0() {
        need openvpn net.eth1
}

depend_br0() {
        need net.tap0 net.eth2
}


I don't see anything more than minor syntatic differences, really.
_________________
[No package... Grabbing a set.]
Back to top
View user's profile Send private message
tfosorcim
n00b
n00b


Joined: 27 Jul 2003
Posts: 13

PostPosted: Fri Jun 24, 2005 6:58 pm    Post subject: Reply with quote

thank you for your reply, bigfunkymo

It turned out that the problem was a dependency issue. If I make sure that the tuntap-devices are created before the UML is started, everything works like charm.

BTW: I really like the new net-configuration.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Fri Jun 24, 2005 7:43 pm    Post subject: Reply with quote

tfosorcim wrote:

BTW: I really like the new net-configuration.

Me too but I would like to have something like:
Code:
n22 ~ # cat /etc/conf.d/net
# net.eth0

config_eth0=("dhcp" || "adsl")

dhcpcd_eth0="-t 15"

dhcp_eth0="nontp"

So at work I would get an ip adress from the dhcp server where at home the system automatically connects to my ISP immediately after dhcp failed.

Anything planed for the future in this direction ?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Jun 27, 2005 8:32 am    Post subject: Reply with quote

toralf wrote:
I would like to have something like:
Code:
n22 ~ # cat /etc/conf.d/net
# net.eth0

config_eth0=("dhcp" || "adsl")

dhcpcd_eth0="-t 15"

dhcp_eth0="nontp"

So at work I would get an ip adress from the dhcp server where at home the system automatically connects to my ISP immediately after dhcp failed.

Anything planed for the future in this direction ?


Code:

config_eth0=( "dhcp" )
fallback_eth0=( "adsl" )

dhcpcd_eth0="-t 15"
dhcp_eth0="nontp"


How's that :wink:
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Mon Jun 27, 2005 9:48 am    Post subject: Reply with quote

Thanks, that was I am looking for.
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