BGP IPv6 - Local Preference Attributes

Local Preference Attributes

The BGP (Border Gateway Protocol) IPv6 Local Preference attribute is a key parameter used to influence routing decisions within an Autonomous System (AS). Similar to its IPv4 counterpart, the IPv6 Local Preference is a 32-bit value assigned to incoming routes by an AS border router. Higher Local Preference values are considered more preferable, and routers within the AS use this attribute to determine the best path when multiple routes to the same destination exist. BGP IPv6 Local Preference is a powerful tool for administrators to control outbound traffic flow by influencing the selection of a preferred exit point for traffic leaving the AS. This attribute is particularly valuable for implementing traffic engineering policies and prioritizing certain paths over others based on factors such as link capacity, policy requirements, or service-level agreements. Proper configuration of BGP IPv6 Local Preference values enables network administrators to achieve efficient and controlled traffic distribution within their IPv6 BGP networks.

Lab:

Disclaimer

This Configuration Guide is designed to assist members to enhance their skills in particular technology area. While every effort has been made to ensure that all material is as complete and accurate as possible, the enclosed material is presented on an “as is” basis. Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this guide. This configuration guide was developed by Forum. Any similarities between material presented in this configuration guide and any other material is completely coincidental.

Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.2(4)M1, DEVELOPMENT TEST SOFTWARE

Task 1: Configure IPv6 BGP Local Preference Attributes for Autonomous

Step 1: In the configuration mode of router configure BGP Local Preference Attributes by following command:

R2:
router bgp 65000
address-family ipv6
neighbor 11:0:1::1 route-map xyz in
exit
exit
route-map xyz permit 10
set local-preference 5000
exit

A policy is call on Router R2 that to reach 100 network via 11:0:1::1 through AS 65000 preference is set 5000

R1:
router bgp 65100
address-family ipv6
neighbor 22:0:1::2 route-map xyz out
exit
exit
route-map xyz permit 10
set local-preference 10000
exit

A policy is call on Router R1 that to reach 100 network via 22:0:1::2 through AS 65100 preference is set 10000

Step 2: Verify IPv6 BGP routes by following command

R2#show bgp ipv6 unicast
BGP table version is 29, local router ID is 22.0.3.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop          Metric    LocPrf    Weight    Path
 *>  11:0:1::/64      11:0:1::1           0       5000        0       65100 i
 *>  11:0:2::/64      11:0:1::1           0       5000        0       65100 i
 *>  11:0:3::/64      11:0:1::1           0       5000        0       65100 i
 *>  22:0:1::/64      ::                  0                  32768    i
 *>  22:0:2::/64      ::                  0                  32768    i
 *>  22:0:3::/64      ::                  0                  32768    i
 *>i 33:0:1::/64      33:0:1::3           0       100         0       i
 *>i 33:0:2::/64      33:0:1::3           0       100         0       i
 *>i 33:0:3::/64      33:0:1::3           0       100         0       i
 *>i 44:0:1::/64      44:0:1::4           0       100         0       65200 i
 *>i 44:0:2::/64      44:0:1::4           0       100         0       65200 i
 *>i 44:0:3::/64      44:0:1::4           0       100         0       65200 i
 *>  100::/64         11:0:1::1           0       5000        0       65100 i

Local Preference is by default 100 which is seen only on IBGP neighbor Local Preference is Local to an Autonomous. It is non-transitive parameter and is stripped of when routes are moving from one AS to another AS.

R2 - Router R2 now selects 11:0:1::1 as best path because it can reach 100 network through As 65200 with Local Preference 5000, where as to reach 100 network via 44:0:1::4 through AS 65200 with Local Preference 100 Hence path is manipulated with help of Local Preference. We as an Administrator changed the decision of Router R2 to reach 100:: network via 44:0:1::4 to path via 11:0:1::1 as best path. Therefore it shows only one path in its BGP Table and is ironically known as Sukhiram.

R3# show bgp ipv6 unicast
BGP table version is 29, local router ID is 33.0.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop        Metric     LocPrf    Weight    Path
 *>i 11:0:1::/64      11:0:1::1         0         5000       0       65100 i
 *>i 11:0:2::/64      11:0:1::1         0         5000       0       65100 i
 *>i 11:0:3::/64      11:0:1::1         0         5000       0       65100 i
 *>i 22:0:1::/64      22:0:1::2         0         100        0         i
 *>i 22:0:2::/64      22:0:1::2         0         100        0         i
 *>i 22:0:3::/64      22:0:1::2         0         100        0         i
 *>  33:0:1::/64      ::                0                  32768       i
 *>  33:0:2::/64      ::                0                  32768       i
 *>  33:0:3::/64      ::                0                  32768       i
 *>  44:0:1::/64      44:0:1::4         0                    0       65200 i
 *>  44:0:2::/64      44:0:1::4         0                    0       65200 i
 *>  44:0:3::/64      44:0:1::4         0                    0       65200 i
 *>i 100::/64         11:0:1::1         0         5000       0       65100 i
 *                    44:0:1::4         0                    0       65200 i

R3 - As Local Preference is Local to an Autonomous and R3 belongs to same Autonomous, therefore Router R3 will also select best path as 11:0:1::1 but will show both the path in its BGP table and is ironically known as Dukhiram