lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 4 Aug 2014 09:34:03 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Jamal Hadi Salim <jhs@...atatu.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [iproute2 PATCH 1/1] iproute2 bridge: bring to above par with
 brctl show macs

On Fri,  4 Jul 2014 08:37:10 -0400
Jamal Hadi Salim <jhs@...atatu.com> wrote:

> From: Jamal Hadi Salim <jhs@...atatu.com>
> 
> root@...a-mojo:bridge# ./bridge fdb help
> Usage: bridge fdb { add | append | del | replace } ADDR dev DEV {self|master} [ temp ]
>               [router] [ dst IPADDR] [ vlan VID ]
>               [ port PORT] [ vni VNI ] [via DEV]
>        bridge fdb {show} [ br BRDEV ] [ brport DEV ]
> 
>  Lets start with two bridges each with a port...
> 
> root@...a-mojo:bridge# ./bridge link
> 10: sw1-p1 state DOWN : <BROADCAST,NOARP> mtu 1500 master sw1 state disabled priority 32 cost 100
> 11: eth1 state DOWN : <BROADCAST,NOARP> mtu 1500 master br0 state disabled priority 32 cost 100
> 
> show all...
> root@...a-mojo:bridge# ./bridge fdb show
> 33:33:00:00:00:01 dev ifb0 self permanent
> 33:33:00:00:00:01 dev ifb1 self permanent
> 33:33:00:00:00:01 dev eth0 self permanent
> 01:00:5e:00:00:01 dev eth0 self permanent
> 33:33:ff:92:c0:60 dev eth0 self permanent
> 33:33:00:00:00:fb dev eth0 self permanent
> 01:00:5e:00:00:fb dev eth0 self permanent
> 01:00:5e:7f:ff:fd dev eth0 self permanent
> 01:00:5e:00:00:01 dev wlan0 self permanent
> 33:33:00:00:00:01 dev wlan0 self permanent
> 33:33:ff:c2:84:3b dev wlan0 self permanent
> 33:33:00:00:00:fb dev wlan0 self permanent
> 01:00:5e:00:00:01 dev virbr0 self permanent
> 01:00:5e:00:00:fb dev virbr0 self permanent
> 33:33:00:00:00:01 dev br0 self permanent
> 33:33:00:00:00:01 dev sw1 self permanent
> 33:33:00:00:00:01 dev dummy0 self permanent
> 5e:f4:03:44:da:9a dev sw1-p1 vlan 0 master sw1 permanent
> 33:33:00:00:00:01 dev sw1-p1 self permanent
> b6:5e:dd:ce:d7:5e dev eth1 vlan 0 master br0 permanent
> 33:33:00:00:00:01 dev eth1 self permanent
> 
> Lets see a netdev that is *not* attached to a bridge
> 
> root@...a-mojo:bridge# ./bridge fdb show brport eth0
> 33:33:00:00:00:01 self permanent
> 01:00:5e:00:00:01 self permanent
> 33:33:ff:92:c0:60 self permanent
> 33:33:00:00:00:fb self permanent
> 01:00:5e:00:00:fb self permanent
> 01:00:5e:7f:ff:fd self permanent
> 
> Lets see a netdev that is bridge port
> root@...a-mojo:bridge# ./bridge fdb show brport eth1
> hadi@...-1:/media/MT1/other-gits/iproute-jul04/bridge$ ./bridge fdb show brport eth1
> b6:5e:dd:ce:d7:5e vlan 0 master br0 permanent
> 33:33:00:00:00:01 self permanent
> 
> Specify the correct bridge and you get good stuff
> root@...a-mojo:bridge# ./bridge fdb show brport eth1 br br0
> 6:5e:dd:ce:d7:5e vlan 0 master br0 permanent
> 33:33:00:00:00:01 self permanent
> 
> Specify the wrong bridge and you get good nada
> root@...a-mojo:bridge# ./bridge fdb show brport eth1 br sw1
> 
> dump br0
> root@...a-mojo:bridge# ./bridge fdb show br br0
> 33:33:00:00:00:01 dev br0 self permanent
> b6:5e:dd:ce:d7:5e dev eth1 vlan 0 master br0 permanent
> 33:33:00:00:00:01 dev eth1 self permanent
> 
> dump sw1
> root@...a-mojo:bridge# ./bridge fdb show br sw1
> 33:33:00:00:00:01 dev sw1 self permanent
> 5e:f4:03:44:da:9a dev sw1-p1 vlan 0 master sw1 permanent
> 33:33:00:00:00:01 dev sw1-p1 self permanent
> 
> Lets move a port from one bridge to another for shits-and-giggles
> (as the New Brunswickians like to say)
> root@...a-mojo:bridge# ip link set sw1-p1 master br0
> 
> Now dump again br0
> root@...a-mojo:bridge# ./bridge fdb show br br0
> 33:33:00:00:00:01 dev br0 self permanent
> 5e:f4:03:44:da:9a dev sw1-p1 vlan 0 master br0 permanent
> 33:33:00:00:00:01 dev sw1-p1 self permanent
> b6:5e:dd:ce:d7:5e dev eth1 vlan 0 master br0 permanent
> 33:33:00:00:00:01 dev eth1 self permanent
> 
> Signed-off-by: Jamal Hadi Salim <jhs@...atatu.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists