From 1aed104cb6708792b9126fed333e92401a6e7896 Mon Sep 17 00:00:00 2001 From: Seb d'Argoeuves Date: Wed, 23 Oct 2024 00:26:00 +0100 Subject: [PATCH 01/10] #1418 - vrrp no preempt needs to be explicit on cEOS --- netsim/ansible/templates/gateway/eos.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netsim/ansible/templates/gateway/eos.j2 b/netsim/ansible/templates/gateway/eos.j2 index e00ef18fb..5fdb3fbca 100644 --- a/netsim/ansible/templates/gateway/eos.j2 +++ b/netsim/ansible/templates/gateway/eos.j2 @@ -21,6 +21,8 @@ interface {{ intf.ifname }} {% endif %} {% if intf.gateway.vrrp.preempt|default(False) %} vrrp {{ intf.gateway.vrrp.group }} preempt +{% else %} + no vrrp {{ intf.gateway.vrrp.group }} preempt {% endif %} {% endif %} {% endfor %} From df48b86eb0a85363f1f860eaa4f6d4df4094ed8c Mon Sep 17 00:00:00 2001 From: Seb d'Argoeuves Date: Wed, 23 Oct 2024 00:50:39 +0100 Subject: [PATCH 02/10] #1418 - enable preemption by default --- netsim/ansible/templates/gateway/eos.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netsim/ansible/templates/gateway/eos.j2 b/netsim/ansible/templates/gateway/eos.j2 index 5fdb3fbca..9c6119757 100644 --- a/netsim/ansible/templates/gateway/eos.j2 +++ b/netsim/ansible/templates/gateway/eos.j2 @@ -19,7 +19,7 @@ interface {{ intf.ifname }} {% if 'priority' in intf.gateway.vrrp %} vrrp {{ intf.gateway.vrrp.group }} priority-level {{ intf.gateway.vrrp.priority }} {% endif %} -{% if intf.gateway.vrrp.preempt|default(False) %} +{% if intf.gateway.vrrp.preempt|default(True) %} vrrp {{ intf.gateway.vrrp.group }} preempt {% else %} no vrrp {{ intf.gateway.vrrp.group }} preempt From 5cdc66001fde06e1bf0f76070c768521392986d3 Mon Sep 17 00:00:00 2001 From: Seb d'Argoeuves Date: Wed, 23 Oct 2024 10:23:36 +0100 Subject: [PATCH 03/10] #1418 - cEOS default vrrp preempt is False --- netsim/ansible/templates/gateway/eos.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netsim/ansible/templates/gateway/eos.j2 b/netsim/ansible/templates/gateway/eos.j2 index 9c6119757..5fdb3fbca 100644 --- a/netsim/ansible/templates/gateway/eos.j2 +++ b/netsim/ansible/templates/gateway/eos.j2 @@ -19,7 +19,7 @@ interface {{ intf.ifname }} {% if 'priority' in intf.gateway.vrrp %} vrrp {{ intf.gateway.vrrp.group }} priority-level {{ intf.gateway.vrrp.priority }} {% endif %} -{% if intf.gateway.vrrp.preempt|default(True) %} +{% if intf.gateway.vrrp.preempt|default(False) %} vrrp {{ intf.gateway.vrrp.group }} preempt {% else %} no vrrp {{ intf.gateway.vrrp.group }} preempt From 4c74ed7b07733c6b18c8d77c2e989d29f6b70c81 Mon Sep 17 00:00:00 2001 From: Seb d'Argoeuves Date: Wed, 23 Oct 2024 11:28:30 +0100 Subject: [PATCH 04/10] #1418 - ios - vrrp - force no preempt when default --- netsim/ansible/templates/gateway/ios.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netsim/ansible/templates/gateway/ios.j2 b/netsim/ansible/templates/gateway/ios.j2 index 9fe068b0e..af003b376 100644 --- a/netsim/ansible/templates/gateway/ios.j2 +++ b/netsim/ansible/templates/gateway/ios.j2 @@ -16,6 +16,8 @@ interface {{ intf.ifname }} {% endif %} {% if intf.gateway.vrrp.preempt|default(False) %} preempt +{% else %} + no preempt {% endif %} {% endfor %} {% endif %} From 01c798e170f09cdfe960380e964119771544732c Mon Sep 17 00:00:00 2001 From: Seb d'Argoeuves Date: Wed, 23 Oct 2024 11:28:43 +0100 Subject: [PATCH 05/10] #1418 - nxos - vrrp - force no preempt when default --- netsim/ansible/templates/gateway/nxos.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netsim/ansible/templates/gateway/nxos.j2 b/netsim/ansible/templates/gateway/nxos.j2 index 1a3a8e1b8..ba84e7ac2 100644 --- a/netsim/ansible/templates/gateway/nxos.j2 +++ b/netsim/ansible/templates/gateway/nxos.j2 @@ -18,6 +18,8 @@ interface {{ intf.ifname }} {% endif %} {% if intf.gateway.vrrp.preempt|default(False) %} preempt +{% else %} + no preempt {% endif %} {% endif %} {% endfor %} From 4aac1ed4396b1db8842eabb552829a681e1d4055 Mon Sep 17 00:00:00 2001 From: Seb d'Argoeuves Date: Wed, 23 Oct 2024 12:11:56 +0100 Subject: [PATCH 06/10] #1418 - frr - vrrp - force no preempt when default --- netsim/ansible/templates/gateway/frr.vrrp-config.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netsim/ansible/templates/gateway/frr.vrrp-config.j2 b/netsim/ansible/templates/gateway/frr.vrrp-config.j2 index d713711d1..085de80a4 100644 --- a/netsim/ansible/templates/gateway/frr.vrrp-config.j2 +++ b/netsim/ansible/templates/gateway/frr.vrrp-config.j2 @@ -8,6 +8,8 @@ interface {{ intf.ifname }} {% endif %} {% if intf.gateway.vrrp.preempt|default(False) %} vrrp {{ intf.gateway.vrrp.group }} preempt +{% else %} + no vrrp {{ intf.gateway.vrrp.group }} preempt {% endif %} {% for af in 'ipv4','ipv6' if af in intf.gateway %} vrrp {{ intf.gateway.vrrp.group }} {{ af|replace('ipv4','ip') }} {{ intf.gateway[af]|ipaddr('address') }} From 7c1212b15fa036e15b60a2071302ad5b9662be66 Mon Sep 17 00:00:00 2001 From: Seb d'Argoeuves Date: Wed, 23 Oct 2024 12:26:09 +0100 Subject: [PATCH 07/10] #1418 - frr - cumulus - force no preempt when default --- netsim/ansible/templates/gateway/cumulus.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netsim/ansible/templates/gateway/cumulus.j2 b/netsim/ansible/templates/gateway/cumulus.j2 index 538cf51a8..6ce561ae4 100644 --- a/netsim/ansible/templates/gateway/cumulus.j2 +++ b/netsim/ansible/templates/gateway/cumulus.j2 @@ -26,6 +26,8 @@ interface {{ intf.ifname }} {% endif %} {% if intf.gateway.vrrp.preempt|default(False) %} vrrp {{ intf.gateway.vrrp.group }} preempt +{% else %} + no vrrp {{ intf.gateway.vrrp.group }} preempt {% endif %} {% endfor %} do write From 5e48a9af4628ee67a68ba60a398f8b5e7bcd45a7 Mon Sep 17 00:00:00 2001 From: Seb d'Argoeuves Date: Thu, 24 Oct 2024 00:23:42 +0100 Subject: [PATCH 08/10] #1418 - change preempt default to True --- netsim/ansible/templates/gateway/arubacx.j2 | 2 +- netsim/ansible/templates/gateway/cumulus.j2 | 2 +- netsim/ansible/templates/gateway/dellos10.j2 | 2 +- netsim/ansible/templates/gateway/eos.j2 | 2 +- netsim/ansible/templates/gateway/frr.vrrp-config.j2 | 2 +- netsim/ansible/templates/gateway/ios.j2 | 2 +- netsim/ansible/templates/gateway/nxos.j2 | 2 +- netsim/ansible/templates/gateway/sros.j2 | 2 +- netsim/ansible/templates/gateway/vyos.j2 | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/netsim/ansible/templates/gateway/arubacx.j2 b/netsim/ansible/templates/gateway/arubacx.j2 index 52053c702..effae4a41 100644 --- a/netsim/ansible/templates/gateway/arubacx.j2 +++ b/netsim/ansible/templates/gateway/arubacx.j2 @@ -30,7 +30,7 @@ interface {{ intf.ifname }} address fe80::1 primary address {{ intf.gateway[af]|ipaddr('address') }} secondary {% endif %} -{% if intf.gateway.vrrp.preempt|default(False) %} +{% if intf.gateway.vrrp.preempt|default(True) %} preempt {% else %} no preempt diff --git a/netsim/ansible/templates/gateway/cumulus.j2 b/netsim/ansible/templates/gateway/cumulus.j2 index 6ce561ae4..3cbfb6d12 100644 --- a/netsim/ansible/templates/gateway/cumulus.j2 +++ b/netsim/ansible/templates/gateway/cumulus.j2 @@ -24,7 +24,7 @@ interface {{ intf.ifname }} {% if 'priority' in intf.gateway.vrrp %} vrrp {{ intf.gateway.vrrp.group }} priority {{ intf.gateway.vrrp.priority }} {% endif %} -{% if intf.gateway.vrrp.preempt|default(False) %} +{% if intf.gateway.vrrp.preempt|default(True) %} vrrp {{ intf.gateway.vrrp.group }} preempt {% else %} no vrrp {{ intf.gateway.vrrp.group }} preempt diff --git a/netsim/ansible/templates/gateway/dellos10.j2 b/netsim/ansible/templates/gateway/dellos10.j2 index 15c6f26be..76d65a079 100644 --- a/netsim/ansible/templates/gateway/dellos10.j2 +++ b/netsim/ansible/templates/gateway/dellos10.j2 @@ -35,7 +35,7 @@ interface {{ intf.ifname }} {% if 'priority' in intf.gateway.vrrp %} priority {{ intf.gateway.vrrp.priority }} {% endif %} -{% if not intf.gateway.vrrp.preempt|default(False) %} +{% if not intf.gateway.vrrp.preempt|default(True) %} no preempt {% endif %} {% endfor %} diff --git a/netsim/ansible/templates/gateway/eos.j2 b/netsim/ansible/templates/gateway/eos.j2 index 5fdb3fbca..9c6119757 100644 --- a/netsim/ansible/templates/gateway/eos.j2 +++ b/netsim/ansible/templates/gateway/eos.j2 @@ -19,7 +19,7 @@ interface {{ intf.ifname }} {% if 'priority' in intf.gateway.vrrp %} vrrp {{ intf.gateway.vrrp.group }} priority-level {{ intf.gateway.vrrp.priority }} {% endif %} -{% if intf.gateway.vrrp.preempt|default(False) %} +{% if intf.gateway.vrrp.preempt|default(True) %} vrrp {{ intf.gateway.vrrp.group }} preempt {% else %} no vrrp {{ intf.gateway.vrrp.group }} preempt diff --git a/netsim/ansible/templates/gateway/frr.vrrp-config.j2 b/netsim/ansible/templates/gateway/frr.vrrp-config.j2 index 085de80a4..48ac89f49 100644 --- a/netsim/ansible/templates/gateway/frr.vrrp-config.j2 +++ b/netsim/ansible/templates/gateway/frr.vrrp-config.j2 @@ -6,7 +6,7 @@ interface {{ intf.ifname }} {% if 'priority' in intf.gateway.vrrp %} vrrp {{ intf.gateway.vrrp.group }} priority {{ intf.gateway.vrrp.priority }} {% endif %} -{% if intf.gateway.vrrp.preempt|default(False) %} +{% if intf.gateway.vrrp.preempt|default(True) %} vrrp {{ intf.gateway.vrrp.group }} preempt {% else %} no vrrp {{ intf.gateway.vrrp.group }} preempt diff --git a/netsim/ansible/templates/gateway/ios.j2 b/netsim/ansible/templates/gateway/ios.j2 index af003b376..b434b79ec 100644 --- a/netsim/ansible/templates/gateway/ios.j2 +++ b/netsim/ansible/templates/gateway/ios.j2 @@ -14,7 +14,7 @@ interface {{ intf.ifname }} {% if 'priority' in intf.gateway.vrrp %} priority {{ intf.gateway.vrrp.priority }} {% endif %} -{% if intf.gateway.vrrp.preempt|default(False) %} +{% if intf.gateway.vrrp.preempt|default(True) %} preempt {% else %} no preempt diff --git a/netsim/ansible/templates/gateway/nxos.j2 b/netsim/ansible/templates/gateway/nxos.j2 index ba84e7ac2..e74fd7e45 100644 --- a/netsim/ansible/templates/gateway/nxos.j2 +++ b/netsim/ansible/templates/gateway/nxos.j2 @@ -16,7 +16,7 @@ interface {{ intf.ifname }} {% if 'priority' in intf.gateway.vrrp %} priority {{ intf.gateway.vrrp.priority }} {% endif %} -{% if intf.gateway.vrrp.preempt|default(False) %} +{% if intf.gateway.vrrp.preempt|default(True) %} preempt {% else %} no preempt diff --git a/netsim/ansible/templates/gateway/sros.j2 b/netsim/ansible/templates/gateway/sros.j2 index 33834aa99..ae5da3a32 100644 --- a/netsim/ansible/templates/gateway/sros.j2 +++ b/netsim/ansible/templates/gateway/sros.j2 @@ -22,7 +22,7 @@ updates: mac: {{ intf.gateway.anycast.mac|hwaddr('linux') }} {% endif %} {% if intf.gateway.protocol == 'vrrp' %} - preempt: {{ intf.gateway.vrrp.preempt|default(False)|bool }} + preempt: {{ intf.gateway.vrrp.preempt|default(True)|bool }} {% if 'priority' in intf.gateway.vrrp %} priority: {{ intf.gateway.vrrp.priority }} {% endif %} diff --git a/netsim/ansible/templates/gateway/vyos.j2 b/netsim/ansible/templates/gateway/vyos.j2 index f430fc2ae..6daa46d7c 100644 --- a/netsim/ansible/templates/gateway/vyos.j2 +++ b/netsim/ansible/templates/gateway/vyos.j2 @@ -19,7 +19,7 @@ set high-availability vrrp group {{ vrrp_name }} address {{ intf.gateway[af] }} {% if 'priority' in intf.gateway.vrrp %} set high-availability vrrp group {{ vrrp_name }} priority {{ intf.gateway.vrrp.priority }} {% endif %} -{% if not intf.gateway.vrrp.preempt|default(False) %} +{% if not intf.gateway.vrrp.preempt|default(True) %} set high-availability vrrp group {{ vrrp_name }} no-preempt {% endif %} From 4540cb6ed1d42a1d6380320f7442e6bed01647a7 Mon Sep 17 00:00:00 2001 From: Ivan Pepelnjak Date: Thu, 24 Oct 2024 09:22:00 +0200 Subject: [PATCH 09/10] Updating documentation --- docs/module/gateway.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/module/gateway.md b/docs/module/gateway.md index 75e074dd0..db6396c57 100644 --- a/docs/module/gateway.md +++ b/docs/module/gateway.md @@ -92,6 +92,6 @@ More complex topologies, such as multiple VRRPv3 instances *on the same subnet*, * **vrrp.group** (default: 1) -- VRRP group * **vrrp.priority** (interface parameter, integer) -* **vrrp.preempt** (interface parameter, boolean) +* **vrrp.preempt** (interface parameter, boolean) -- VRRP preempting is enabled by default; you can disable it with **vrrp.preempt: False**. No other aspect of VRRP (VRRP version, timers...) is manageable through *netlab* parameters; if you want to configure them, create a plugin to implement additional VRRP functionality. From 86afb9611a10cbaf7a838f20112b64c7d949c0ed Mon Sep 17 00:00:00 2001 From: Seb d'Argoeuves Date: Mon, 28 Oct 2024 00:02:43 +0000 Subject: [PATCH 10/10] update caveats for Cisco IOS XRd --- docs/caveats.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/caveats.md b/docs/caveats.md index 996953fb0..a6c2fac18 100644 --- a/docs/caveats.md +++ b/docs/caveats.md @@ -155,13 +155,14 @@ Host 192.168.121.* See also [common Cisco IOS](caveats-iosv) caveats. (caveats-iosxr)= -## Cisco IOS XRv +## Cisco IOS XR + +### Cisco IOS XRv * netlab was tested with IOS XR release 7.4. Earlier releases might use a different management interface name. In that case, you must set **defaults.devices.iosxr.mgmt_if** parameter to the name of the management interface * Copying Vagrant public insecure SSH key into IOS XR during the box building process is cumbersome. The vagrant configuration file uses a fixed SSH password. * Maximum interface bandwidth on IOS XRv is 1 Gbps (1000000). * It seems IOS XR starts an SSH server before it parses the device configuration[^WCPGW], and newer versions of Vagrant don't like that and will ask you for the password for user **vagrant**. Ignore that prompt and the subsequent error messages[^POT]; you might get a running lab in a few minutes[^MAS]. -* The IOS XRd container seems to be a resource hog. If you experience errors during the initial device configuration, reduce the number of parallel configuration processes -- set the ANSIBLE_FORKS environment variable to one with `export ANSIBLE_FORKS=1`. [^WCPGW]: Yeah, what could possibly go wrong? @@ -169,6 +170,16 @@ See also [common Cisco IOS](caveats-iosv) caveats. [^MAS]: Hint: you have plenty of time to make coffee and a snack. +### Cisco XRd + +* The `cisco.iosxr` Ansible Galaxy collection, used to initialize the device and push configurations, is currently incompatible with IOS XRd. A [pull request](https://github.com/ansible-collections/cisco.iosxr/pull/510) exists to fix this, but it has not been merged yet. Until then, you can utilize the following command to install the fork: + +```shell +ansible-galaxy collection install git+https://github.com/jmussmann/ansible_collection_cisco.iosxr.git,issue/509 +``` + +* The IOS XRd container seems to be a resource hog. If you experience errors during the initial device configuration, reduce the number of parallel configuration processes -- set the ANSIBLE_FORKS environment variable to one with `export ANSIBLE_FORKS=1`. + (caveats-nxos)= ## Cisco Nexus OS