OcNOS-RON : Layer 3 Guide : Layer 3 Unicast Configuration Guide : Static Route Discard Configuration : IPv6 Route Discard
IPv6 Route Discard
Figure 13-2 shows the configuration required to enable static route discard for IPv6.
Configuration
R1
 
R1#configure terminal
Enter configure mode.
R1(config)#interface lo
Enter interface mode for loopback
R1(config-if)#ip address 1.1.1.2/24 secondary
Assign an IPv4 address to the interface
R1(config-if)#commit
Commit the candidate configuration to the running configuration
R1(config-if)#exit
Exit interface mode
R1(config)#interface xe1
Enter interface mode for xe1
R1(config-if)#ipv6 address 2001::2/64
Assign an IPv6 address to the interface
R1(config-if)#commit
Commit the candidate configuration to the running configuration
R1(config-if)#exit
Exit interface mode
R1(config)#interface xe2
Enter interface mode for xe2
R1(config-if)#ipv6 address 1001::2/64
Assign an IPv6 address to the interface
R1(config-if)#commit
Commit the candidate configuration to the running configuration
R1(config-if)#exit
Exit interface mode
R1(config)#router bgp 2
Enter BGP router mode
R1(config-router)#bgp router-id 1.1.1.1
Specify router ID
R1(config-router)#neighbor 2001::3 remote-as 3
Create static BGP neighbor 2001::3 with remote autonomous system value 3
R1(config-router)#address-family ipv6 unicast
Enter address family IPv6 unicast mode
R1(config-router-af)#neighbor 2001::3 activate
Activate neighbor in IPv6 address family
R1(config-router-af)#redistribute connected
Advertise the connected network into BGP
R1(config-if)#commit
Commit the candidate configuration to the running configuration
R1(config-router)#end
Exit BGP router mode
R2
 
R2#configure terminal
Enter configure mode
R2(config)#interface lo
Enter interface mode for loopback
R2(config-if)#ip address 2.2.2.2/24 secondary
Assign an IPV4 address
R2(config-router-af)#commit
Commit the candidate configuration to the running configuration
R2(config-if)#exit
Exit interface mode
R2(config)#ipv6 prefix-list p1 permit any
Configure IPv6 prefix list.
R2(config)#route-map r1
Enter route-map mode.
R2(config-route-map)#match ipv6 address prefix-list p1
Configure match IPv6 prefix list p1
R2(config-route-map)#set interface null0
Set the interface to null0
R2(config-router-af)#commit
Commit the candidate configuration to the running configuration
R2(config-route-map)#exit
Exit route-map mode
R2(config)#interface xe1
Enter interface mode for xe1
R2(config-if)#ipv6 address 2001::3/64
Assign ipv6 address to the interface
R2(config-router-af)#commit
Commit the candidate configuration to the running configuration
R2(config-if)#exit
Exit interface mode
R2(config)#interface xe2
Enter interface mode for xe2
R2(config-if)#ipv6 address 3001::2/64
Assign an IPv6 address to the interface
R2(config-if)#commit
Commit the candidate configuration to the running configuration
R2(config-if)#exit
Exit interface mode
R2(config)#router bgp 3
Enter BGP router mode
R2(config-router)#bgp router-id 2.2.2.2
Specify router ID
R2(config-router)#neighbor 2001::2 remote-as 2
Create static BGP neighbor 2001::2 with remote autonomous system value 2
R2(config-router)#neighbor 3001::3 remote-as 4
Create static BGP neighbor 3001::3 with remote autonomous system value 4
R2(config-router)#address-family ipv6 unicast
Enter address family IPv6 unicast mode
R2(config-router-af)#redistribute connected
Advertise the connected network into BGP
R2(config-router-af)#neighbor 2001::2 activate
Activate the neighbor in IPv6 address family
R2(config-router-af)#neighbor 3001::3 activate
Activate the neighbor in IPv6 address family
R2(config-router-af)#neighbor 2001::2 route-map r1 in
Attach the route-map with route discard configured for the neighbor 2001::2 in IN direction
R2(config-router-af)#commit
Commit the candidate configuration to the running configuration
R2(config-router)#end
Exit BGP router mode
R3
 
R3#configure terminal
Enter configure mode
R3(config)#interface lo
Enter interface mode for loopback
R3(config-if)#ip address 3.3.3.2/24 secondary
Assign an IPV4 address to the interface
R3(config-if)#commit
Commit the candidate configuration to the running configuration
R3(config-if)#exit
Exit interface mode
R3(config)#interface xe1
Enter interface mode for xe1
R3(config-if)#ipv6 address 4001::2/64
Assign an IPv6 address to the interface
R3(config-if)#commit
Commit the candidate configuration to the running configuration
R3(config-if)#exit
Exit interface mode
R3(config)#interface xe2
Enter interface mode for xe2
R3(config-if)#ipv6 address 3001::3/64
Assign an IPv6 address to the interface
R3(config-if)#exit
Exit interface mode
R3(config)#router bgp 4
Enter into BGP router mode
R3(config-router)#bgp router-id 3.3.3.3
Specify router ID
R3(config-router)#neighbor 3001::2 remote-as 3
Create static BGP neighbor 3001::2 with remote autonomous system value 3
R3(config-router)#address-family ipv6 unicast
Enter address family IPv6 unicast mode
R3(config-router-af)#neighbor 3001::2 activate
Activate neighbor in IPv6 address family
R3(config-router-af)#redistribute connected
Advertise the connected network into BGP
R3(config-router-af)#commit
Commit the candidate configuration to the running configuration
R3(config-router)#end
Exit BGP router mode.
Validation
R2#show running-config bgp
!
router bgp 3
bgp router-id 2.2.2.2
neighbor 2001::2 remote-as 2
neighbor 3001::3 remote-as 4
!
address-family ipv6 unicast
redistribute connected
neighbor 2001::2 activate
neighbor 2001::2 route-map r1 in
neighbor 3001::3 activate
exit-address-family
!
R2#show bgp ipv6
BGP table version is 3, local router ID is 2.2.2.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
*> 1001::/64 2001::2(fe80::218:23ff:fede:eecf)
0 100 0 2?
*> 2001::/64 :: 0 100 32768 ?
* 2001::2(fe80::218:23ff:fede:eecf)
0 100 0 2?
*> 3001::/64 :: 0 100 32768 ?
* 3001::3(fe80::eef4:bbff:fe84:781b) 0 100 0 4? *> 4001::/64 3001::3(fe80::eef4:bbff:fe84:781b) 0 100 0 4?
 
Total number of prefixes 4
 
 
R2#show running-config ipv6 prefix-list
!
ipv6 prefix-list p1 seq 5 permit any
!
 
R2#
 
R2#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, I - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 00:56:44
B 1001::/64 [20/0] via ::, Null, 00:00:04
C 2001::/64 via ::, xe1, 00:13:03
C 3001::/64 via ::, xe2, 00:12:56
B 4001::/64 [20/0] via fe80::eef4:bbff:fe84:781b, xe50, 00:00:02
C fe80::/64 via ::, xe50, 00:46:14
 
 
R2#show hsl nh-table
IPv4 FIB 0
 
IPv4 FIB 1
10.12.29.1, eth0, 00:00:00:00:00:00, Invalid,
, Not Installed TO_CPU
 
IPv6 FIB 0
, Null, 00:00:00:00:00:00, Valid ,
1001::/64, Installed FORWARD
2001::2, xe1, 00:18:23:de:ee:cf, Valid , lport:0x8000034, Egress object id:100003, refcnt 0, rulecnt 0
3001::3, xe2, ec:f4:bb:84:78:1b, Valid , lport:0x8000032, Egress object id:100004, refcnt 0, rulecnt 0
fe80::218:23ff:fede:eecf, xe52, 00:18:23:de:ee:cf, Valid , lport:0x8000034, Egress object id:100003, refcn
t 0, rulecnt 0
fe80::eef4:bbff:fe84:781b, xe50, ec:f4:bb:84:78:1b, Valid , lport:0x8000032, Egress object id:100004, refc
nt 1, rulecnt 0,
4001::/64, Installed FORWARD
 
IPv6 FIB 1
 
Last modified date: 08/28/2023