All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bridge] Possibility of  copying over fdb entries.
@ 2005-06-28  6:40 munro
  2005-06-28 16:48 ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: munro @ 2005-06-28  6:40 UTC (permalink / raw)
  To: bridge



Hi, all,

I wish to copy over fdb(forwarding database  entries) learnt over from 
one interface  onto  as  they are from another interface.

Like for eg :
 brctl showmacs br0
port no mac addr                is local?       ageing timer
  1     00:30:1a:01:6f:e4       no                 0.46
  1     00:30:1a:1c:3d:b7       yes                0.00
  2     00:30:1a:1c:3d:b8       yes                0.00

Instead of the above in line 1 if i wish to forcefully add mac  "  
00:30:1a:01:6f:e4 "  from port 2 instated of port 1.


Do i need to create a separate ioctl for it from the brctl to the kernel 
code or is thier some provision for doing it.


Regards,
Munro.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bridge] Possibility of  copying over fdb entries.
  2005-06-28  6:40 [Bridge] Possibility of copying over fdb entries munro
@ 2005-06-28 16:48 ` Stephen Hemminger
  2005-06-29  3:41   ` munro
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2005-06-28 16:48 UTC (permalink / raw)
  To: munro; +Cc: bridge

On Tue, 28 Jun 2005 14:40:34 +0800
munro <munro.biswal@smartbridges.com> wrote:

> 
> 
> Hi, all,
> 
> I wish to copy over fdb(forwarding database  entries) learnt over from 
> one interface  onto  as  they are from another interface.
> 
> Like for eg :
>  brctl showmacs br0
> port no mac addr                is local?       ageing timer
>   1     00:30:1a:01:6f:e4       no                 0.46
>   1     00:30:1a:1c:3d:b7       yes                0.00
>   2     00:30:1a:1c:3d:b8       yes                0.00
> 
> Instead of the above in line 1 if i wish to forcefully add mac  "  
> 00:30:1a:01:6f:e4 "  from port 2 instated of port 1.

Why? What reason.

> Do i need to create a separate ioctl for it from the brctl to the kernel 
> code or is thier some provision for doing it.

Since all enhancements can be 2.6 only,
I would prefer a sysfs interface to an ioctl to do this.
You can add a store/write interface to /sys/class/net/brX/bridge/brforward
file.  The creative part is figuring out what the semantics should
be and getting the locking right.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bridge] Possibility of  copying over fdb entries.
  2005-06-28 16:48 ` Stephen Hemminger
@ 2005-06-29  3:41   ` munro
  2005-06-29 21:11     ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: munro @ 2005-06-29  3:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: bridge

Hi,

What is wish to do is
There are four interfaces here

              PC1---------------------| br0 
|if0-------------------if2|   br1 | ----------------------PC2
                                         |        
|if1------------------- if3|         |


br0 and br1- are two transperent bridges on separate devices.
if0 and if1 are two physical interfaces(ports) attached to each of the 
bridges on  either side.

What i intend to do is to redirect all traffic coming  towards  br0  
from PC1 through interface/port if1,  even if the source mac is learnt 
through if0 and the same on the other bridge br1 on the other device.  
Similarly, any traffic  coming from PC2  has to go through if2 instead 
of if3 before it enters br0. So in all, what i want to do is make the 
link from  br0 to br1 full duplex if the physical links are half-duplex.

Regards,
Munro.


Stephen Hemminger wrote:

>On Tue, 28 Jun 2005 14:40:34 +0800
>munro <munro.biswal@smartbridges.com> wrote:
>
>  
>
>>Hi, all,
>>
>>I wish to copy over fdb(forwarding database  entries) learnt over from 
>>one interface  onto  as  they are from another interface.
>>
>>Like for eg :
>> brctl showmacs br0
>>port no mac addr                is local?       ageing timer
>>  1     00:30:1a:01:6f:e4       no                 0.46
>>  1     00:30:1a:1c:3d:b7       yes                0.00
>>  2     00:30:1a:1c:3d:b8       yes                0.00
>>
>>Instead of the above in line 1 if i wish to forcefully add mac  "  
>>00:30:1a:01:6f:e4 "  from port 2 instated of port 1.
>>    
>>
>
>Why? What reason.
>
>  
>
>>Do i need to create a separate ioctl for it from the brctl to the kernel 
>>code or is thier some provision for doing it.
>>    
>>
>
>Since all enhancements can be 2.6 only,
>I would prefer a sysfs interface to an ioctl to do this.
>You can add a store/write interface to /sys/class/net/brX/bridge/brforward
>file.  The creative part is figuring out what the semantics should
>be and getting the locking right.
>  
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bridge] Possibility of  copying over fdb entries.
  2005-06-29  3:41   ` munro
@ 2005-06-29 21:11     ` Stephen Hemminger
  2005-06-30  2:11       ` munro
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2005-06-29 21:11 UTC (permalink / raw)
  To: munro; +Cc: bridge

On Wed, 29 Jun 2005 11:41:59 +0800
munro <munro.biswal@smartbridges.com> wrote:

> Hi,
> 
> What is wish to do is
> There are four interfaces here
> 
>               PC1---------------------| br0 
> |if0-------------------if2|   br1 | ----------------------PC2
>                                          |        
> |if1------------------- if3|         |
> 
> 
> br0 and br1- are two transperent bridges on separate devices.
> if0 and if1 are two physical interfaces(ports) attached to each of the 
> bridges on  either side.
> 
> What i intend to do is to redirect all traffic coming  towards  br0  
> from PC1 through interface/port if1,  even if the source mac is learnt 
> through if0 and the same on the other bridge br1 on the other device.  
> Similarly, any traffic  coming from PC2  has to go through if2 instead 
> of if3 before it enters br0. So in all, what i want to do is make the 
> link from  br0 to br1 full duplex if the physical links are half-duplex.
> 
> Regards,
> Munro.

That would create a possible loop if the links are full duplex, and that
would be a disaster!  Maybe you could do what you want with the bonding
interface?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bridge] Possibility of  copying over fdb entries.
  2005-06-29 21:11     ` Stephen Hemminger
@ 2005-06-30  2:11       ` munro
  0 siblings, 0 replies; 5+ messages in thread
From: munro @ 2005-06-30  2:11 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: bridge

Hi,

How would it cause a loop. what i am trying is to possibly prevent a 
loop without using stp.

And Please let me know how bonding will help. I am a newbie in this arena.

regards



Stephen Hemminger wrote:

>On Wed, 29 Jun 2005 11:41:59 +0800
>munro <munro.biswal@smartbridges.com> wrote:
>
>  
>
>>Hi,
>>
>>What is wish to do is
>>There are four interfaces here
>>
>>              PC1---------------------| br0 
>>|if0-------------------if2|   br1 | ----------------------PC2
>>                                         |        
>>|if1------------------- if3|         |
>>
>>
>>br0 and br1- are two transperent bridges on separate devices.
>>if0 and if1 are two physical interfaces(ports) attached to each of the 
>>bridges on  either side.
>>
>>What i intend to do is to redirect all traffic coming  towards  br0  
>>from PC1 through interface/port if1,  even if the source mac is learnt 
>>through if0 and the same on the other bridge br1 on the other device.  
>>Similarly, any traffic  coming from PC2  has to go through if2 instead 
>>of if3 before it enters br0. So in all, what i want to do is make the 
>>link from  br0 to br1 full duplex if the physical links are half-duplex.
>>
>>Regards,
>>Munro.
>>    
>>
>
>That would create a possible loop if the links are full duplex, and that
>would be a disaster!  Maybe you could do what you want with the bonding
>interface?
>  
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-06-30  2:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-28  6:40 [Bridge] Possibility of copying over fdb entries munro
2005-06-28 16:48 ` Stephen Hemminger
2005-06-29  3:41   ` munro
2005-06-29 21:11     ` Stephen Hemminger
2005-06-30  2:11       ` munro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.