Skip to content

Commit

Permalink
topotests: test bgp ipv6 vrf lite unnumbered with ipv6 rt advertisements
Browse files Browse the repository at this point in the history
bgp ipv6 implies that routing advertisements be available for all vrf.
in the case of the vrf backend is network namespace, this should be
tested too. in addition to configure addresses per interface on a
separate vrf, the test also checks for BGP connectivity.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
  • Loading branch information
pguibert6WIND committed Jun 4, 2019
1 parent 689bb56 commit 37ce18d
Show file tree
Hide file tree
Showing 11 changed files with 415 additions and 0 deletions.
Empty file.
13 changes: 13 additions & 0 deletions tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
router bgp 101 vrf r1-cust1
bgp router-id 10.254.254.1
neighbor r2g peer-group
neighbor r2g remote-as external
neighbor r2g bfd
neighbor r1-eth0 interface peer-group r2g
address-family ipv4 unicast
redistribute connected
exit-address-family
address-family ipv6 unicast
neighbor r2g activate
exit-address-family
!
50 changes: 50 additions & 0 deletions tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv4_routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"10.254.254.2/32": [
{
"prefix": "10.254.254.2/32",
"protocol": "bgp",
"vrfId":3,
"selected": true,
"destSelected": true,
"distance": 20,
"metric": 0,
"installed": true,
"internalStatus": 34,
"internalFlags": 8,
"nexthops": [
{
"flags": 3,
"fib": true,
"afi": "ipv6",
"interfaceIndex": 2,
"interfaceName": "r1-eth0",
"active": true
}
]
}
],
"10.254.254.1/32": [
{
"prefix": "10.254.254.1/32",
"protocol": "connected",
"vrfId":3,
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"internalStatus": 32,
"internalFlags": 8,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceIndex": 4,
"interfaceName": "loop1",
"active": true
}
]
}
]
}
44 changes: 44 additions & 0 deletions tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv6_routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"2001:db8:1::/64": [
{
"prefix": "2001:db8:1::/64",
"protocol": "bgp",
"vrfId":3,
"distance": 20,
"metric": 0,
"internalStatus": 2,
"internalFlags": 0,
"nexthops": [
{
"flags": 1,
"afi": "ipv6",
"interfaceIndex": 2,
"interfaceName": "r1-eth0",
"active": true
}
]
},
{
"prefix": "2001:db8:1::/64",
"protocol": "connected",
"vrfId":3,
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"internalStatus": 32,
"internalFlags": 8,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceIndex": 2,
"interfaceName": "r1-eth0",
"active": true
}
]
}
]
}
9 changes: 9 additions & 0 deletions tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
debug zebra packet recv
debug zebra packet send
log stdout
interface loop1 vrf r1-cust1
ip address 10.254.254.1/32
!
interface r1-eth0 vrf r1-cust1
ipv6 address 2001:db8:1::1/64
!
16 changes: 16 additions & 0 deletions tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
router bgp 102 vrf r2-cust1
bgp router-id 10.254.254.2
neighbor r2g peer-group
neighbor r2g remote-as external
neighbor r2g bfd
neighbor r2-eth0 interface peer-group r2g
!
address-family ipv4 unicast
redistribute connected
exit-address-family
!
address-family ipv6 unicast
redistribute connected
neighbor r2g activate
exit-address-family
!
50 changes: 50 additions & 0 deletions tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv4_routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"10.254.254.2/32": [
{
"prefix": "10.254.254.2/32",
"protocol": "connected",
"vrfId":3,
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"internalStatus": 32,
"internalFlags": 8,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceIndex": 4,
"interfaceName": "loop1",
"active": true
}
]
}
],
"10.254.254.1/32": [
{
"prefix": "10.254.254.1/32",
"protocol": "bgp",
"vrfId":3,
"selected": true,
"destSelected": true,
"distance": 20,
"metric": 0,
"installed": true,
"internalStatus": 34,
"internalFlags": 8,
"nexthops": [
{
"flags": 3,
"fib": true,
"afi": "ipv6",
"interfaceIndex": 2,
"interfaceName": "r2-eth0",
"active": true
}
]
}
]
}
26 changes: 26 additions & 0 deletions tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv6_routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"2001:db8:1::/64": [
{
"prefix": "2001:db8:1::/64",
"protocol": "connected",
"vrfId":3,
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"internalStatus": 32,
"internalFlags": 8,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceIndex": 2,
"interfaceName": "r2-eth0",
"active": true
}
]
}
]
}
9 changes: 9 additions & 0 deletions tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ip forwarding
ipv6 forwarding
!
interface loop1 vrf r2-cust1
ip address 10.254.254.2/32
!
interface r2-eth0 vrf r2-cust1
ipv6 address 2001:db8:1::2/64
!
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Color coding:
#########################
## Main FRR: #f08080 red
## Switches: #d0e0d0 gray
## RIP: #19e3d9 Cyan
## RIPng: #fcb314 dark yellow
## OSPFv2: #32b835 Green
## OSPFv3: #19e3d9 Cyan
## ISIS IPv4 #fcb314 dark yellow
## ISIS IPv6 #9a81ec purple
## BGP IPv4 #eee3d3 beige
## BGP IPv6 #fdff00 yellow
##### Colors (see http://www.color-hex.com/)

graph template {
label="bfd-topo2";

# Routers
r1 [
shape=doubleoctagon,
label="r1",
fillcolor="#f08080",
style=filled,
];
r2 [
shape=doubleoctagon
label="r2",
fillcolor="#f08080",
style=filled,
];

# Switches
sw1 [
shape=oval,
label="sw1\n2001:db8:1::/64",
fillcolor="#d0e0d0",
style=filled,
];

# Connections
r1 -- sw1 [label="eth0"];
r2 -- sw1 [label="eth0"];

}
Loading

0 comments on commit 37ce18d

Please sign in to comment.