shettyg / ovn-docker

Provide network virtualization to Docker via OVN.
Apache License 2.0
20 stars 9 forks source link

Set the mac address of OVS bridge to that of physical NIC #7

Closed shettyg closed 9 years ago

shettyg commented 9 years ago

When 'ovn-integrate nics-to-bridge eth0' is called inside the VM, the newly created 'breth0' can have a different mac than that of 'eth0' for macs created by libvirt. So we need to set:

ovs-vsctl set bridge breth0 other_config:hwaddr="fa:16:3e:0c:31:31"

juanpincel commented 7 years ago

In your network configuration /etc/config/network you can put the following lines:

config interface 'wan'
        option ifname 'eth0.1'
        option proto 'dhcp'
        option macaddr '00:0C:42:D0:E8:A1'   

in the line option macaddr you can put the mac address you want.