iproute2: add br command
Subsystems (2)
Quoted 30 lines · On Tue, 04 Oct 2011 22:08:15 -0700 Sridhar Samudrala <[email protected]> wrote:
Quoted 28 lines · Stephen Hemminger
Quoted 25 lines · On Tue, 04 Oct 2011 15:54:07 -0700 Sridhar Samudrala<[email protected]…
Quoted 24 lines · Stephen Hemminger
Quoted 21 lines · On Wed, 5 Oct 2011 00:32:31 +0200 Michał Mirosław<[email protected]…
2011/10/5 Sridhar Samudrala<[email protected] <mailto:[email protected]>>:
Quoted 9 lines · Stephen Hemminger
Quoted 8 lines
Quoted 5 lines · On Tue, 04 Oct 2011 09:58:55 -0700 Andi Kleen<[email protected]…
Quoted 3 lines · Stephen Hemminger<[email protected] <mailto:[email protected]>>…
This adds a new 'br' command which is the bridging equivalent of the ip command. More of a demo of how to use netlink and bridging at this point.
Please name it "bridge", not "br"
Ok, but it breaks the existing pattern.
Quoted 8 lines
Is this supposed to replace brctl utility?
Can we add/delete a bridge and add/delete interfaces to a bridge using this command?
If so, why not make it
ip bridge add/del<brname>
ip bridge addif/delif<brname> <ifname>I'll add one more idea:
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
ip link add/del<brname> type bridge
ip bridge add/del<brname> <ifname>
ip bridge fdb ...In 3.0 you can already do:
# ip link add dev br3 type bridgeThis is a new syntax that i think works only for 'bridge' type.
The bridge interface to 'ip link' is nothing special. The same syntax is available for macvlan, vlan, and bonding.
Quoted 1 line
All other types require a prefix 'ip link add link'
For vlan:
ip link add link eth0 name eth0.1 type vlan id 1
The reason there is no 'link' parameter when creating a bridge is that the bridge is a standalone device it is not slaved to an underlying device.
Quoted 2 lines
I think the ip command help text should be updated to include this syntax.
patches accepted...
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
# ip link set dev eth3 master br3looks like the command to delete an interface from a bridge is
ip link set dev eth3 nomasterSomehow this interface doesn't look all that intuitive.
Propose something better.
Quoted 9 lines
Currently we have 'ip route' and 'ip neigh' to manipulate routing and neighbor entry tables. I think 'ip bridge' would be good way to extend this to support bridging.
If it is not too late, can we have a interface where all bridge related commands can be done using the same prefix.
I think we also should think about how this syntax can be extended to show embedded bridges in SR-IOV NICs.
The iproute2 commands in general try to be as close to the underlying netlink protocol. This makes it less user friendly but smaller, easier to program. The only part of bridging that is special is the forwarding database which is similar to the neighbor table.
If I do merge bridging into ip, it would not be as 'ip bridge' but as another protocol family.
ip -family bridge neigh ...
As far as SR-IOV, the interface in the kernel is netlink and the hardware people are free to use netlink to use the same messages for SR-IOV, but haven't.
Quoted 58 lines · Stephen Hemminger
Quoted 30 lines · On Tue, 04 Oct 2011 22:08:15 -0700 Sridhar Samudrala <[email protected]> wrote:
Quoted 28 lines · Stephen Hemminger
Quoted 25 lines · On Tue, 04 Oct 2011 15:54:07 -0700 Sridhar Samudrala<[email protected]…
Quoted 24 lines · Stephen Hemminger
Quoted 21 lines · On Wed, 5 Oct 2011 00:32:31 +0200 Michał Mirosław<[email protected]…
2011/10/5 Sridhar Samudrala<[email protected] <mailto:[email protected]>>:
Quoted 9 lines · Stephen Hemminger
Quoted 8 lines
Quoted 5 lines · On Tue, 04 Oct 2011 09:58:55 -0700 Andi Kleen<[email protected]…
Quoted 3 lines · Stephen Hemminger<[email protected] <mailto:[email protected]>>…
This adds a new 'br' command which is the bridging equivalent of the ip command. More of a demo of how to use netlink and bridging at this point.
Please name it "bridge", not "br"
Ok, but it breaks the existing pattern.
Quoted 8 lines
Is this supposed to replace brctl utility?
Can we add/delete a bridge and add/delete interfaces to a bridge using this command?
If so, why not make it
ip bridge add/del<brname>
ip bridge addif/delif<brname> <ifname>I'll add one more idea:
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
ip link add/del<brname> type bridge
ip bridge add/del<brname> <ifname>
ip bridge fdb ...In 3.0 you can already do:
# ip link add dev br3 type bridgeThis is a new syntax that i think works only for 'bridge' type.
The bridge interface to 'ip link' is nothing special. The same syntax is available for macvlan, vlan, and bonding.
Quoted 1 line
All other types require a prefix 'ip link add link'
For vlan:
ip link add link eth0 name eth0.1 type vlan id 1The reason there is no 'link' parameter when creating a bridge is that the bridge is a standalone device it is not slaved to an underlying device.
Quoted 1 line
Quoted 4 lines
Quoted 1 line
I think the ip command help text should be updated to include this syntax.
patches accepted...
Will submit soon.
Quoted 10 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
# ip link set dev eth3 master br3looks like the command to delete an interface from a bridge is
ip link set dev eth3 nomasterSomehow this interface doesn't look all that intuitive.
Propose something better.
Add eth3 to br3
ip link add link br3 [name] eth3 type brif
Delete eth3 from br3
ip link del link br3 [name] eth3 type brif
Quoted 12 lines
Quoted 11 lines
Currently we have 'ip route' and 'ip neigh' to manipulate routing and neighbor entry tables. I think 'ip bridge' would be good way to extend this to support bridging.
If it is not too late, can we have a interface where all bridge related commands can be done using the same prefix.
I think we also should think about how this syntax can be extended to show embedded bridges in SR-IOV NICs.
Quoted 8 lines
The iproute2 commands in general try to be as close to the underlying netlink protocol. This makes it less user friendly but smaller, easier to program. The only part of bridging that is special is the forwarding database which is similar to the neighbor table.
If I do merge bridging into ip, it would not be as 'ip bridge' but as another protocol family.ip -family bridge neigh ...
OK. I am not too familiar with the internal implementation details. So i guess this may not be as straightforward as i thought.
Thanks
Sridhar