LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bridge not working (https://www.linuxquestions.org/questions/linux-newbie-8/bridge-not-working-4175427375/)

sumitnegi 09-15-2012 08:15 AM

Bridge not working
 
Hi ,

We want to create bridge(mybridge)on our board over eth0 and eth1 interface, on board we are running linux 2.6.34.9.

Following are the commands

brctl addbr mybridge
ifconfig eth1 0.0.0.0
ifconfig eth0 0.0.0.0
brctl addif mybridge eth1
brctl addif mybridge eth0
ifconfig mybridge up

PC-----ETH1-----mybridge-------ETH0

when we ping the board from PC,we are able to receive packet on eth1 (eth1 rx counter increasing ),but they are not getting transfered to mybridge ,since rxcounter of mybridge is not increasing .
After little search on net we found that
mybridge is getting up but not going to RUNNING mode unless it goes to RUNNING bridge wont work.

Below we are pasted our ifconfig result ,can any please let us know what is the problem why mybridge is not showing RUNNING


/ # ifconfig
eth0 Link encap:Ethernet HWaddr BC:9A:78:56:34:12
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth1 Link encap:Ethernet HWaddr 00:E0:0C:BC:E0:00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:101 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7200 (7.0 KiB) TX bytes:126 (126.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

mybridge Link encap:Ethernet HWaddr 00:E0:0C:BC:E0:00
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Any sort of input will be of great help, Thanks in advance

Thanks & Regards
Sumit

jschiwal 09-16-2012 06:16 PM

Did you enable bridging in the kernel?
http://www.linuxfoundation.org/colla...nd_Firewalling

sumitnegi 09-17-2012 01:11 AM

Yes we have followed the same link :

1) We enabled networking -> 802.1d Ethernet Bridging on our board kernel

2) While intalling bridge utility on PC (ubuntu) we used following command
sudo apt-get install bridge-utils

3) We are running our card over NFS

4) By using following command we bridged our wireless and Lan port on PC

system("sudo ifconfig eth0 0.0.0.0");
system("sudo ifconfig wlan0 0.0.0.0");
system("sudo brctl addbr mybridge");
system("sudo brctl addif mybridge eth0");
system("sudo brctl addif mybridge wlan0");
system("sudo ifconfig mybridge 192.168.1.45 netmask 255.255.255.0");
system("sudo ifconfig mybridge up");

and following is the ifconfig result on PC
eth0 Link encap:Ethernet HWaddr 00:17:7c:0f:02:1c
inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::217:7cff:fe0f:21c/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:7476 errors:0 dropped:0 overruns:0 frame:0
TX packets:10917 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:475304 (475.3 KB) TX bytes:8831390 (8.8 MB)
Interrupt:43 Base address:0xe000

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:250 errors:0 dropped:0 overruns:0 frame:0
TX packets:250 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:25103 (25.1 KB) TX bytes:25103 (25.1 KB)

mybridge Link encap:Ethernet HWaddr 00:17:7c:0c:bf:44
inet addr:192.168.1.45 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::217:7cff:fe0c:bf44/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:68 errors:0 dropped:0 overruns:0 frame:0
TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5492 (5.4 KB) TX bytes:11283 (11.2 KB)

wlan0 Link encap:Ethernet HWaddr 00:17:7c:0c:bf:44
inet6 addr: fe80::217:7cff:fe0c:bf44/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9489 errors:0 dropped:586 overruns:0 frame:0
TX packets:4259 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2904562 (2.9 MB) TX bytes:568653 (568.6 KB)

From here we can see that mybridge is showing RUNNING while in our board case we are not finding it RUNNING ,we have assigned IP to it but same result ,below is the link which mention the bridge should be in RUNNING.

http://www.microhowto.info/troublesh..._on_linux.html

Any sort of input will be of great help, Thanks in advance

Thanks & Regards
Sumit

sumitnegi 09-17-2012 03:46 AM

we would like add further
that

kernel running on PC ---- 3.0.0-24-generic

kernel running on Board ---- 2.6.39.4

Can there be any kernel issue like we need to add any patch to 2.6.39.4

Any sort of input will be of great help, Thanks in advance

Thanks & Regards
Sumit

gdejonge 09-17-2012 07:16 AM

The only difference is, you gave the bridge a IP address in the second example, which you didn't in the first one. Maybe you should try that first.

sumitnegi 09-17-2012 08:22 AM

Ya we tried with that also but same result

jschiwal 09-19-2012 06:56 AM

How did you test it? Try to access a host on one side of the bridge feom the other. Examine the kernel logs for clues.

Please post information on the NIC devices used in the bridge. The howto mentions some devices (mostly wireless however) that don't support monitoring.

Double check the sysctl kernel settings. Did you invert the values!


All times are GMT -5. The time now is 09:32 PM.