mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 21:50:39 +00:00
tests: Check if match ipv6 next-hop prefix-list
command works
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
82f191a213
commit
c75d6ccbfe
@ -3,6 +3,8 @@ ipv6 access-list nh1 permit 2001:db8:1::/64
|
|||||||
ipv6 access-list nh2 permit 2001:db8:2::/64
|
ipv6 access-list nh2 permit 2001:db8:2::/64
|
||||||
ipv6 access-list nh3 permit 2001:db8:3::/64
|
ipv6 access-list nh3 permit 2001:db8:3::/64
|
||||||
!
|
!
|
||||||
|
ipv6 prefix-list nh4 permit 2001:db8:5::/64 le 128
|
||||||
|
!
|
||||||
router bgp 65001
|
router bgp 65001
|
||||||
bgp router-id 10.10.10.1
|
bgp router-id 10.10.10.1
|
||||||
no bgp ebgp-requires-policy
|
no bgp ebgp-requires-policy
|
||||||
@ -24,4 +26,7 @@ route-map r2 permit 30
|
|||||||
route-map r2 permit 40
|
route-map r2 permit 40
|
||||||
match ipv6 next-hop address 2001:db8:4::1
|
match ipv6 next-hop address 2001:db8:4::1
|
||||||
set community 65002:4
|
set community 65002:4
|
||||||
|
route-map r2 permit 50
|
||||||
|
match ipv6 next-hop prefix-list nh4
|
||||||
|
set community 65002:5
|
||||||
!
|
!
|
@ -13,6 +13,7 @@ ipv6 prefix-list p1 permit 2001:db8:1::1/128
|
|||||||
ipv6 prefix-list p2 permit 2001:db8:2::1/128
|
ipv6 prefix-list p2 permit 2001:db8:2::1/128
|
||||||
ipv6 prefix-list p3 permit 2001:db8:3::1/128
|
ipv6 prefix-list p3 permit 2001:db8:3::1/128
|
||||||
ipv6 prefix-list p4 permit 2001:db8:4::1/128
|
ipv6 prefix-list p4 permit 2001:db8:4::1/128
|
||||||
|
ipv6 prefix-list p5 permit 2001:db8:5::1/128
|
||||||
!
|
!
|
||||||
route-map r1 permit 10
|
route-map r1 permit 10
|
||||||
match ipv6 address prefix-list p1
|
match ipv6 address prefix-list p1
|
||||||
@ -26,4 +27,7 @@ route-map r1 permit 30
|
|||||||
route-map r1 permit 40
|
route-map r1 permit 40
|
||||||
match ipv6 address prefix-list p4
|
match ipv6 address prefix-list p4
|
||||||
set ipv6 next-hop global 2001:db8:4::1
|
set ipv6 next-hop global 2001:db8:4::1
|
||||||
|
route-map r1 permit 50
|
||||||
|
match ipv6 address prefix-list p5
|
||||||
|
set ipv6 next-hop global 2001:db8:5::1
|
||||||
!
|
!
|
@ -4,6 +4,7 @@ int lo
|
|||||||
ipv6 address 2001:db8:2::1/128
|
ipv6 address 2001:db8:2::1/128
|
||||||
ipv6 address 2001:db8:3::1/128
|
ipv6 address 2001:db8:3::1/128
|
||||||
ipv6 address 2001:db8:4::1/128
|
ipv6 address 2001:db8:4::1/128
|
||||||
|
ipv6 address 2001:db8:5::1/128
|
||||||
!
|
!
|
||||||
int r2-eth0
|
int r2-eth0
|
||||||
ip address 2001:db8::2/64
|
ip address 2001:db8::2/64
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
Test if we can match BGP prefixes by next-hop which is
|
Test if we can match BGP prefixes by next-hop which is
|
||||||
specified by an IPv6 Access-list.
|
specified by an IPv6 Access-list, prefix-list or just an address.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@ -103,6 +103,11 @@ def test_bgp_route_map_match_ipv6_next_hop_access_list():
|
|||||||
"communities": "65002:4",
|
"communities": "65002:4",
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"2001:db8:5::1/128": [
|
||||||
|
{
|
||||||
|
"communities": "65002:5",
|
||||||
|
}
|
||||||
|
],
|
||||||
}
|
}
|
||||||
return topotest.json_cmp(output, expected)
|
return topotest.json_cmp(output, expected)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user