[pve-devel] ifupdown2 "bridge_set_static_mac_from_port" policy

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jul 14 08:19:07 CEST 2021


On 14.07.21 07:38, Thomas Lamprecht wrote:
> On 13.07.21 07:16, alexandre derumier wrote:
>> Hi, 
>> it seem that it's possible to enable some policy on bridge in ifupdown2
>>
>>
>> cumulus linux distro for example, have this policy
>>
>> $ cat /var/lib/ifupdown2/policy.d/bridge.json
>> {
>> "bridge": {
>> "module_globals": {
>> "warn_on_untagged_bridge_absence": "yes",
>> "vxlan_bridge_default_igmp_snooping": "off",
>> "allow_arp_nd_suppress_only_on_vxlan": "yes",
>> "bridge_set_static_mac_from_port": "yes"
>> },
>> "defaults": {
>> "bridge-stp": "on",
>> "bridge-vlan-stats" : "on",
>> "bridge-mcstats" : "on",
>> "bridge-portprios": "8",
>> "bridge-hashel": "4096",
>> "bridge-hashmax": "4096",
>> "bridge-ageing": "1800"
>> }
>> }
>> }
>>
>>
>> bridge_set_static_mac_from_port could be usefull to reuse physical
>> interface mac on bridge.
>>
> 
> sounds good in theory, but to which port? As with more than one it's important
> to be deterministic - that's why we had that kernel patch in the first place.

Found it, they use first in port list, which is almost always good.

But if one would add another bridge port or switch order of existing ones, and then do a
`ifreload -a` it could change the bridge MAC address? I mean, it happens in the `up_bridge`
function, not sure if that is called on reload or just when really doing something like
`ifdown vmbr0; ifup vmbr0`





More information about the pve-devel mailing list