-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15368 from louis-6wind/fix-6pe
bgpd: fix 6vpe nexthop
- Loading branch information
Showing
16 changed files
with
735 additions
and
5 deletions.
There are no files selected for viewing
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
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,4 @@ | ||
ipv6 route fd00:200::/64 fd00:100::2 | ||
interface eth-pe1 | ||
ipv6 address fd00:100::1/64 | ||
! |
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,8 @@ | ||
ipv6 route fd00:100::/64 fd00:200::5 | ||
interface eth-pe2 | ||
ipv6 address fd00:200::6/64 | ||
ipv6 address fd00:201::6/64 | ||
ipv6 address fd00:300::6/64 | ||
ipv6 address fd00:400::6/64 | ||
ipv6 address fd01:200::6/64 | ||
! |
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,13 @@ | ||
{ | ||
"ipv6Vpn": { | ||
"routerId": "198.51.100.2", | ||
"as": 65500, | ||
"peers": { | ||
"192.0.2.5": { | ||
"remoteAs": 65501, | ||
"state": "Established", | ||
"peerState": "OK" | ||
} | ||
} | ||
} | ||
} |
116 changes: 116 additions & 0 deletions
116
tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgp_vrf_ipv6.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,116 @@ | ||
{ | ||
"vrfName": "vrf1", | ||
"routerId": "198.51.100.2", | ||
"defaultLocPrf": 100, | ||
"localAS": 65500, | ||
"routes": { | ||
"fd00:100::/64": [ | ||
{ | ||
"valid": true, | ||
"bestpath": true, | ||
"network": "fd00:100::/64", | ||
"metric": 0, | ||
"weight": 32768, | ||
"path": "", | ||
"nexthops": [ | ||
{ | ||
"ip": "::", | ||
"afi": "ipv6", | ||
"scope": "global", | ||
"used": true | ||
} | ||
] | ||
} | ||
], | ||
"fd00:200::/64": [ | ||
{ | ||
"valid": true, | ||
"bestpath": true, | ||
"network": "fd00:200::/64", | ||
"metric": 0, | ||
"weight": 0, | ||
"path": "65501", | ||
"nexthops": [ | ||
{ | ||
"ip": "::ffff:c000:205", | ||
"afi": "ipv6", | ||
"scope": "global", | ||
"used": true | ||
} | ||
] | ||
} | ||
], | ||
"fd00:201::/64": [ | ||
{ | ||
"valid": true, | ||
"bestpath": true, | ||
"network": "fd00:201::/64", | ||
"metric": 0, | ||
"weight": 0, | ||
"path": "65501", | ||
"nexthops": [ | ||
{ | ||
"ip": "::ffff:c000:205", | ||
"afi": "ipv6", | ||
"scope": "global", | ||
"used": true | ||
} | ||
] | ||
} | ||
], | ||
"fd00:300::/64": [ | ||
{ | ||
"valid": true, | ||
"bestpath": true, | ||
"network": "fd00:300::/64", | ||
"metric": 0, | ||
"weight": 0, | ||
"path": "65501", | ||
"nexthops": [ | ||
{ | ||
"ip": "::ffff:c000:205", | ||
"afi": "ipv6", | ||
"scope": "global", | ||
"used": true | ||
} | ||
] | ||
} | ||
], | ||
"fd00:400::/64": [ | ||
{ | ||
"valid": true, | ||
"bestpath": true, | ||
"network": "fd00:400::/64", | ||
"metric": 0, | ||
"weight": 0, | ||
"path": "65501", | ||
"nexthops": [ | ||
{ | ||
"ip": "::ffff:c000:205", | ||
"afi": "ipv6", | ||
"scope": "global", | ||
"used": true | ||
} | ||
] | ||
} | ||
], | ||
"fd01:200::/64": [ | ||
{ | ||
"valid": true, | ||
"bestpath": true, | ||
"network": "fd01:200::/64", | ||
"metric": 0, | ||
"weight": 0, | ||
"path": "65501", | ||
"nexthops": [ | ||
{ | ||
"ip": "::ffff:c000:205", | ||
"afi": "ipv6", | ||
"scope": "global", | ||
"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,32 @@ | ||
! | ||
!debug bgp zebra | ||
router bgp 65500 | ||
bgp router-id 198.51.100.2 | ||
no bgp ebgp-requires-policy | ||
neighbor 192.0.2.5 remote-as 65501 | ||
neighbor 192.0.2.5 capability extended-nexthop | ||
address-family ipv4 unicast | ||
no neighbor 192.0.2.5 activate | ||
exit-address-family | ||
address-family ipv6 vpn | ||
neighbor 192.0.2.5 activate | ||
neighbor 192.0.2.5 route-map rmap in | ||
exit-address-family | ||
exit | ||
router bgp 65500 vrf vrf1 | ||
bgp router-id 198.51.100.2 | ||
address-family ipv6 unicast | ||
redistribute connected | ||
label vpn export 101 | ||
rd vpn export 444:1 | ||
rt vpn both 52:100 | ||
export vpn | ||
import vpn | ||
exit-address-family | ||
! | ||
interface eth-pe2 | ||
mpls bgp forwarding | ||
! | ||
route-map rmap permit 1 | ||
set ipv6 next-hop prefer-global | ||
! |
142 changes: 142 additions & 0 deletions
142
tests/topotests/bgp_6vpe_ebgp_topo1/pe1/ipv6_routes_vrf.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,142 @@ | ||
{ | ||
"fd00:100::/64": [ | ||
{ | ||
"prefix": "fd00:100::/64", | ||
"protocol": "connected", | ||
"vrfName": "vrf1", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 0, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"fib": true, | ||
"directlyConnected": true, | ||
"interfaceName": "eth-h1", | ||
"active": true | ||
} | ||
] | ||
} | ||
], | ||
"fd00:200::/64": [ | ||
{ | ||
"prefix": "fd00:200::/64", | ||
"protocol": "bgp", | ||
"vrfName": "vrf1", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"ip": "::ffff:c000:205", | ||
"afi": "ipv6", | ||
"vrf": "default", | ||
"active": true, | ||
"labels": [ | ||
102 | ||
], | ||
"weight": 1 | ||
} | ||
] | ||
} | ||
], | ||
"fd00:201::/64": [ | ||
{ | ||
"prefix": "fd00:201::/64", | ||
"protocol": "bgp", | ||
"vrfName": "vrf1", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"ip": "::ffff:c000:205", | ||
"afi": "ipv6", | ||
"vrf": "default", | ||
"active": true, | ||
"labels": [ | ||
102 | ||
], | ||
"weight": 1 | ||
} | ||
] | ||
} | ||
], | ||
"fd00:300::/64": [ | ||
{ | ||
"prefix": "fd00:300::/64", | ||
"protocol": "bgp", | ||
"vrfName": "vrf1", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"ip": "::ffff:c000:205", | ||
"afi": "ipv6", | ||
"vrf": "default", | ||
"active": true, | ||
"labels": [ | ||
102 | ||
], | ||
"weight": 1 | ||
} | ||
] | ||
} | ||
], | ||
"fd00:400::/64": [ | ||
{ | ||
"prefix": "fd00:400::/64", | ||
"protocol": "bgp", | ||
"vrfName": "vrf1", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"ip": "::ffff:c000:205", | ||
"afi": "ipv6", | ||
"vrf": "default", | ||
"active": true, | ||
"labels": [ | ||
102 | ||
], | ||
"weight": 1 | ||
} | ||
] | ||
} | ||
], | ||
"fd01:200::/64": [ | ||
{ | ||
"prefix": "fd01:200::/64", | ||
"protocol": "bgp", | ||
"vrfName": "vrf1", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"ip": "::ffff:c000:205", | ||
"afi": "ipv6", | ||
"vrf": "default", | ||
"active": true, | ||
"labels": [ | ||
102 | ||
], | ||
"weight": 1 | ||
} | ||
] | ||
} | ||
] | ||
} |
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 @@ | ||
! | ||
interface lo | ||
ip router isis 1 | ||
isis hello-interval 1 | ||
isis hello-multiplier 3 | ||
! | ||
interface eth-pe2 | ||
ip router isis 1 | ||
isis hello-interval 1 | ||
isis hello-multiplier 3 | ||
! | ||
router isis 1 | ||
net 49.0000.0007.e901.2222.00 | ||
is-type level-1 | ||
lsp-gen-interval 1 | ||
mpls-te on | ||
mpls-te router-address 198.51.100.2 | ||
segment-routing on | ||
segment-routing node-msd 8 | ||
segment-routing global-block 1000 10000 local-block 30000 30999 | ||
segment-routing prefix 198.51.100.2/32 index 22 | ||
! | ||
|
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,11 @@ | ||
! | ||
interface eth-h1 | ||
ipv6 address fd00:100::2/64 | ||
! | ||
interface eth-pe2 | ||
ip address 192.0.2.2/24 | ||
ipv6 address ::ffff:192.0.2.2/120 | ||
! | ||
interface lo | ||
ip address 198.51.100.2/32 | ||
! |
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,13 @@ | ||
{ | ||
"ipv6Vpn": { | ||
"routerId": "198.51.100.5", | ||
"as": 65501, | ||
"peers": { | ||
"192.0.2.2": { | ||
"remoteAs": 65500, | ||
"state": "Established", | ||
"peerState": "OK" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.