]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commit
iproute2/iplink: add macvlan options for bridge mode
authorArnd Bergmann <arnd@arndb.de>
Sat, 26 Dec 2009 19:22:57 +0000 (11:22 -0800)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Sat, 26 Dec 2009 19:22:57 +0000 (11:22 -0800)
commitd63a9b2b1e4e3eab0d0577d0a0f412d50be1e0a7
tree68ac012bd72322d7447ed6fbb3a0e23dbfea73c3
parenta1f277943f86bd6974dfef9f59e5ee43eaeac300
iproute2/iplink: add macvlan options for bridge mode

Macvlan can now optionally support forwarding between its
ports, if they are in "bridge" mode. This adds support
for this option to "ip link add", "ip link set" and "ip
-d link show".

The default mode in the kernel is now "vepa" mode, meaning
"virtual ethernet port aggregator". This mode is used
together with the "hairpin" mode of an ethernet bridge
that the parent of the macvlan device is connected to.
All frames still get sent out to the external interface,
but the adjacent bridge is able to send them back on
the same wire in hairpin mode, so the macvlan ports
are able to see each other, which the bridge can be
configured to monitor and control traffic between
all macvlan instances. Multicast traffic coming in
from the external interface is checked for the source
MAC address and only delivered to ports that have not
yet seen it.

In bridge mode, macvlan will send all multicast traffic
to other interfaces that are also in bridge mode but
not to those in vepa mode, which get them on the way
back from the hairpin.

The third supported mode is "private", which prevents
communication between macvlans even if the adjacent
bridge is in hairpin mode. This behavior is closer to
the original implementation of macvlan but stricly
maintains isolation.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
ip/Makefile
ip/iplink_macvlan.c [new file with mode: 0644]