|
| 1 | +{ ... }: |
| 2 | +{ |
| 3 | + name = "frr-bgp-unnumbered"; |
| 4 | + |
| 5 | + defaults = { |
| 6 | + networking = { |
| 7 | + useDHCP = false; |
| 8 | + firewall.allowedTCPPorts = [ 179 ]; |
| 9 | + }; |
| 10 | + services.frr.bgpd.enable = true; |
| 11 | + }; |
| 12 | + |
| 13 | + nodes = { |
| 14 | + a = { |
| 15 | + services.frr.config = '' |
| 16 | + router bgp 65001 |
| 17 | + no bgp ebgp-requires-policy |
| 18 | + no bgp default ipv4-unicast |
| 19 | + bgp router-id 192.0.2.10 |
| 20 | +
|
| 21 | + neighbor fabric peer-group |
| 22 | + neighbor fabric remote-as external |
| 23 | + neighbor fabric capability extended-nexthop |
| 24 | + neighbor eth1 interface peer-group fabric |
| 25 | +
|
| 26 | + address-family ipv4 unicast |
| 27 | + neighbor fabric activate |
| 28 | + exit-address-family |
| 29 | +
|
| 30 | + address-family ipv6 unicast |
| 31 | + neighbor fabric activate |
| 32 | + exit-address-family |
| 33 | + ''; |
| 34 | + }; |
| 35 | + b = { |
| 36 | + services.frr.config = '' |
| 37 | + router bgp 65002 |
| 38 | + no bgp ebgp-requires-policy |
| 39 | + no bgp default ipv4-unicast |
| 40 | + bgp router-id 192.0.2.11 |
| 41 | +
|
| 42 | + neighbor fabric peer-group |
| 43 | + neighbor fabric remote-as external |
| 44 | + neighbor fabric capability extended-nexthop |
| 45 | + neighbor eth1 interface peer-group fabric |
| 46 | +
|
| 47 | + address-family ipv4 unicast |
| 48 | + neighbor fabric activate |
| 49 | + exit-address-family |
| 50 | +
|
| 51 | + address-family ipv6 unicast |
| 52 | + neighbor fabric activate |
| 53 | + exit-address-family |
| 54 | + ''; |
| 55 | + }; |
| 56 | + }; |
| 57 | + |
| 58 | + testScript = '' |
| 59 | + start_all() |
| 60 | +
|
| 61 | + for m in [a, b]: |
| 62 | + m.wait_for_unit("network.target") |
| 63 | + m.wait_for_unit("frr.service") |
| 64 | +
|
| 65 | + a.wait_until_succeeds("vtysh -c 'show bgp ipv4 summary' | grep 'eth1.*0\\s*0\\s*N/A'") |
| 66 | + b.wait_until_succeeds("vtysh -c 'show bgp ipv4 summary' | grep 'eth1.*0\\s*0\\s*N/A'") |
| 67 | +
|
| 68 | + # IPv6 DAD might need some time to complete for the local link address |
| 69 | + a.wait_until_succeeds("vtysh -c 'show bgp ipv6 summary' | grep 'eth1.*0\\s*0\\s*N/A'") |
| 70 | + b.wait_until_succeeds("vtysh -c 'show bgp ipv6 summary' | grep 'eth1.*0\\s*0\\s*N/A'") |
| 71 | + ''; |
| 72 | +} |
0 commit comments