alex@zapad.msk.ru
v1.0, May 12, 2002
Revision History | ||
---|---|---|
Revision 1.0 | 2002-05-12 | Revised by: aa |
first release |
PC1 (192.168.0.1 /24)--| PC3 (192.168.0.3 /24)--| PC5 (192.168.0.5 /24)--|--[ eth0 - bridge_1 - eth1 (195.0.0.1) ] PC253 (192.168.0.253/24)--| | (192.168.0.2 /24) PC2 | (192.168.0.4 /24) PC4 [ (192.0.0.1) eth1 - bridge_2 - eth0 ] --| (192.168.0.6 /24) PC6 | (192.168.0.254/24) PC254 |
PopTop (PPTP server) - http://poptop.lineo.com
PPTP (Linux PPTP Client, by C.S. Ananian) - http://www.pdos.lcs.mit.edu/~cananian/Projects/PPTP/
tarpd (a trivial proxy arp daemon) - htp://www.cs.hut.fi/~tricky/utils/net/tarpd-1.6.tar.gz
You can also find them on http://www.freshmeat.net
Please, keep in mind that you need special patches for pppd and the kernel if you want to do MS Chap and MS Encryption (MPPE). Refer to the PoPTop manual for instructions on how to get and install these patches.
Connect your routers to Internet, or establish any other communication between them with the exception of IP.
Make a PPTP tunnel between them. There are example configurations in the PoPToP (server) and pptp (client) manuals.
Now you should have two bridges and an IP tunnel between then, possibly encrypted (refer to the PPP manual). Let's configure bridging.
Remember that the bridge is really a router, so we need to run the following commands on our bridges (this assumes bridge_1 and bridge_2 are IP addresses, assigned to each end of the PPTP tunnel between bridges):
bridge_1$ip route add 192.168.0.2 via bridge_2 bridge_1$ip route add 192.168.0.4 via bridge_2 bridge_1$ip route add 192.168.0.6 via bridge_2 bridge_1$ip route add 192.168.0.254 via bridge_2 bridge_1$ip route add 192.168.0.255 via bridge_2 |
On the other side:
bridge_2$ip route add 192.168.0.1 via bridge_1 bridge_2$ip route add 192.168.0.3 via bridge_1 bridge_2$ip route add 192.168.0.5 via bridge_1 bridge_2$ip route add 192.168.0.253 via bridge_1 |
This will tell each of bridges which hosts are on the other side. You can do the same with the old-style route command. It will look like:
bridge_1$route add -host 192.168.0.2 gw bridge_2 bridge_1$route add -host 192.168.0.4 gw bridge_2 bridge_1$route add -host 192.168.0.6 gw bridge_2 bridge_1$route add -host 192.168.0.254 gw bridge_2 bridge_1$route add -host 192.168.0.255 gw bridge_2 |
On the other side:
bridge_2$route add -host 192.168.0.1 gw bridge_1 bridge_2$route add -host 192.168.0.3 gw bridge_1 bridge_2$route add -host 192.168.0.5 gw bridge_1 bridge_2$route add -host 192.168.0.253 gw bridge_1 |
Please note once more that bridge_1 and bridge_2 are not IP addresses given by your ISP, but IP addresses which you assigned to each end of the PPTP tunnel.
Now you have two bridges and each of them knows where to find a particular IP. But how do you tell those computers to send their traffic for the remote network to the local bridge? You need tarpd.
tarpd is a very simple daemon, which replies to arp requests for certain IP addresses. You only need to run a tarpd on each bridge, and specify the list of IP addresses found on the remote end.
For example, for those two bridges you should run:
bridge_1$tarpd eth0 192.168.0.2 255.255.255.255 \ 192.168.0.4 255.255.255.255 \ 192.168.0.254 255.255.255.255 |
On the other side:
bridge_2$tarpd eth0 192.168.0.1 255.255.255.255 \ 192.168.0.3 255.255.255.255 \ 192.168.0.253 255.255.255.255 |
You specify 128 remote pairs (IP/mask. Mask should be 255.255.255.255 in order not to confuse tarpd!) on each bridge.
Enjoy your bridges!
Copyright © 2002 Alexander Alekseev
Copyright (C) 2000 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.
Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License".
If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.