[ovs-discuss] MAC address question
jesse at nicira.com
Mon Aug 9 18:54:12 UTC 2010
On Sun, Aug 8, 2010 at 11:53 PM, Todd Deshane <deshantm at gmail.com> wrote:
> I just noticed an that when I create a ovs switch with ovs-vsctl
> add-br that the MAC address gets a 00:23:20 (Nicira Network) prefix,
> which is expected, but when I add a physical card with ovs-vsctl
> add-port <switch_name> eth0, the MAC address of eth0 is given to the
> I am wondering if this is the intended behavior? If so why and can
> there be a setting that leaves the switches MAC in tact? I know that
> the xen network-bridge script does a similar trick, but goes as far as
> taking all the networking settings of the ethN device as to try to
> keep networking up even during bringing up a xen bridge device.
Yes, this is the intended behavior. The goal is to choose a MAC address
that will be stable over time. The physical Ethernet adapters in a bridge
tend to be constant, so we use those if possible. It also means that in the
common case where there is one physical NIC in a bridge our new bridge port
will have the same MAC and therefore have the same behavior for DHCP, etc.
If there are no physical adapters or other identifying values we fallback
to a random MAC using the Nicira OUI.
This behavior can be avoided by setting the other_config:hwaddr key on the
appropriate bridge. This will override the MAC address selection code.
> I'm wondering at a higher level will it be possible for me to write
> openflow control rules that match on MAC address when working with the
> case of 0 physical nics associated with the bridge and what about the
> case where there is a network bond that gets attached, what would the
> MAC address change to in that case?
Yes, it is possible to write rules based on the MAC address. You just need
to either set or query the address of the bridge beforehand. Of course this
only affects packets generated on the bridge local port. All other ports
will use whatever MAC address is already on the packet.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the discuss