X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=examples%2Fbridging.mdwn;h=c7c0d8f22cec026e34037f49c61d1b92ee2c39aa;hb=f70abbf074d7ec0ca23c63b9a33ab363a2d95928;hp=ca5e6ec85b016607db18c9440ca42798f665ef25;hpb=7c74a57cd95cfc0358fdd5980d9170ea16751dfb;p=wiki diff --git a/examples/bridging.mdwn b/examples/bridging.mdwn index ca5e6ec..c7c0d8f 100644 --- a/examples/bridging.mdwn +++ b/examples/bridging.mdwn @@ -15,6 +15,11 @@ In switch and hub mode, broadcast packets are broadcast to other daemons and in order to route packets. With these mode tinc can be used to act as a bridge between two or more Ethernet segments. +Bridging allows all nodes in the VPN to share the same subnet. However, if +this is the only reason for bridging, and you do not need to tunnel broadcast +or non-IP packets, you can alternatively use [[proxy ARP|examples/proxy-arp]] +instead of bridging. + ### Overview The network setup is as follows: @@ -84,7 +89,7 @@ required if tinc was replaced with an actual switch or hub. ### Configuration of tinc -Note that switch' and hub' mode do not utilize the Subnet variable in the host +Note that switch and hub mode do not utilize the Subnet variable in the host files. Instead, any packet received by the bridge interface will be passed to the TUN/TAP device for processing. If your tinc instance is running in hub mode, all packets are forwarded to the remote tinc instance. In switch mode, @@ -93,16 +98,15 @@ forwarded to the remote tinc instance. > host# cat /etc/tinc/vpn/tinc.conf > Name = segment1 -> Device = /dev/tun > Mode = switch > ConnectTo = segment2 > > host# cat /etc/tinc/vpn/tinc-up > #!/bin/sh > -> ifconfig vpn 0.0.0.0 -> brctl addif bridge vpn -> ifconfig vpn up +> ifconfig $INTERFACE 0.0.0.0 +> brctl addif bridge $INTERFACE +> ifconfig $INTERFACE up > > host# ls /etc/tinc/vpn/hosts > segment1 segment2 ...