Skip to content

Commit 3024b31

Browse files
committed
tests/bgp-frr-unnumbered: init
1 parent 74be3da commit 3024b31

File tree

3 files changed

+91
-0
lines changed

3 files changed

+91
-0
lines changed

tests/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
| Test Name | Tested Software Components |
44
|-------------------------------------------|----------------------------|
55
| bgp-extended-nexthop | FRR, BIRD3 |
6+
| bgp-frr-unnumbered | FRR | <!-- Add BIRD when unnumbered peerings are supported -->
67
| bgp-md5 | FRR, BIRD3 |
78
| bgp-prefsource | FRR, BIRD3 |
89
| bgp-simple | FRR, BIRD3 |

tests/bgp-frr-unnumbered/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# frr-bgp-unnumbered
2+
3+
This configuration extends the [bgp-extended-nexthop](../bgp-extended-nexthop/) test by
4+
introducing BGP unnumbered support, which removes the need to explicitly specify an IPv6 link-local address.
5+
6+
**Note:**
7+
BGP unnumbered is not currently standardized by any RFC, so behavior and implementation may vary across
8+
platforms; additionally, the BIRD routing daemon does not support BGP unnumbered interfaces at this time.
9+
10+
In BGP unnumbered, neighbors use IPv6 link-local addresses that are automatically configured via IPv6
11+
Router Advertisements based on interface identifiers, eliminating the need to manually specify addresses.
12+
13+
Because sessions rely on dynamic link-local addresses rather than explicit IPs, traditional IP-based security
14+
measures like access lists may not be effective, exposing the session to risks if the link is compromised.
15+
16+
Unlike some other vendors, FRR currently does not support features like allowas-in for additional session
17+
filtering, so it is recommended to use extra protections such as TTL-Security and TCP MD5 or, hopefully
18+
in the future, TCP-AO.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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

Comments
 (0)