Gentoo Archives: gentoo-user

From: "Steve [Gentoo]" <gentoo_steve@×××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Bridge confusion
Date: Mon, 10 Oct 2005 14:37:39
Message-Id: 434A7B9B.6060203@shic.co.uk
In Reply to: [gentoo-user] Bridge confusion by Patrick Marquetecken
1 Patrick Marquetecken wrote:
2 > I hope that someone on this list can help me to clarify bridging.
3 >
4 I'll give that a go... someone is bound to correct me if I give you a
5 partial truth. :-)
6
7 I'll start by saying that the point of a bridge (in the context of
8 Ethernet networks at least) is to allow packets of any protocol type to
9 be copied between two otherwise separate networks. A bridge is a
10 low-level software strategy to copy all packets from one broadcast
11 network to another. When working with IP, it is important to have a
12 consistent addressing scheme - which, from your diagram, it seems you
13 haven't. I'll try a bit of ASCII art too to describe a sane situation
14 in which GW_PC might be required to implement a bridge.:
15
16 LAN1(10.32.1.0/8) LAN2 (10.32.2.0/8)
17
18 |
19 +--PC1A(10.32.1.4)
20 |
21 +--PC1B(10.32.1.3) PC2A(10.32.2.1)--+
22 | |
23 +--PC1C(10.32.1.2) PC2B(10.32.2.1)--+
24 | |
25 +-----(10.32.1.1)---GW_PC---(10.32.2.1)-----+
26
27
28 Here I've illustrated 2 subnets - LAN1 : 10.32.1.0/8 (i.e. 256 addresses
29 starting 10.32.1) and LAN2 : 10.32.2.0/8 (i.e. 256 addresses starting
30 10.32.2.) LAN1 has PC1A, PC1B, PC1C and GW_PC as connected hosts.
31 LAN2 has PC2A, PC2B and GW_PC as connected hosts. GW_PC might be a
32 Gentoo box (or pretty much any computer you like, or a single-purpose
33 device. If GW_PC is a computer it will have two network cards - (for
34 example, eth0 and eth1) and the GW_PC retransmits all packets from LAN1
35 ont LAN2 and vice-versa - hence allowing the two otherwise separate
36 subnets to behave as if they were a single subnet. I use this strategy
37 to bridge between my wired and wireless networks at home with my Gentoo
38 PC participating in both wired and wireless networks.
39
40 It is important to realise that in copying LAN1's packets to LAN2 (and
41 vice versa) that this will increase network load for both subnets - so
42 strategic care is required before deciding to bridge. An alternative is
43 to route packets between the two subnets LAN1 and LAN2 - GW_PC would
44 inspect the packets and decide if the destination PC is on the other LAN
45 before transmitting the packet again and consuming bandwidth on both
46 LANs. Routing works well for many things (for example TCP based
47 protocols) but not for all broadcast services which (without a bridge)
48 are often restricted to a single subnet.
49
50 I hope that helps?
51
52 Steve
53
54 > This is the setup i want:
55 >
56 > Lan 1 Lan 2
57 > eth1-----------brigde----------------eth1
58 > | |
59 > 10.32.0.0/22 10.32.0.0/22
60 > | |
61 > eth0 (10.32.3.10)-------------------eth0 (10.32.3.11)
62 >
63 >
64 > So the questing is, must i add eth0 and eth1 of the same machine to the
65 > same bridge device to get it working, or is eth1 enough ?
66 >
67 >
68
69
70 --
71 gentoo-user@g.o mailing list