LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-20-2007, 11:08 AM   #1
PsychoGTI
LQ Newbie
 
Registered: Jul 2007
Posts: 3

Rep: Reputation: 0
Network Bridge Setup Issue


Hello Everyone!

I'm running Suse 10.0, and am trying to setup a VPN and need to bridge my eth0 interface on my local LAN to a tap0 interface for the VPN. I have installed the bridge-utils package in order to do this, and am running the following script in order to setup the bridge:

Code:
# Define Bridge Interface
br="br0"

# Define list of TAP interfaces to be bridged,
# for example tap="tap0 tap1 tap2".
tap="tap0"

# Define physical ethernet interface to be bridged
# with TAP interface(s) above.
eth="eth0"
eth_ip="192.168.1.110"
eth_netmask="255.255.255.128"
eth_broadcast="192.168.1.127"

for t in $tap; do
	openvpn --mktun --dev $t
done

brctl addbr $br
brctl addif $br $eth

for t in $tap; do
	brctl addif $br $t
done

for t in $tap; do
	ifconfig $t 0.0.0.0 promisc up
done

ifconfig $eth 0.0.0.0 promisc up

ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast
Here's a before and after shot of my ifconfig:
Code:
Before:
eth0	  Link encap:Ethernet  HWaddr 00:13:D4:6C:F7:9A  
		  inet addr:192.168.1.110  Bcast:192.168.1.127  Mask:255.255.255.128
		  inet6 addr: fe80::213:d4ff:fe6c:f79a/64 Scope:Link
		  UP BROADCAST NOTRAILERS RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
		  RX packets:141228 errors:0 dropped:0 overruns:0 frame:0
		  TX packets:256980 errors:0 dropped:0 overruns:0 carrier:0
		  collisions:0 txqueuelen:1000 
		  RX bytes:15545992 (14.8 Mb)  TX bytes:31405601 (29.9 Mb)
		  Interrupt:193 

lo		Link encap:Local Loopback  
		  inet addr:127.0.0.1  Mask:255.0.0.0
		  inet6 addr: ::1/128 Scope:Host
		  UP LOOPBACK RUNNING  MTU:16436  Metric:1
		  RX packets:397614 errors:0 dropped:0 overruns:0 frame:0
		  TX packets:397614 errors:0 dropped:0 overruns:0 carrier:0
		  collisions:0 txqueuelen:0 
		  RX bytes:31398802 (29.9 Mb)  TX bytes:31398802 (29.9 Mb)

After:
br0	   Link encap:Ethernet  HWaddr 00:13:D4:6C:F7:9A  
		  inet addr:192.168.1.110  Bcast:192.168.1.127  Mask:255.255.255.128
		  inet6 addr: fe80::213:d4ff:fe6c:f79a/64 Scope:Link
		  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
		  RX packets:224 errors:0 dropped:0 overruns:0 frame:0
		  TX packets:428 errors:0 dropped:0 overruns:0 carrier:0
		  collisions:0 txqueuelen:0 
		  RX bytes:21254 (20.7 Kb)  TX bytes:69896 (68.2 Kb)

eth0	  Link encap:Ethernet  HWaddr 00:13:D4:6C:F7:9A  
		  inet6 addr: fe80::213:d4ff:fe6c:f79a/64 Scope:Link
		  UP BROADCAST NOTRAILERS RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
		  RX packets:142462 errors:0 dropped:0 overruns:0 frame:0
		  TX packets:259029 errors:0 dropped:0 overruns:0 carrier:0
		  collisions:0 txqueuelen:1000 
		  RX bytes:15677159 (14.9 Mb)  TX bytes:31676506 (30.2 Mb)
		  Interrupt:193 

lo		Link encap:Local Loopback  
		  inet addr:127.0.0.1  Mask:255.0.0.0
		  inet6 addr: ::1/128 Scope:Host
		  UP LOOPBACK RUNNING  MTU:16436  Metric:1
		  RX packets:400928 errors:0 dropped:0 overruns:0 frame:0
		  TX packets:400928 errors:0 dropped:0 overruns:0 carrier:0
		  collisions:0 txqueuelen:0 
		  RX bytes:31687345 (30.2 Mb)  TX bytes:31687345 (30.2 Mb)

tap0	  Link encap:Ethernet  HWaddr 16:DE:9C:29:45:72  
		  inet6 addr: fe80::14de:9cff:fe29:4572/64 Scope:Link
		  UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
		  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
		  TX packets:0 errors:0 dropped:8 overruns:0 carrier:0
		  collisions:0 txqueuelen:0 
		  RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
For some reason, I can easily access other PC's on my internal 192.168.1.1 network and on the internet before the bridge, but then after I can only reach internal LAN PC's, and not resolve ANY external addresses. My new routing table looks like this:
Code:
Kernel IP routing table
Destination	 Gateway		 Genmask		 Flags Metric Ref	Use Iface
192.168.1.0	 *			   255.255.255.128 U	 0	  0		0 br0
192.168.1.0	 *			   255.255.255.128 U	 0	  0		0 eth0
link-local	  *			   255.255.0.0	 U	 0	  0		0 eth0
loopback		*			   255.0.0.0	   U	 0	  0		0 lo
default		 192.168.1.1	 0.0.0.0		 UG	0	  0		0 eth0
Or sometimes like this (seems kinda hokey):
Code:
Kernel IP routing table
Destination	 Gateway		 Genmask		 Flags Metric Ref	Use Iface
192.168.1.0	 *			   255.255.255.128 U	 0	  0		0 br0
loopback		*			   255.0.0.0	   U	 0	  0		0 lo
Is there some known bug for this? Am I doing anything blatantly wrong and just can't see it? I think I've got the commands in the correct order, but have no idea why I see the two different route tables from time to time. I've tried disabling my firewall completely, and messing around with the router setting as well.

Any help would be greatly appreciated. Thanks!
 
Old 07-24-2007, 08:28 PM   #2
PsychoGTI
LQ Newbie
 
Registered: Jul 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Any help would be appreciated.... I'm still fighting this problem. Does the script/command structure look right at least? Am I leaving anything out?

Thanks in advance!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Network bridge Mithrilhall Linux - Networking 7 01-21-2007 11:15 PM
How to bridge network connections myfokkinnick@yahoo.i Linux - Networking 2 06-02-2006 02:05 AM
Bridge simulating Network Lag, for developing network code for games intripoon Linux - Networking 18 10-27-2005 05:04 PM
network bridge Ryan450 Linux - Networking 1 08-26-2004 03:55 AM
Network bridge eqxro Linux - Networking 2 08-21-2004 07:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration