forked from FRRouting/frr
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
topotests: mpls vpn routes redistribution
Test mpls vpn routes redistribution Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
- Loading branch information
1 parent
db1e2a0
commit c6cfa9b
Showing
15 changed files
with
400 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
log stdout | ||
ip route 172.31.1.0/24 172.31.0.1 | ||
ip route 172.31.2.0/24 172.31.0.1 | ||
interface h1-eth0 | ||
ip address 172.31.0.10/24 | ||
! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
log stdout | ||
ip route 172.31.0.0/24 172.31.1.1 | ||
interface h2-eth0 | ||
ip address 172.31.1.10/24 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
log stdout | ||
ip route 172.31.0.0/24 172.31.2.1 | ||
interface h3-eth0 | ||
ip address 172.31.2.10/24 | ||
! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"vrfName": "vrf1", | ||
"localAS": 65500, | ||
"routes": | ||
{ | ||
"172.31.0.10/32": [ | ||
{ | ||
"prefix": "172.31.0.10", | ||
"prefixLen": 32, | ||
"network": "172.31.0.10\/32", | ||
"nhVrfName": "default", | ||
"nexthops": [ | ||
{ | ||
"ip": "192.168.0.3", | ||
"afi": "ipv4", | ||
"used": true | ||
} | ||
] | ||
}, | ||
{ | ||
"prefix": "172.31.0.10", | ||
"prefixLen": 32, | ||
"network": "172.31.0.10\/32", | ||
"nhVrfName": "default", | ||
"nexthops": [ | ||
{ | ||
"ip": "192.168.0.2", | ||
"afi": "ipv4", | ||
"used": true | ||
} | ||
] | ||
} | ||
], | ||
"172.31.0.1/32": [ | ||
{ | ||
"prefix": "172.31.0.1", | ||
"prefixLen": 32, | ||
"network": "172.31.0.1\/32", | ||
"nexthops": [ | ||
{ | ||
"ip": "0.0.0.0", | ||
"afi": "ipv4", | ||
"used": true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
router bgp 65500 | ||
bgp router-id 192.0.2.1 | ||
no bgp ebgp-requires-policy | ||
neighbor 192.0.2.2 remote-as 65500 | ||
neighbor 192.0.2.2 update-source lo | ||
address-family ipv4 unicast | ||
no neighbor 192.0.2.2 activate | ||
exit-address-family | ||
address-family ipv4 vpn | ||
neighbor 192.0.2.2 activate | ||
exit-address-family | ||
! | ||
router bgp 65500 vrf vrf1 | ||
bgp router-id 192.0.2.1 | ||
address-family ipv4 unicast | ||
redistribute connected | ||
label vpn export 101 | ||
rd vpn export 444:1 | ||
rt vpn both 52:100 | ||
export vpn | ||
import vpn | ||
exit-address-family | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
interface lo | ||
ip router isis 1 | ||
isis passive | ||
! | ||
interface r1-eth0 | ||
ip router isis 1 | ||
isis hello-multiplier 3 | ||
! | ||
router isis 1 | ||
lsp-gen-interval 2 | ||
net 49.0000.0000.0000.0001.00 | ||
is-type level-1 | ||
redistribute ipv4 connected level-1 | ||
segment-routing on | ||
segment-routing global-block 16000 23999 | ||
segment-routing node-msd 8 | ||
segment-routing prefix 192.0.2.1/32 index 10 explicit-null | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
log stdout | ||
interface lo | ||
ip address 192.0.2.1/32 | ||
! | ||
interface r1-eth1 vrf vrf1 | ||
ip address 172.31.0.1/24 | ||
! | ||
interface r1-eth0 | ||
ip address 192.168.0.1/24 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
debug bgp nht | ||
debug bgp zebra | ||
debug bgp labelpool | ||
router bgp 65500 | ||
bgp router-id 192.0.2.2 | ||
no bgp ebgp-requires-policy | ||
neighbor 192.0.2.1 remote-as 65500 | ||
neighbor 192.0.2.1 update-source lo | ||
neighbor 192.168.1.3 remote-as 65501 | ||
address-family ipv4 unicast | ||
no neighbor 192.168.1.3 activate | ||
exit-address-family | ||
address-family ipv4 vpn | ||
neighbor 192.0.2.1 activate | ||
neighbor 192.168.1.3 activate | ||
neighbor 192.0.2.1 next-hop-self | ||
exit-address-family | ||
! | ||
interface r2-eth1 | ||
mpls bgp forwarding | ||
! |
28 changes: 28 additions & 0 deletions
28
tests/topotests/bgp_vpnv4_asbr_sr/r2/ipv4_vpn_summary.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"routerId":"192.0.2.2", | ||
"as":65500, | ||
"vrfId":0, | ||
"vrfName":"default", | ||
"peerCount":2, | ||
"peers":{ | ||
"192.0.2.1":{ | ||
"remoteAs":65500, | ||
"localAs":65500, | ||
"version":4, | ||
"pfxRcd":1, | ||
"pfxSnt":3, | ||
"state":"Established", | ||
"peerState":"OK" | ||
}, | ||
"192.168.1.3":{ | ||
"remoteAs":65501, | ||
"localAs":65500, | ||
"version":4, | ||
"pfxRcd":3, | ||
"pfxSnt":4, | ||
"state":"Established", | ||
"peerState":"OK" | ||
} | ||
}, | ||
"totalPeers":2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
interface lo | ||
ip router isis 1 | ||
isis passive | ||
! | ||
interface r2-eth0 | ||
ip router isis 1 | ||
isis hello-multiplier 3 | ||
! | ||
router isis 1 | ||
lsp-gen-interval 2 | ||
net 49.0000.0000.0000.0002.00 | ||
is-type level-1 | ||
redistribute ipv4 connected level-1 | ||
segment-routing on | ||
segment-routing global-block 16000 23999 | ||
segment-routing node-msd 8 | ||
segment-routing prefix 192.0.2.2/32 index 20 explicit-null | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
log stdout | ||
interface lo | ||
ip address 192.0.2.2/32 | ||
! | ||
interface r2-eth0 | ||
ip address 192.168.0.2/24 | ||
mpls enable | ||
! | ||
interface r2-eth1 | ||
ip address 192.168.1.2/24 | ||
mpls enable | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
router bgp 65501 | ||
bgp router-id 192.0.2.3 | ||
no bgp ebgp-requires-policy | ||
neighbor 192.168.1.2 remote-as 65500 | ||
address-family ipv4 unicast | ||
no neighbor 192.168.1.2 activate | ||
exit-address-family | ||
address-family ipv4 vpn | ||
neighbor 192.168.1.2 activate | ||
exit-address-family | ||
! | ||
router bgp 65501 vrf vrf1 | ||
bgp router-id 192.0.2.3 | ||
address-family ipv4 unicast | ||
redistribute connected | ||
label vpn export 102 | ||
rd vpn export 444:3 | ||
rt vpn both 52:100 | ||
export vpn | ||
import vpn | ||
network 172.31.3.0/24 | ||
exit-address-family | ||
! | ||
interface r3-eth0 | ||
mpls bgp forwarding | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
log stdout | ||
ip route 192.168.1.3/32 r3-eth0 | ||
vrf vrf1 | ||
ip route 172.31.3.0/24 172.31.2.10 | ||
exit-vrf | ||
interface r3-eth1 vrf vrf1 | ||
ip address 172.31.1.1/24 | ||
! | ||
interface r3-eth2 vrf vrf1 | ||
ip address 172.31.2.1/24 | ||
! | ||
interface r3-eth0 | ||
ip address 192.168.1.3/24 | ||
! |
Oops, something went wrong.