LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Network bridge problem (https://www.linuxquestions.org/questions/linux-networking-3/network-bridge-problem-379480/)

paddyjoy 11-03-2005 12:47 AM

Network bridge problem
 
I have two network cards in my pc, eth0 and eth1, both connected to a router/DHCP server. I'm using the following commands to set up a network bridge between eth1 and tap0 (openvpn device).

Starting with all interfaces down:

I run the following commands
Code:


openvpn --mktun --dev tap0

brctl addbr br0
brctl addif br0 eth1
brctl addif br0 tap0

ifconfig tap0 0.0.0.0 promisc up

ifconfig eth1 0.0.0.0 promisc up

ifconfig br0 192.168.17.146 netmask 255.255.255.0 broadcast 192.168.17.155

This bit works fine but it seems like the bridge isn't working, basically I can't ping anything.

Now for the strange bit :) If I bring up eth0 with ifup eth0 everything starts working fine, even if I bring eth0 back down and pull the cable out of the network card everything continues to work!

My theory is that when I bring up eth0 using the DHCP server in the router it gets extra information gateway etc.. that isn't present when I just bring the bridge up with

Code:

ifconfig br0 192.168.17.146 netmask 255.255.255.0 broadcast 192.168.17.155
Does this make sense? Does anyone have any ideas how I can get around this problem?

Paddy

Interlaced 11-03-2005 12:52 AM

Thats an interesting broadcast address u have there, set it to .255 on the last octet and see if that helps.

paddyjoy 11-03-2005 01:00 AM

Thanks I would have never noticed that :) What does the broadcast address do? I'll have to try it out later and see if it fixes anything.

Interlaced 11-03-2005 01:02 AM

Well my memory isnt serving me to well so i cant remember but i no its some sort of ip address broadcast (yea of course duh) im not to sure if it is related to an arp broadcast or not, but it may well be the problem, either way the address u were setting for the broadcast, the last octet was not an actual address reserved for broadcasting like 255, not sure if it would make a difference or not, but yea give it a shot

paddyjoy 11-03-2005 05:46 AM

Thanks for the idea but unfortunately it didn't work, still have to bring up eth0 before I can get the bridge to work. :scratch:

Paddy


All times are GMT -5. The time now is 12:57 AM.