From 0e29d79487c5ad64484c61a9c733f3831a12ca50 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 10 May 2014 17:32:10 +0200 Subject: [PATCH] interfaces: default to use of a local administered MAC address for bonds Since in the default configuration, some swicthes (Cisco on IOS 15.x) will complain about MAC addresses flapping when using `configure system bond-slave-src-mac-type fixed`, and some other switches (still Cisco) will complain when using `configure system bond-slave-src-mac-type fixed`, we change the default to `local`. This is not the safest option but the probability of having a collision is quite low. Usually, locally administered addresses are used for VM but they are taken from a known prefix and we are unlikely to have a collision with this prefix. On VM, we will fallback to a fixed address but hopefully, the switch will be a virtual one which won't have a problem with the fixed address. --- NEWS | 3 ++- src/client/lldpcli.8.in | 18 +++++++++--------- src/daemon/lldpd.c | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 3cb894b0..bfe394fc 100644 --- a/NEWS +++ b/NEWS @@ -7,7 +7,8 @@ lldpd (0.7.9) to get the previous locations, lldpd should be configured with `./configure --localstatedir=/var`. * Fixes: - + Fix `configure system bond-slave-src-mac-type local` + + Fix `configure system bond-slave-src-mac-type local`. Also use + it as default. lldpd (0.7.8) * Fixes: diff --git a/src/client/lldpcli.8.in b/src/client/lldpcli.8.in index 5b964b05..7933bab6 100644 --- a/src/client/lldpcli.8.in +++ b/src/client/lldpcli.8.in @@ -251,21 +251,21 @@ An arbitrary fixed value .Li ( 00:60:08:69:97:ef ) .It Sy local Real mac with locally administered bit set. If the real mac already -has the locally administered bit set, default to the fixed value. +has the locally administered bit set, fallback to the fixed value. .El .Pp Default value for .Nm bond-slave-src-mac-type is -.Nm fixed . -Some switches may complain about flapping MAC addresses. In thise case, switch to either -.Sy zero -or -.Sy local . -Note that there is a slight change that the address generated by +.Nm local . +Some switches may complain when using one of the two other possible +values (either because +.Li 00:00:00:00:00:00 +is not a valid MAC or because the MAC address is flapping from one +port to another). Using .Sy local -can be found somewhere else in your network. This is why this is not -the default value. +might lead to a duplicate MAC address on the network (but this is +quite unlikely). .Ed .Cd configure med fast-start diff --git a/src/daemon/lldpd.c b/src/daemon/lldpd.c index 4276f4ee..116c02cf 100644 --- a/src/daemon/lldpd.c +++ b/src/daemon/lldpd.c @@ -1533,7 +1533,7 @@ lldpd_main(int argc, char *argv[], char *envp[]) cfg->g_snmp_agentx = agentx; #endif /* USE_SNMP */ cfg->g_config.c_bond_slave_src_mac_type = \ - LLDP_BOND_SLAVE_SRC_MAC_TYPE_FIXED; + LLDP_BOND_SLAVE_SRC_MAC_TYPE_LOCALLY_ADMINISTERED; /* Get ioctl socket */ log_debug("main", "get an ioctl socket"); -- 2.39.5