|
| 1 | +--- |
| 2 | +message: | |
| 3 | + This lab tests IPv6 VRRP configuration. It checks whether the |
| 4 | + device-under-test (DUT) forwards traffic sent to the VRRP IP/MAC address, |
| 5 | + whether it has correct VRRP priority, and whether the preemption mechanism |
| 6 | + works. |
| 7 | +
|
| 8 | +module: [ gateway ] |
| 9 | + |
| 10 | +groups: |
| 11 | + probes: |
| 12 | + device: eos |
| 13 | + provider: clab |
| 14 | + members: [ r2 ] |
| 15 | + hosts: |
| 16 | + device: linux |
| 17 | + provider: clab |
| 18 | + members: [ h1, h2 ] |
| 19 | + |
| 20 | +gateway.protocol: vrrp |
| 21 | +gateway.id: 42 |
| 22 | +gateway.vrrp.group: 17 |
| 23 | + |
| 24 | +nodes: |
| 25 | + dut: |
| 26 | + r2: |
| 27 | + h1: |
| 28 | + h2: |
| 29 | + |
| 30 | +links: |
| 31 | +- h1: |
| 32 | + dut: |
| 33 | + gateway.vrrp.priority: 30 |
| 34 | + r2: |
| 35 | + gateway.vrrp.priority: 20 |
| 36 | + gateway: True |
| 37 | + prefix.ipv6: 2001:db8:bad:cafe::/64 |
| 38 | +- dut: |
| 39 | + r2: |
| 40 | + h2: |
| 41 | + prefix.ipv6: 2002:db8:bad:cafe::/64 |
| 42 | + |
| 43 | +validate: |
| 44 | + r2_eth1_down: |
| 45 | + description: Remove R2 from the VRRP LAN |
| 46 | + nodes: [ r2 ] |
| 47 | + config: |
| 48 | + template: ifdown |
| 49 | + variable.ifstate: 'down' |
| 50 | + pass: R2 has been disconnected from the VRRP LAN |
| 51 | + stop_on_error: True |
| 52 | + ra: |
| 53 | + description: Check RA-generated default route |
| 54 | + wait: 30 |
| 55 | + wait_msg: Waiting for RA message to generate the default route |
| 56 | + nodes: [ h1, h2 ] |
| 57 | + plugin: default6() |
| 58 | + stop_on_error: True |
| 59 | + ping_vrrp: |
| 60 | + description: Verify VRRP v6 is enabled on DUT |
| 61 | + wait: 10 |
| 62 | + nodes: [ h1 ] |
| 63 | + plugin: ping('h2',af='ipv6') |
| 64 | + r2_eth1_up: |
| 65 | + description: Add R2 to the VRRP LAN |
| 66 | + nodes: [ r2 ] |
| 67 | + config: |
| 68 | + template: ifdown |
| 69 | + variable.ifstate: 'up' |
| 70 | + pass: R2 has been reconnected to the VRRP LAN |
| 71 | + stop_on_error: True |
| 72 | + r2_vrrp_backup: |
| 73 | + description: Verify that R2 is in the backup state |
| 74 | + wait: 10 |
| 75 | + nodes: [ r2 ] |
| 76 | + show: |
| 77 | + frr: vrrp interface {{ interfaces[0].ifname }} json |
| 78 | + eos: vrrp | json |
| 79 | + valid: |
| 80 | + frr: result[0].v6.status == 'Backup' |
| 81 | + eos: virtualRouters[0].state == 'backup' |
| 82 | + r2_vrrp_prio: |
| 83 | + nodes: [ r2 ] |
| 84 | + pass: R2 VRRP priority has been increased to 80 |
| 85 | + config: |
| 86 | + template: vrrp-priority |
| 87 | + variable.vrrp_prio: 80 |
| 88 | + r2_vrrp_master: |
| 89 | + description: Verify that R2 took over as master (VRRP priority on DUT is lower than 80) |
| 90 | + wait: 10 |
| 91 | + nodes: [ r2 ] |
| 92 | + show: |
| 93 | + frr: vrrp interface {{ interfaces[0].ifname }} json |
| 94 | + eos: vrrp | json |
| 95 | + valid: |
| 96 | + frr: result[0].v6.status == 'Master' |
| 97 | + eos: virtualRouters[0].state == 'master' |
| 98 | + r2_vrrp_prio_low: |
| 99 | + nodes: [ r2 ] |
| 100 | + pass: R2 VRRP priority has been lowered to 20 |
| 101 | + config: |
| 102 | + template: vrrp-priority |
| 103 | + variable.vrrp_prio: 20 |
| 104 | + dut_preempt: |
| 105 | + description: Verify that DUT preempts R2 when its priority is lowered |
| 106 | + wait: 10 |
| 107 | + nodes: [ r2 ] |
| 108 | + show: |
| 109 | + frr: vrrp interface {{ interfaces[0].ifname }} json |
| 110 | + eos: vrrp | json |
| 111 | + valid: |
| 112 | + frr: result[0].v6.status == 'Backup' |
| 113 | + eos: virtualRouters[0].state == 'backup' |
| 114 | + level: warning |
0 commit comments