Gentoo Archives: gentoo-amd64

From: Isaac Conway <ike@××××××××××××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Networking bridging
Date: Thu, 21 Feb 2008 15:07:34
Message-Id: 47BD93AF.6040405@conwaynetworks.com
In Reply to: [gentoo-amd64] Networking bridging by Chris Brennan
1 Chris Brennan wrote:
2 > I am trying to set up a Bridge for Qemu to use. I followed the guide
3 > at
4 > http://gentoo-wiki.com/HOWTO:_Qemu#Using_TUN.2FTAP_interface_as_a_normal_user
5 > but when ever the bridge starts, I loose connectivity outside of my
6 > box :/ ... am I missing something ....
7 >
8 >
9 > I've includes the output of my /etc/conf.d/net file ....
10 >
11 >
12 > # This blank configuration will automatically use DHCP for any net.*
13 > # scripts in /etc/init.d. To create a more complete configuration,
14 > # please review /etc/conf.d/net.example and save your configuration
15 > # in /etc/conf.d/net (this file :]!).
16 > dns_domain=( "unworldly.org" )
17 > nis_domain=( "unworldly.org" )
18 > dns_domain_eth0=( "unworldly.org" )
19 > dns_search_eth0=( "unworldly.org xaerolimit.net" )
20 > dns_servers_eth0=( "192.168.1.1 4.2.2.1 4.2.2.2" )
21 >
22 > ##
23 > # LAN
24 > ##
25 > config_eth0=( "192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255" )
26 > routes_eth0=( "default via 192.168.1.1" )
27 >
28 > ##
29 > # Bridge
30 > ##
31 > bridge_br0="eth0"
32 > config_br0=( "192.168.1.20 netmask 255.255.255.0 brd 192.168.1.255" )
33 > #dhcpcd_br0="-t 10"
34 > RC_NEED_br0="net.eth0"
35 > brctl_br0=( "setfd 0" "sethello 0" "stp off" )
36 > config_tap0=( "10.0.2.1 netmask 255.255.255.0" )
37 >
38 >
39 I think what you are after is the following:
40
41 bridge_br0="eth0"
42 config_br0=( "192.168.1.20 netmask 255.255.255.0" )
43 routes_br0=( "default via 192.168.1.1" )
44 config_eth0=( "null" )
45 depend_br0() {
46 need net.eth0
47 }
48
49 You do not need an IP on the eth0 interface. This should get your box
50 online with the bridge setup. (not tested, but fairly certain) Not
51 totally sure what your intentions are for the tun interface. I would
52 assume you would want to add it to the bridge group, so that it is on
53 the same bridge as the outside world. Or perhaps you want to route to
54 the 192 IP to get to the 10. stuff.... Also, make sure you setup
55 /etc/init.d/net.br0 and /etc/init.d/net.tap0 and set them to start with
56 the box. Hope this helps.
57
58 --
59 Isaac D. Conway
60 http://www.conwaynetworks.com
61
62 --
63 gentoo-amd64@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] Networking bridging Chris Brennan <xaero@××××××××××.net>