Skip to contentSkip to conversation

Is bridgeing possible with kernel 2.6.10

Bridge Juergen Pfeiffer 4 participants 9 messages Jul 26, 2006 – Aug 14, 2006 Ethernet bridge

lore
Share & tools
lore
#0 lore raw

Hi

I didn't get bridgeing to work with Linux kernel 2.6.10 (coldfire 5485) yet. When i try to configure bridgeing with "brctl", everything seems to be ok, but i if i try to ping through my bridge, i see ARP-Request arriving on the other side, but the ARP-Responses do not go back through the bridge.
Now i could read in "http://www.tldp.org/HOWTO/Ethernet-Bridge-netfilter-HOWTO-2.html#ss2.1"
that "Use of kernel 2.6 is not yet a good idea".
So do i have a change to get it working?

Thank You

Signature · 15 lines
------------------------------------------------------------------------
Jürgen Pfeiffer 	
	
	* _mailto:[email protected]_
SesKion Softwareentwicklung und System Konzeption GmbH 	
	
	( : +49-711-9905814
Karlsruher Str. 11/1 	
	
	Fax: +49-711-9905827
D-70771 Leinfelden-Echterdingen 	
	
	1 _http://www.seskion.de_

------------------------------------------------------------------------
#1 lore raw
Quoted 7 lines · On Wed, 26 Jul 2006 16:44:34 +0200 Juergen Pfeiffer <[email protected]>…

Hi

I didn't get bridgeing to work with Linux kernel 2.6.10 (coldfire 5485) yet. When i try to configure bridgeing
with "brctl", everything seems to be ok, but i if i try to ping through my bridge, i see ARP-Request arriving on the other side, but the ARP-Responses do not go back through the bridge.

Did the bridge get set up right? Did the interfaces come up (look at 'brctl showstp br0') The bridge is sensitive to the network devices reporting carrier properly, so a bad network driver or card will make it not work.

Quoted 3 lines

Now i could read in "http://www.tldp.org/HOWTO/Ethernet-Bridge-netfilter-HOWTO-2.html#ss2.1" that "Use of kernel 2.6 is not yet a good idea".

That's crap. 2.6 works great.
2.4 is now in frozen hibernation mode, there are bugs in there that are not going to ever be fixed.

Quoted 2 lines

So do i have a change to get it working?

#2 lore raw
Quoted 3 lines · Stephen Hemminger

Did the bridge get set up right? Did the interfaces come up (look at 'brctl showstp br0')

$ ifconfig eth0 0.0.0.0 down
$ ifconfig eth1 0.0.0.0 down
$ brctl addbr br0
$ brctl stp br0 on
$ brctl addif br0 eth0
$ brctl addif br0 eth1
$ ifconfig eth0 0.0.0.0 up
$ ifconfig eth1 0.0.0.0 up
$ ifconfig br0 0.0.0.0 up
$ brctl showmacs br0
port no mac addr                is local?       ageing timer
 1     00:11:22:33:44:50       yes                0.00
 2     00:11:22:33:44:51       yes                0.00
 2     00:11:95:34:af:01       no                 2.91
 2     00:c0:02:39:53:52       no                 2.76
$ brctl showstp br0
br0
bridge id              8000.001122334450
designated root        8000.001122334450
root port                 0                    path cost                  0
max age                  20.00                 bridge max age            20.00
hello time                2.00                 bridge hello time          2.00
forward delay            15.00                 bridge forward delay      15.00
ageing time             300.00
hello timer               1.45                 tcn timer                  0.00
topology change timer     0.00                 gc timer                 273.04
flags

eth0 (1)

port id                8001                    state                  learning
designated root        8000.001122334450       path cost                100
designated bridge      8000.001122334450       message age timer          0.00
designated port        8001                    forward delay timer        3.48
designated cost           0                    hold timer                 0.44

flags

eth1 (2)

port id                8002                    state                  learning
designated root        8000.001122334450       path cost                100
designated bridge      8000.001122334450       message age timer          0.00
designated port        8002                    forward delay timer        3.45
designated cost           0                    hold timer                 0.43

flags

Quoted 4 lines

The bridge is sensitive to the network devices reporting carrier properly, so a bad network driver or card will make it not work.

Signature · 15 lines
------------------------------------------------------------------------
Jürgen Pfeiffer 	
	
	* _mailto:[email protected]_
SesKion Softwareentwicklung und System Konzeption GmbH 	
	
	( : +49-711-9905814
Karlsruher Str. 11/1 	
	
	Fax: +49-711-9905827
D-70771 Leinfelden-Echterdingen 	
	
	1 _http://www.seskion.de_

------------------------------------------------------------------------
#3 lore raw
Quoted 51 lines · On Wed, 26 Jul 2006 18:26:03 +0200 Juergen Pfeiffer <[email protected]>…
Quoted 3 lines · Stephen Hemminger

Did the bridge get set up right? Did the interfaces come up (look at 'brctl showstp br0')

$ ifconfig eth0 0.0.0.0 down
$ ifconfig eth1 0.0.0.0 down
$ brctl addbr br0
$ brctl stp br0 on
$ brctl addif br0 eth0
$ brctl addif br0 eth1
$ ifconfig eth0 0.0.0.0 up
$ ifconfig eth1 0.0.0.0 up
$ ifconfig br0 0.0.0.0 up
$ brctl showmacs br0
port no mac addr                is local?       ageing timer
  1     00:11:22:33:44:50       yes                0.00
  2     00:11:22:33:44:51       yes                0.00
  2     00:11:95:34:af:01       no                 2.91
  2     00:c0:02:39:53:52       no                 2.76
$ brctl showstp br0
br0
 bridge id              8000.001122334450
 designated root        8000.001122334450
 root port                 0                    path
cost                  0 max age
20.00                 bridge max age            20.00
 hello time                2.00                 bridge hello 
time          2.00
 forward delay            15.00                 bridge forward 
delay      15.00
 ageing time             300.00
 hello timer               1.45                 tcn 
timer                  0.00
 topology change timer     0.00                 gc
timer 273.04
 flags

eth0 (1)
port id 8001
state learning
designated root 8000.001122334450 path
cost 100 designated bridge
8000.001122334450 message age timer 0.00
designated port 8001 forward delay
timer 3.48
designated cost 0 hold
timer 0.44
flags

Quoted 12 lines

eth1 (2)
port id 8002
state learning
designated root 8000.001122334450 path
cost 100 designated bridge
8000.001122334450 message age timer 0.00
designated port 8002 forward delay
timer 3.45
designated cost 0 hold
timer 0.43
flags

The bridge starts in the learning state doesn't forward until the forwarding delay (30 seconds) in expired. You need to be either patient or set the delay to a lower value.

#4 lore raw
Quoted 6 lines · Stephen Hemminger

The bridge starts in the learning state doesn't forward until the forwarding delay (30 seconds) in expired. You need to be either patient or set the delay to a lower value.

Hi
Here is the trace of my test:
After the output of "now do pings!", i started to ping on computer 192.168.1.1 (MAC=00:50:fc:93:e0:9c), connected to eth1 of my bridge to computer 192.168.1.33 (MAC=00:14:22:f2:5d:70), connected to eth0 of my bridge. => No Responses! May it be a problem of my ethernet driver (drivers/net/fec.c for Freescale ColdFire 5485) ??

*$ /mnt/mtd/startbridge*
+ ifconfig eth0 0.0.0.0 down
+ ifconfig eth1 0.0.0.0 down
+ brctl addbr br0
+ brctl stp br0 on
+ brctl addif br0 eth0
device eth0 entered promiscuous mode
+ brctl addif br0 eth1
device eth1 entered promiscuous mode
+ ifconfig eth0 0.0.0.0 up
+ ifconfig eth1 0.0.0.0 up
+ ifconfig br0 0.0.0.0 up
br0: port 2(eth1) entering listening state
br0: port 1(eth0) entering listening state
+ sleep 35
br0: port 2(eth1) entering learning state
br0: port 1(eth0) entering learning state
br0: topology change detected, propagating
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(eth0) entering forwarding state
+ echo 'now do pings!'
now do pings!
+ sleep 10
+ brctl show

bridge name     bridge id               STP enabled     interfaces
br0             8000.001122334450       yes             eth0
                                                       eth1
+ brctl showmacs br0
port no mac addr                is local?       ageing timer
 1     00:11:22:33:44:50       yes                0.00
 2     00:11:22:33:44:51       yes                0.00
*  1     00:14:22:f2:5d:70       no                10.13*
 2     00:40:05:41:12:8d       no                 4.52
*  2     00:50:fc:93:e0:9c       no                 0.38
*  2     00:c0:02:39:53:52       no                 7.88

+ brctl showstp br0
br0
bridge id 8000.001122334450
designated root 8000.001122334450

root port                 0                    path cost                  0
max age                  20.00                 bridge max age            20.00
hello time                2.00                 bridge hello time          2.00
forward delay            15.00 b               rbr0id:ge  fporowarrdt d el2ay(1

d a geeinng ttiemer i 3n00g.0 0
tihesllao btilmeer d s0.t61a t tecn
o imberr 0 : 0 .0p0
l rtotpo lo1gy( cehatnghe 0ti)me r e n19t.7e0 r igcn tg8
_Cefldag s s tTOaPOtLOeGY
HANGE TOPOLOGY_CHANGE_DETECTED

eth0 (1)
port id 8001 state forwarding
pdesignated root d80e00v.0i01c12e23 34e45t0 hpa1th closet f 0
34rdeosimgniatsedc buriodgue s80 00m.0o01d12e23
h 45b0 rme0ss:ag e pagoe rtitme r 2 ( 0e.0t0
1de)si gneatnedt peorrt i80n01g fdoriwasrda
dbellaye tde
d
esignated cost 0 hold
timer 0.00
flags

eth1 (2)
port id 8002 state forwardidne
v diescigena teed trohot0 8 00l0.e00f11t22 33p44r50o pmatih scocstu s
d dmesoigdnaete
brbidrge0 8:00 0.p00o11r22t33 44150( meestsahge0 a)ge
teimnert n
ded esdiginastead bpolrte 8d00 2 s tfoarwtared
lay timer 0.00
designated cost 0 hold timer 0.00
flags

+ ifconfig
br0 Link encap:Ethernet HWaddr 00:11:22:33:44:50
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:24 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:1499 (1.4 KiB) TX bytes:0 (0.0 B)

eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:50
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 *RX packets:85* errors:0 dropped:0 overruns:0 frame:0 TX packets:229 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:7232 (7.0 KiB) TX bytes:26956 (26.3 KiB) Interrupt:103 Base address:0x9000

eth1 Link encap:Ethernet HWaddr 00:11:22:33:44:51
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:946 errors:0 dropped:0 overruns:0 frame:0 TX packets:93 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:167451 (163.5 KiB) TX bytes:62a3 (6.1 KiB) Interrupt:102 Base address:0x9800

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:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0
RX bytes:268 (268.0 B) TX bytes:268 (268.0 B)

+ ifconfig br0 down
+ brctl delif br0 eth1
+ brctl delif br0 eth0
+ brctl delbr br0
+ ifconfig eth1 0.0.0.0 down
+ ifconfig eth0 0.0.0.0 down
*$
*

Signature · 15 lines
------------------------------------------------------------------------
Jürgen Pfeiffer 	
	
	* _mailto:[email protected]_
SesKion Softwareentwicklung und System Konzeption GmbH 	
	
	( : +49-711-9905814
Karlsruher Str. 11/1 	
	
	Fax: +49-711-9905827
D-70771 Leinfelden-Echterdingen 	
	
	1 _http://www.seskion.de_

------------------------------------------------------------------------
#5 lore raw
Quoted 8 lines

Hi
Here is the trace of my test:
After the output of "now do pings!", i started to ping on computer 192.168.1.1 (MAC=00:50:fc:93:e0:9c), connected to eth1 of my bridge to computer 192.168.1.33 (MAC=00:14:22:f2:5d:70), connected to eth0 of my bridge.
=> No Responses! May it be a problem of my ethernet driver (drivers/net/fec.c for Freescale ColdFire 5485) ??

Perhaps you have a switch or driver issue that is preventing promiscuous mode from working. You can test this without bridging by running tcpdump on the interface and seeing if the packets are coming in.

#6 lore raw
In reply to Stephen Hemminger

Op wo, 26-07-2006 te 08:34 -0700, schreef Stephen Hemminger:

Quoted 15 lines
Quoted 7 lines · On Wed, 26 Jul 2006 16:44:34 +0200 Juergen Pfeiffer <[email protected]>…

Hi

I didn't get bridgeing to work with Linux kernel 2.6.10 (coldfire 5485) yet. When i try to configure bridgeing
with "brctl", everything seems to be ok, but i if i try to ping through my bridge, i see ARP-Request arriving on the other side, but the ARP-Responses do not go back through the bridge.

Did the bridge get set up right? Did the interfaces come up (look at 'brctl showstp br0') The bridge is sensitive to the network devices reporting carrier properly, so a bad network driver or card will make it not work.

Quoted 7 lines
Quoted 3 lines

Now i could read in "http://www.tldp.org/HOWTO/Ethernet-Bridge-netfilter-HOWTO-2.html#ss2.1" that "Use of kernel 2.6 is not yet a good idea".

That's crap. 2.6 works great.
2.4 is now in frozen hibernation mode, there are bugs in there that are not going to ever be fixed.

That document is completely outdated and the author never got around to updating it even after some correspondence with me (year(s) ago).

cheers,
Bart

#7 lore raw
In reply to Juergen Pfeiffer

Jivin Juergen Pfeiffer lays it down ...

Quoted 11 lines

Hi

I didn't get bridgeing to work with Linux kernel 2.6.10 (coldfire 5485) yet. When i try to configure bridgeing
with "brctl", everything seems to be ok, but i if i try to ping through my bridge, i see ARP-Request arriving on the other side, but the ARP-Responses do not go back through the bridge.
Now i could read in "http://www.tldp.org/HOWTO/Ethernet-Bridge-netfilter-HOWTO-2.html#ss2.1" that "Use of kernel 2.6 is not yet a good idea".
So do i have a change to get it working?

One of the guys here has been testing bridging with 2.6.17 from the uClinux-dist and it is working fine. Probably can't offer you much more than that though,

Cheers,
Davidm

Signature · 2 lines
David McCullough,  [email protected],   Ph:+61 734352815
Secure Computing - SnapGear  http://www.uCdot.org http://www.cyberguard.com
#8 lore raw
In reply to Juergen Pfeiffer
Quoted 6 lines · Juergen Pfeiffer

Hi

I didn't get bridgeing to work with Linux kernel 2.6.10 (coldfire 5485) yet. When i try to configure bridgeing with "brctl", everything seems to be ok, but i if i try to ping through my bridge, i see ARP-Request arriving on the other side, but the ARP-Responses do not go back through the bridge.

Now i found the error in the coldfire specific ethernet driver: "drivers/net/fec/fec.c" The driver did not set Promiscuouse Mode correct in Hardware Registers:

function fec_set_multicast_list() with error:
*void fec_set_multicast_list(struct net_device *dev) {
// Pointer to the address list
struct dev_mc_list *dmi;

unsigned int crc, data;
int i, j, k;

   // Receive the base address
   unsigned long base_addr = (unsigned long) dev->base_addr;

if (dev->flags & IFF_PROMISC || dev->flags & IFF_ALLMULTI)

   {
       // Allow all incoming frames
       FEC_GALR(base_addr) = 0xFFFFFFFF;
       FEC_GAUR(base_addr) = 0xFFFFFFFF;
       return;

}
...
*

function fec_set_multicast_list() correct:
*void fec_set_multicast_list(struct net_device *dev) {
// Pointer to the address list
struct dev_mc_list *dmi;

unsigned int crc, data;
int i, j, k;

   // Receive the base address
   unsigned long base_addr = (unsigned long) dev->base_addr;

if (dev->flags & IFF_PROMISC)

   {
       // Allow all incoming frames
       if ((FEC_RCR(base_addr) & FEC_RCR_PROM)==0) {
           FEC_ECR(base_addr) &= ~FEC_ECR_ETHEREN;
           FEC_RCR(base_addr) |= FEC_RCR_PROM;
           FEC_ECR(base_addr) |= FEC_ECR_ETHEREN;
       }
       return;
   }
   if ((FEC_RCR(base_addr) & FEC_RCR_PROM)!=0) {
       FEC_ECR(base_addr) &= ~FEC_ECR_ETHEREN;
       FEC_RCR(base_addr) &= ~FEC_RCR_PROM;
       FEC_ECR(base_addr) |= FEC_ECR_ETHEREN;
   }
   if (dev->flags & IFF_ALLMULTI)
   {
       // Allow all incoming frames
       FEC_GALR(base_addr) = 0xFFFFFFFF;
       FEC_GAUR(base_addr) = 0xFFFFFFFF;
       return;

}
...
*

after this the bridge worked fine!

Signature · 15 lines
------------------------------------------------------------------------
Jürgen Pfeiffer 	
	
	* _mailto:[email protected]_
SesKion Softwareentwicklung und System Konzeption GmbH 	
	
	( : +49-711-9905814
Karlsruher Str. 11/1 	
	
	Fax: +49-711-9905827
D-70771 Leinfelden-Echterdingen 	
	
	1 _http://www.seskion.de_

------------------------------------------------------------------------