|
From: Owain E. <tom...@ya...> - 2003-06-10 11:03:22
|
Hello again! I've been playing with bridging two networks each with the same subnet to see if it makes lan gaming easier. So far I've managed to get some of the way, but I'm still at a loss. The network setup in my head is as follows: I have 2 routers Router A and Router B both have the internet connection on eth0 and the internal network on eth1. I now place a tap0 tunnel from Router A to Router B (via eth0). I now bridge tap0 and eth1 together as br0 on both routers and give br0 the same ip address 192.168.0.1 on both sides. This tunnel comes up fine, I can ping across the network, but then my understanding falls appart as I have no idea if my routing tables are set up correctly, also do I have to give br0 a different ip address on the different routers. Or are there mistakes in my script.up below? Thanks, Owain Evans #!/bin/bash #NETWORK A # Give our bridge a name BRIDGE=br0 # The internal interface which we want to do the VPN with INTIF=eth1 ifconfig $1 10.2.0.1 netmask 255.255.255.0 mtu $2 #Create the bridge device brctl addbr $BRIDGE #Added the VPN tunnel and the internal interface to it brctl addif $BRIDGE $1 brctl addif $BRIDGE $INTIF #Take both tap an int iface down ifconfig $1 down ifconfig $INTIF down #Bring both tap and int iface back up with no ip ifconfig $1 0.0.0.0 up ifconfig $INTIF 0.0.0.0 up #Bring up the bridge device with the chosen ip ifconfig $BRIDGE down ifconfig $BRIDGE 192.168.0.1 netmask 255.255.255.0 mtu $2 up |