Gentoo Archives: gentoo-user

From: Joshua Murphy <poisonbl@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] bridge
Date: Sun, 10 Jul 2011 17:07:06
Message-Id: CAOTuDKpGqevOFdjYH90wv8WM+x2J1UQh9okRn4QVZ9h3R6M3Lg@mail.gmail.com
In Reply to: [gentoo-user] bridge by Daniel Hilst Selli
1 On Sun, Jul 10, 2011 at 10:50 AM, Daniel Hilst Selli
2 <danielhilst@×××××.com> wrote:
3 > Hi people, I'm using brctl to create bridges for some qemu guests...
4 >
5 > I create a br0 with brctl addbr br0
6 > the I attach my wireless card to it with brctl addif br0 eth1
7 >
8 > Then some times I get right ip with dhcpcd br0 (after doing 'ifconfig br0
9 > promisc up')
10 > but some times I got an strange ip
11 > The questions are
12 > What the promisc means?
13 >
14 > I can't understand for really the bridge concepts .. I just know that you
15 > attach
16 > cards to it, but can't understand how it route things
17 >
18 > cheers
19 > --
20 > "Do or do not... there is no try" Yoda Master
21
22 Well, in principle, a bridge acts like a switch or a hub, so there's
23 no real 'routing', though when it knows which 'port' a given MAC
24 address is on the other end of, it'll likely avoid sending traffic
25 headed towards that MAC to the other endpoints (as a switch does).
26
27 With regard to the trouble you're seeing, I've had more issues than I
28 can clearly recall with bridging and wireless cards when I've tried,
29 and it may be a similar roadblock that you're running into there. If
30 you don't need each VM to be 'local' to the network you're on, you
31 might be better off using NAT to interface the internal network of VMs
32 with the outside world.
33
34 'promisc' means that the interface is in promiscuous mode. Promiscuous
35 mode recieves every ethernet frame to handle them rather than only
36 accepting frames that are targetted for the interface's MAC address,
37 which then allows all of that traffic to be forwarded across the
38 bridge to other networks.
39
40 There's a very good writeup on bridges, how they work, common issues,
41 and a fairly extensive FAQ at the link below:
42
43 [1] http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge
44
45 --
46 Poison [BLX]
47 Joshua M. Murphy