Cisco device configuration tutorials and networking fundamentals
Cisco configuration tutorials
Jump to section:
Multiprotocol BGP (MP-BGP) is an extenstion to BGP, and a capability which is negotiated between BGP neighbors. The BGP multiprotocol capability enables advertisement of IPv6 routes with BGP. MP-BGP can also carry routes for a variety of other address-families, such as multicast, Layer-3 VPN or Layer-2 VPN.
Thus, MP-BGP is an extension to the existing BGP specification, and it provides the flexibility needed for BGP to operate with IPv6 and other address-families. The specific address-families supported by MP-BGP are grouped into categories. These categories are called AFI (Address Family Identifier) and SAFI (Subsequent Address Family Identifier).
When BGP speaking routers form a MP-BGP neighborship, they advertise supported address-families (IPv4, IPv6, multicast etc) to each other. Specifically, the BGP Open message contains the AFI/SAFI address-family categories. The following packet capture shows a BGP Open message which informs a BGP neighbor that the address-family IPv6 in unicast mode is supported.
The command ipv6 unicast-routing issued in global configuration mode enables IPv6 routing. Further, the BGP Router ID has to be configured in order to form a BGP IPv6 neighborship. If a Router ID is not configured, the following message is visible.
Router#show bgp ipv6 unicast summary % BGP cannot run because the router-id is not configured BGP router identifier 0.0.0.0, local AS number 65002 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2001:DB8::1 4 65001 0 0 1 0 0 never Idle
The next sections provide four example BGP IPv6 configurations listed below:
When configuring BGP IPv6, the address-family IPv6 capability needs to be activated per neighbor. Activating the address-family IPv6 does automatically deactivate the address-family IPv4 for those same neighbors.
The following example shows BGP IPv6 configured with example 2-byte AS numbers 65001 and 65002. Note that the ASNs are in fact chosen from the 2-byte range 0 - 65535, however these BGP implementations may already support 4-byte ASNs (which includes a mappable range).
Configuration:
R1#show run | sec router router bgp 65001 bgp router-id 1.1.1.1 bgp log-neighbor-changes neighbor 2001:DB8::2 remote-as 65002 ! address-family ipv4 no neighbor 2001:DB8::2 activate exit-address-family ! address-family ipv6 network 2001:DB8:1::/64 network 2001:DB8:2::/64 neighbor 2001:DB8::2 activate exit-address-family R1#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to R2 ** no ip address duplex auto speed auto media-type rj45 ipv6 address FE80::1 link-local ipv6 address 2001:DB8::1/64 R1#show run int Lo10 | sec int interface Loopback10 no ip address ipv6 address 2001:DB8:1::1/64 R1#show run int Lo20 | sec int interface Loopback20 no ip address ipv6 address 2001:DB8:2::1/64 R1#show run | sec ipv6 unicast ipv6 unicast-routing
R2#show run | sec router router bgp 65002 bgp router-id 2.2.2.2 bgp log-neighbor-changes neighbor 2001:DB8::1 remote-as 65001 ! address-family ipv4 no neighbor 2001:DB8::1 activate exit-address-family ! address-family ipv6 neighbor 2001:DB8::1 activate exit-address-family R2#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to R1 ** no ip address duplex auto speed auto media-type rj45 ipv6 address FE80::2 link-local ipv6 address 2001:DB8::2/64 R2#show run | sec ipv6 unicast ipv6 unicast-routing
R2#show bgp ipv6 unicast summary | begin Neighbor Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2001:DB8::1 4 65001 19 18 3 0 0 00:13:21 2 « Two IPv6 prefixes received R2#show bgp ipv6 unicast | begin Network Network Next Hop Metric LocPrf Weight Path *> 2001:DB8:1::/64 2001:DB8::1 0 0 65001 i *> 2001:DB8:2::/64 2001:DB8::1 0 0 65001 i R2#show bgp ipv6 unicast 2001:DB8:1::/64 BGP routing table entry for 2001:DB8:1::/64, version 2 Paths: (1 available, best #1, table default) Flag: 0x100 Not advertised to any peer Refresh Epoch 1 65001 2001:DB8::1 (FE80::1) from 2001:DB8::1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best rx pathid: 0, tx pathid: 0x0
The following example shows BGP IPv6 configured with the 4-byte AS numbers 64086.59904 and 64086.59905. 4-byte BGP AS numbers provide a larger address space and many more available BGP ASNs when compared to 2-byte AS-s.
The command bgp asnotation dot configured under the BGP routing process instructs the router to display 4-byte BGP ASNs with the asdot notation instead of the asplain notation.
Configuration:
R1#show run | sec router router bgp 64086.59904 bgp router-id 1.1.1.1 bgp asnotation dot bgp log-neighbor-changes neighbor 2001:DB8::2 remote-as 64086.59905 ! address-family ipv4 no neighbor 2001:DB8::2 activate exit-address-family ! address-family ipv6 network 2001:DB8:1::/64 network 2001:DB8:2::/64 neighbor 2001:DB8::2 activate exit-address-family R1#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to R2 ** no ip address duplex auto speed auto media-type rj45 ipv6 address FE80::1 link-local ipv6 address 2001:DB8::1/64 R1#show run int Lo10 | sec int interface Loopback10 no ip address ipv6 address 2001:DB8:1::1/64 R1#show run int Lo20 | sec int interface Loopback20 no ip address ipv6 address 2001:DB8:2::1/64 R1#show run | sec ipv6 unicast ipv6 unicast-routing
R2#show run | sec router router bgp 64086.59905 bgp router-id 2.2.2.2 bgp asnotation dot bgp log-neighbor-changes neighbor 2001:DB8::1 remote-as 64086.59904 ! address-family ipv4 no neighbor 2001:DB8::1 activate exit-address-family ! address-family ipv6 neighbor 2001:DB8::1 activate exit-address-family R2#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to R1 ** no ip address duplex auto speed auto media-type rj45 ipv6 address FE80::2 link-local ipv6 address 2001:DB8::2/64 R2#show run | sec ipv6 unicast ipv6 unicast-routing
R2#show bgp ipv6 unicast summary | begin Neighbor Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2001:DB8::1 4 64086.59904 14 13 3 0 0 00:09:34 2 R2#show bgp ipv6 unicast | begin Network Network Next Hop Metric LocPrf Weight Path *> 2001:DB8:1::/64 2001:DB8::1 0 0 64086.59904 i *> 2001:DB8:2::/64 2001:DB8::1 0 0 64086.59904 i R2#show bgp ipv6 unicast 2001:DB8:1::/64 BGP routing table entry for 2001:DB8:1::/64, version 2 Paths: (1 available, best #1, table default) Flag: 0x100 Not advertised to any peer Refresh Epoch 1 64086.59904 2001:DB8::1 (FE80::1) from 2001:DB8::1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best rx pathid: 0, tx pathid: 0x0
The following example shows BGP IPv6 configured with peer-templates. BGP peer templates provide a framework for configuring BGP in an organized way. Two types of templates are used, peer-session and peer-policy templates. Each type of template includes a specific BGP configuration, and the templates are assigned to a BGP neighbor with the inherit command.
In this example topology, R1 originates a default route and advertises it to R2.
Configuration:
R1#show run | sec router router bgp 65001 template peer-policy POLICY-TEMP default-originate exit-peer-policy ! template peer-session SESSION-TEMP remote-as 65002 exit-peer-session ! bgp router-id 1.1.1.1 bgp log-neighbor-changes neighbor 2001:DB8::2 inherit peer-session SESSION-TEMP ! address-family ipv4 no neighbor 2001:DB8::2 activate exit-address-family ! address-family ipv6 neighbor 2001:DB8::2 activate neighbor 2001:DB8::2 inherit peer-policy POLICY-TEMP exit-address-family R1#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to R2 ** no ip address duplex auto speed auto media-type rj45 ipv6 address FE80::1 link-local ipv6 address 2001:DB8::1/64 R1#show run int Lo10 | sec int interface Loopback10 no ip address ipv6 address 2001:DB8:1::1/64 R1#show run int Lo20 | sec int interface Loopback20 no ip address ipv6 address 2001:DB8:2::1/64 R1#show run | sec ipv6 unicast ipv6 unicast-routing
R2#show run | sec router router bgp 65002 template peer-session SESSION-TEMP remote-as 65001 exit-peer-session ! bgp router-id 2.2.2.2 bgp log-neighbor-changes neighbor 2001:DB8::1 inherit peer-session SESSION-TEMP ! address-family ipv4 no neighbor 2001:DB8::1 activate exit-address-family ! address-family ipv6 neighbor 2001:DB8::1 activate exit-address-family R2#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to R1 ** no ip address duplex auto speed auto media-type rj45 ipv6 address FE80::2 link-local ipv6 address 2001:DB8::2/64 R2#show run | sec ipv6 unicast ipv6 unicast-routing
R2#show bgp ipv6 unicast summary | begin Neighbor Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2001:DB8::1 4 65001 17 16 2 0 0 00:11:30 1 « Default route received from R1 R2#show bgp ipv6 unicast | begin Network Network Next Hop Metric LocPrf Weight Path *> ::/0 2001:DB8::1 0 65001 i R2#show bgp ipv6 unicast ::/0 BGP routing table entry for ::/0, version 2 Paths: (1 available, best #1, table default) Flag: 0x100 Not advertised to any peer Refresh Epoch 1 65001 2001:DB8::1 (FE80::1) from 2001:DB8::1 (1.1.1.1) Origin IGP, localpref 100, valid, external, best rx pathid: 0, tx pathid: 0x0
The following example shows BGP IPv6 configured with IOS-XR. With IOS-XR the command ipv6 unicast-routing does not need to be configured. However, a route-policy (RPL) needs to be configured to explicitly permit and deny inbound and outbound BGP advertisements. Accordingly, a route-policy is configured on R1 to permit the advertisement of the two connected IPv6 addresses 2001:DB8:1::1/64 and 2001:DB8:2::1/64.
Configuration:
RP/0/0/CPU0:R1#show run | begin hostname
Mon Dec 4 16:24:17.637 UTC
Building configuration...
hostname R1
interface Loopback10
ipv6 address 2001:db8:1::1/64
!
interface Loopback20
ipv6 address 2001:db8:2::1/64
!
interface MgmtEth0/0/CPU0/0
shutdown
!
interface GigabitEthernet0/0/0/0
description ** to R2 **
ipv6 address fe80::1 link-local
ipv6 address 2001:db8::1/64
!
interface GigabitEthernet0/0/0/1
shutdown
!
interface GigabitEthernet0/0/0/2
shutdown
!
prefix-set PFX-SET-LOOPB
2001:db8:1::/64,
2001:db8:2::/64
end-set
!
route-policy BGP-NEIGHBOR
pass
end-policy
!
route-policy REDIST-LOOPB
if destination in PFX-SET-LOOPB then
pass
else
drop
endif
end-policy
!
router bgp 65001
bgp router-id 1.1.1.1
address-family ipv6 unicast
network 2001:db8:1::/64
network 2001:db8:2::/64
!
neighbor 2001:db8::2
remote-as 65002
address-family ipv6 unicast
route-policy BGP-NEIGHBOR in
route-policy REDIST-LOOPB out
!
!
!
end
RP/0/0/CPU0:R2#show run | begin hostname
Mon Dec 4 16:24:32.857 UTC
Building configuration...
hostname R2
interface MgmtEth0/0/CPU0/0
shutdown
!
interface GigabitEthernet0/0/0/0
description ** to R1 **
ipv6 address fe80::2 link-local
ipv6 address 2001:db8::2/64
!
interface GigabitEthernet0/0/0/1
shutdown
!
interface GigabitEthernet0/0/0/2
shutdown
!
route-policy BGP-NEIGHBOR
pass
end-policy
!
router bgp 65002
bgp router-id 2.2.2.2
address-family ipv6 unicast
!
neighbor 2001:db8::1
remote-as 65001
address-family ipv6 unicast
route-policy BGP-NEIGHBOR in
route-policy BGP-NEIGHBOR out
!
!
!
end
RP/0/RP0/CPU0:R2#show bgp ipv6 unicast summary | beg Neighbor Tue Apr 15 16:32:44.781 UTC Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd 2001:db8::1 0 65001 10 9 4 0 0 00:06:04 2 RP/0/RP0/CPU0:R2#show bgp ipv6 unicast | beg Network Tue Apr 15 16:32:27.663 UTC Network Next Hop Metric LocPrf Weight Path *> 2001:db8:1::/64 2001:db8::1 0 0 65001 i *> 2001:db8:2::/64 2001:db8::1 0 0 65001 i Processed 2 prefixes, 2 paths RP/0/RP0/CPU0:R2#show bgp ipv6 unicast 2001:DB8:1::/64 Tue Apr 15 16:32:00.514 UTC BGP routing table entry for 2001:db8:1::/64 Versions: Process bRIB/RIB SendTblVer Speaker 4 4 Last Modified: Apr 15 16:27:39.653 for 00:04:20 Paths: (1 available, best #1) Not advertised to any peer Path #1: Received by speaker 0 Not advertised to any peer 65001 2001:db8::1 from 2001:db8::1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best, group-best Received Path ID 0, Local Path ID 1, version 4 Origin-AS validity: (disabled) RP/0/RP0/CPU0:R2#show route ipv6 bgp Tue Apr 15 16:30:55.816 UTC B 2001:db8:1::/64 [20/0] via fe80::1, 00:03:15, GigabitEthernet0/0/0/0 B 2001:db8:2::/64 [20/0] via fe80::1, 00:03:15, GigabitEthernet0/0/0/0
The following packet capture shows a Multiprotocol BGP Update message carrying an IPv6 prefix. The BGP standard community value 65001:100 is advertised together with the IPv6 prefix.
Notice that the "Next hop" field in the packet capture contains two IPv6 addresses. The global address 2001:DB8::1 is visible, as well as a link-local address in the EUI-64 format (starting with FE80:: and created with the MAC-to-EUI64 conversion process). These two addresses are included in BGP Update messages and visible in the BGP table because several IPv6 applications and routing protocols need a link-local next-hop address to function. The behavior is explained in RFC 2545, and an excerpt is quoted below.
Companion IPv6 specifications further define that only link-local address can be used when generating ICMP Redirect Messages [ND] and as next hop addresses in some routing protocols (eg. RIPng [RIP]).
[...]
For the above reasons, when BGP-4 is used to convey IPv6 reachability information it is sometimes necessary to announce a next hop attribute that consists of a global address and a link-local address.
RFC 2545, Use of BGP-4 Multiprotocol Extensions for IPv6 Inter-Domain Routing
In the following example scenario, IPv6 prefixes are advertised over an IPv4 BGP neighborship. R1 and R2 are directly connected with a dual stack IPv4/IPv6 link. R1 advertises both IPv4 and IPv6 routes to R2. However, the routes are shared over a single BGP IPv4 neighborship.
An important aspect of this configuration is the route-map that is configured on R1. The route-map instructs R2 to use the IPv6 next-hop address 2001:DB8::1/64 (configured on R1). Otherwise, the IPv6 prefixes are advertised to R2 but a valid next-hop address would not be available.
Configuration:
R1#show run | sec router router bgp 65001 bgp router-id 1.1.1.1 bgp log-neighbor-changes neighbor 10.0.0.2 remote-as 65002 ! address-family ipv4 network 192.168.1.0 network 192.168.2.0 neighbor 10.0.0.2 activate exit-address-family ! address-family ipv6 network 2001:DB8:1::/64 network 2001:DB8:2::/64 neighbor 10.0.0.2 activate neighbor 10.0.0.2 route-map RM-BGP-IPV6 out exit-address-family R1#show run | sec ^route-map route-map RM-BGP-IPV6 permit 10 set ipv6 next-hop 2001:DB8::1 R1#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to R2 ** ip address 10.0.0.1 255.255.255.252 duplex auto speed auto media-type rj45 ipv6 address FE80::1 link-local ipv6 address 2001:DB8::1/64 R1#show run int Lo10 | sec int interface Loopback10 ip address 192.168.1.1 255.255.255.0 ipv6 address 2001:DB8:1::1/64 R1#show run int Lo20 | sec int interface Loopback20 ip address 192.168.2.1 255.255.255.0 ipv6 address 2001:DB8:2::1/64 R1#show run | sec ipv6 unicast ipv6 unicast-routing
R2#show run | sec router router bgp 65002 bgp router-id 2.2.2.2 bgp log-neighbor-changes neighbor 10.0.0.1 remote-as 65001 ! address-family ipv4 neighbor 10.0.0.1 activate exit-address-family ! address-family ipv6 neighbor 10.0.0.1 activate exit-address-family R2#show run int Gi0/0 | sec int interface GigabitEthernet0/0 description ** to R1 ** ip address 10.0.0.2 255.255.255.252 duplex auto speed auto media-type rj45 ipv6 address FE80::2 link-local ipv6 address 2001:DB8::2/64 R2#show run | sec ipv6 unicast ipv6 unicast-routing
R2#show bgp ipv6 unicast summary | beg Ne Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.0.1 4 65001 7 5 9 0 0 00:00:32 2 R2#show ip bgp summary | beg Ne Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.0.1 4 65001 7 5 15 0 0 00:00:49 2 R2#show bgp ipv6 unicast | beg Ne Network Next Hop Metric LocPrf Weight Path *> 2001:DB8:1::/64 2001:DB8::1 0 0 65001 i *> 2001:DB8:2::/64 2001:DB8::1 0 0 65001 i R2#show ip bgp | beg Ne Network Next Hop Metric LocPrf Weight Path *> 192.168.1.0 10.0.0.1 0 0 65001 i *> 192.168.2.0 10.0.0.1 0 0 65001 i R2#show ipv6 route bgp | beg B__ B 2001:DB8:1::/64 [20/0] via FE80::1, GigabitEthernet0/0 B 2001:DB8:2::/64 [20/0] via FE80::1, GigabitEthernet0/0 R2#show ip route bgp | beg Ga Gateway of last resort is not set B 192.168.1.0/24 [20/0] via 10.0.0.1, 00:25:23 B 192.168.2.0/24 [20/0] via 10.0.0.1, 00:25:23 R2#ping 2001:DB8:1::1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2001:DB8:1::1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms R2#ping 2001:DB8:2::1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2001:DB8:2::1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
The following packet capture shows the BGP UPDATE message that is sent from R1 to R2 over the IPv4 BGP neighborship. It contains two IPv6 NLRI prefixes and IPv6 next-hop addresses. The next-hop address is configured through the route-map on R1.
Notice what happens when the route-map (setting IPv6 next-hop) is removed on R1. In such a scenario, an address mapping takes place to ensure the IPv4 address is represented as an IPv6 next-hop based on the RFC 4798 (6PE) and RFC 4659. This is shown in the following output taken from R2. You can see a similar mechanism happening when implementing MPLS 6PE.
R2#show bgp ipv6 unicast | beg Ne Network Next Hop Metric LocPrf Weight Path * 2001:DB8:1::/64 ::FFFF:10.0.0.1 0 0 65001 i * 2001:DB8:2::/64 ::FFFF:10.0.0.1 0 0 65001 i R2#show bgp ipv6 unicast 2001:DB8:1::/64 BGP routing table entry for 2001:DB8:1::/64, version 8 Paths: (1 available, no best path) Not advertised to any peer Refresh Epoch 1 65001 ::FFFF:10.0.0.1 (inaccessible) from 10.0.0.1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external rx pathid: 0, tx pathid: 0
In the following example topology, IPv6 routing is configured using 4-byte BGP ASN-s in the asdot notation. BGP authentication, TTL security as well as BFD are configured between R2 - R3 and R2 - R4.
R2 receives only default-routes via BGP from AS 64086.5995. R2 sends the summary route 2001:DB8:1::/48 to R3 and R4. R2 also sends the leaked prefix 2001:DB8:1:1::/64 to only R4 using an unsuppress-map (advertised together with the summary route). Additionally, R2 prepends its AS-Path towards R4.
Configuration:
R2#show run | sec router router ospfv3 1 router-id 2.2.2.2 ! address-family ipv6 unicast default-information originate always exit-address-family router bgp 64086.5994 template peer-session PeerSession-AS64086.5995 remote-as 64086.5995 description ** Peering with AS 64086.5995 (R3 and R4) ** password p4ssw0rd.123 ttl-security hops 1 fall-over bfd exit-peer-session ! bgp router-id 2.2.2.2 bgp asnotation dot bgp log-neighbor-changes neighbor 2001:DB8:0:1::1 inherit peer-session PeerSession-AS64086.5995 neighbor 2001:DB8:0:2::1 inherit peer-session PeerSession-AS64086.5995 ! address-family ipv4 no neighbor 2001:DB8:0:1::1 activate no neighbor 2001:DB8:0:2::1 activate exit-address-family ! address-family ipv6 redistribute ospf 1 network 2001:DB8:1:4::/64 aggregate-address 2001:DB8:1::/48 summary-only neighbor 2001:DB8:0:1::1 activate neighbor 2001:DB8:0:2::1 activate neighbor 2001:DB8:0:2::1 route-map RM-AS-PATH-PREPEND out neighbor 2001:DB8:0:2::1 unsuppress-map RM-UNSUPPRESS exit-address-family R2#show run | sec ^route-map RM-AS-PATH-PREPEND route-map RM-AS-PATH-PREPEND permit 5 set as-path prepend 64086.6000 64086.6001 64086.6002 R2#show run | sec ^route-map RM-UNSUPPRESS route-map RM-UNSUPPRESS permit 5 match ipv6 address prefix-list PL-UNSUPPRESS set as-path prepend 64086.6000 64086.6001 64086.6002 R2#show run | sec ipv6 prefix-list PL-UNSUPPRESS ipv6 prefix-list PL-UNSUPPRESS seq 5 permit 2001:DB8:1:1::/64 ipv6 prefix-list PL-UNSUPPRESS seq 10 deny ::/0 le 128 R2#show run int Gi0/0 | i ipv6|de description ** SW2 ** ipv6 address FE80::1 link-local ipv6 address 2001:DB8:1:4::1/64 ipv6 ospf 1 area 0 R2#show run int Gi0/1 | i ipv6|de|bfd description ** R3 ** ipv6 address FE80::2 link-local ipv6 address 2001:DB8:0:1::2/64 bfd interval 100 min_rx 100 multiplier 3
R3#show run | sec router router bgp 64086.5995 bgp router-id 3.3.3.3 bgp asnotation dot bgp log-neighbor-changes neighbor 2001:DB8:0:1::2 remote-as 64086.5994 neighbor 2001:DB8:0:1::2 description ** Peering with R2 ** neighbor 2001:DB8:0:1::2 ttl-security hops 1 neighbor 2001:DB8:0:1::2 password p4ssw0rd.123 neighbor 2001:DB8:0:1::2 fall-over bfd neighbor 2001:DB8:2:1::2 remote-as 64086.5995 ! address-family ipv4 no neighbor 2001:DB8:0:1::2 activate no neighbor 2001:DB8:2:1::2 activate exit-address-family ! address-family ipv6 neighbor 2001:DB8:0:1::2 activate neighbor 2001:DB8:0:1::2 default-originate neighbor 2001:DB8:0:1::2 route-map RM-PERMIT-ONLY-DEFAULT out neighbor 2001:DB8:2:1::2 activate neighbor 2001:DB8:2:1::2 next-hop-self exit-address-family R3#show run | sec ^route-map route-map RM-PERMIT-ONLY-DEFAULT permit 5 match ipv6 address prefix-list PL-ONLY-DEFAULT route-map RM-PERMIT-ONLY-DEFAULT deny 10 R3#show run | sec ^ipv6 prefix-list ipv6 prefix-list PL-ONLY-DEFAULT seq 10 permit ::/0 ipv6 prefix-list PL-ONLY-DEFAULT seq 15 deny ::/0 le 128 R3#show run int Gi0/0 | i ipv6|de|bfd description ** R2 ** ipv6 address FE80::1 link-local ipv6 address 2001:DB8:0:1::1/64 bfd interval 100 min_rx 100 multiplier 3
R5#show run | sec router
router bgp 64086.5995
template peer-policy PeerPolicy-RRClients
route-reflector-client
next-hop-self
exit-peer-policy
!
template peer-session PeerSession-RRClients
remote-as 64086.5995
description ** Peering with Route Reflector Clients **
exit-peer-session
!
bgp router-id 5.5.5.5
bgp asnotation dot
bgp log-neighbor-changes
neighbor 2001:DB8:2:1::1 inherit peer-session PeerSession-RRClients
neighbor 2001:DB8:2:2::1 inherit peer-session PeerSession-RRClients
neighbor 2001:DB8:2:3::1 inherit peer-session PeerSession-RRClients
neighbor 2001:DB8:2:4::1 inherit peer-session PeerSession-RRClients
!
address-family ipv4
no neighbor 2001:DB8:2:1::1 activate
no neighbor 2001:DB8:2:2::1 activate
no neighbor 2001:DB8:2:3::1 activate
no neighbor 2001:DB8:2:4::1 activate
exit-address-family
!
address-family ipv6
network 2001:DB8:2:1::/64
network 2001:DB8:2:2::/64
network 2001:DB8:2:3::/64
network 2001:DB8:2:4::/64
neighbor 2001:DB8:2:1::1 activate
neighbor 2001:DB8:2:1::1 inherit peer-policy PeerPolicy-RRClients
neighbor 2001:DB8:2:2::1 activate
neighbor 2001:DB8:2:2::1 inherit peer-policy PeerPolicy-RRClients
neighbor 2001:DB8:2:3::1 activate
neighbor 2001:DB8:2:3::1 inherit peer-policy PeerPolicy-RRClients
neighbor 2001:DB8:2:4::1 activate
neighbor 2001:DB8:2:4::1 inherit peer-policy PeerPolicy-RRClients
exit-address-family
R2#show bgp ipv6 unicast | beg Network Network Next Hop Metric LocPrf Weight Path * ::/0 2001:DB8:0:2::1 0 64086.5995 i « Default route received on R2 via eBGP *> 2001:DB8:0:1::1 0 64086.5995 i *> 2001:DB8:1::/48 :: 32768 i « Summary route locally originated by R2 s> 2001:DB8:1:1::/64 FE80::2 2 32768 ? s> 2001:DB8:1:2::/64 FE80::2 2 32768 ? s> 2001:DB8:1:3::/64 FE80::2 2 32768 ? s> 2001:DB8:1:4::/64 :: 0 32768 i R5#show bgp ipv6 unicast 2001:DB8:1::/48 BGP routing table entry for 2001:DB8:1::/48, version 25 « Summary route receive by Route Reflector R5 Paths: (1 available, best #1, table default) Advertised to update-groups: 2 Refresh Epoch 14 64086.5994, (aggregated by 64086.5994 2.2.2.2), (Received from a RR-client) « Aggregation done by R2 2001:DB8:2:1::1 from 2001:DB8:2:1::1 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, internal, atomic-aggregate, best rx pathid: 0, tx pathid: 0x0 R5#show bgp ipv6 unicast 2001:DB8:1:1::/64 BGP routing table entry for 2001:DB8:1:1::/64, version 34 « Unsuppressed route also received by Route Reflector R5 Paths: (1 available, best #1, table default) Advertised to update-groups: 2 Refresh Epoch 5 64086.5994 64086.6000 64086.6001 64086.6002, (Received from a RR-client) « AS-Path prepend visible 2001:DB8:2:2::1 from 2001:DB8:2:2::1 (4.4.4.4) « Route received from R4 Origin incomplete, metric 2, localpref 100, valid, internal, best rx pathid: 0, tx pathid: 0x0 R5#show ipv6 cef exact-route 2001:db8:3:1:: 2001:db8:1:1:: 2001:DB8:3:1:: -> 2001:DB8:1:1:: =>IPV6 adj out of GigabitEthernet0/1, addr 2001:DB8:2:2::1 « From R5, R4 is the next hop due to longer prefix match
The BGP best-path selection algorithm works on prefixes of the same length. However, a longer prefix (/64) is always selected as the better path, when compared to a shorter prefix (/48).
R5#show bgp ipv6 unicast 2001:DB8:1:1::/48 longer-prefixes | beg Net Network Next Hop Metric LocPrf Weight Path *>i 2001:DB8:1::/48 2001:DB8:2:1::1 0 100 0 64086.5994 i « Shorter prefix *>i 2001:DB8:1:1::/64 « Longer prefix also received, preferred path next-hop R4 2001:DB8:2:2::1 2 100 0 64086.5994 64086.6000 64086.6001 64086.6002 ?
Testing connectivity from AS 64800:
Server1:/$ traceroute 2001:DB8:1:1::2 -q 1 -n traceroute to 2001:DB8:1:1::2 (2001:db8:1:1::2), 30 hops max, 72 byte packets 1 2001:db8:3:1::1 3.504 ms 2 2001:db8:0:4::1 44.797 ms 3 2001:db8:2:4::2 44.817 ms « R5 Route Reflector 4 2001:db8:2:2::1 45.613 ms « R4 5 2001:db8:0:2::2 88.540 ms « R2 6 2001:db8:1:1::1 90.825 ms 7 2001:db8:1:1::2 91.939 ms Server1:/$ traceroute 2001:DB8:1:3::1 -q 1 -n traceroute to 2001:DB8:1:3::1 (2001:db8:1:3::1), 30 hops max, 72 byte packets 1 2001:db8:3:1::1 2.774 ms 2 2001:db8:0:4::1 44.015 ms 3 2001:db8:2:4::2 46.204 ms « R5 Route Reflector 4 2001:db8:2:1::1 46.425 ms « R3 5 2001:db8:0:1::2 90.359 ms « R2 6 2001:db8:1:1::1 90.366 ms Server1:/$ traceroute 2001:DB8:1:4::2 -q 1 -n traceroute to 2001:DB8:1:4::2 (2001:db8:1:4::2), 30 hops max, 72 byte packets 1 2001:db8:3:1::1 2.543 ms 2 2001:db8:0:4::1 44.587 ms 3 2001:db8:2:4::2 45.084 ms « R5 Route Reflector 4 2001:db8:2:1::1 45.195 ms « R3 5 2001:db8:0:1::2 86.865 ms « R2 6 2001:db8:1:4::2 88.541 ms
The perspective from R8:
R8#show bgp ipv6 unicast summary | beg Ne Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2001:DB8:0:3::1 4 64086.5995 454 461 36 0 0 06:23:57 2 2001:DB8:0:4::1 4 64086.5995 441 445 36 0 0 06:23:36 2 2001:DB8:3:1::2 4 64800 432 439 36 0 0 06:22:51 2 R8#show bgp ipv6 unicast | beg Ne Network Next Hop Metric LocPrf Weight Path *> 2001:DB8:1::/48 2001:DB8:0:4::1 150 0 64086.5995 64086.5994 i « R7 preferred next hop with local preference 150 * 2001:DB8:0:3::1 0 64086.5995 64086.5994 i *> 2001:DB8:1:1::/64 2001:DB8:0:4::1 150 0 64086.5995 64086.5994 64086.6000 64086.6001 64086.6002 ? « BGP unsuppress-map advertises this route together with AS-prepend * 2001:DB8:0:3::1 0 64086.5995 64086.5994 64086.6000 64086.6001 64086.6002 ? *> 2001:DB8:3:1::/64 :: 0 32768 i *>i 2001:DB8:3:2::/64 2001:DB8:3:1::2 0 100 0 i *>i 2001:DB8:3:3::/64 2001:DB8:3:1::2 0 100 0 i R8#show bgp ipv6 unicast 2001:DB8:1::/48 BGP routing table entry for 2001:DB8:1::/48, version 36 Paths: (2 available, best #1, table default) Flag: 0x100 Advertised to update-groups: 1 2 Refresh Epoch 2 64086.5995 64086.5994, (aggregated by 64086.5994 2.2.2.2) « Aggregated by R2 2001:DB8:0:4::1 (FE80::1) from 2001:DB8:0:4::1 (7.7.7.7) Origin IGP, localpref 150, valid, external, atomic-aggregate, best « R7 preferred next hop rx pathid: 0, tx pathid: 0x0 Refresh Epoch 5 64086.5995 64086.5994, (aggregated by 64086.5994 2.2.2.2) 2001:DB8:0:3::1 (FE80::1) from 2001:DB8:0:3::1 (6.6.6.6) Origin IGP, localpref 100, valid, external, atomic-aggregate rx pathid: 0, tx pathid: 0
Disclaimer: You download and use files from networkstudysite.com at your own risk.
Lab YAML files:
Packet captures:
How to use these files:
With YAML files you can easily recreate the example labs on networkstudysite.com. Learn more in this short guide.
Explore 313 packet captures
You can find more information at the following external links:
By clicking on the links below, you are leaving the networkstudysite.com website.
Cisco - Chapter: IPv6 Routing: Multiprotocol BGP Extensions for IPv6
Cisco - Chapter: IPv6 Routing: Multiprotocol BGP Link-Local Address Peering
Cisco Community - IPv6 route summarization
Cisco Community - Advertising IPv6 Prefixes/Routes Over IPv4 EBGP Peers
RFC 2545 - Use of BGP-4 Multiprotocol Extensions for IPv6 Inter-Domain Routing
RIPE NCC - IPv6 Address Types
Disclaimer:
Use at your own risk: networkstudysite.com makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information found on this website. Full disclaimer on the About page.
Privacy Policy:
networkstudysite.com does not install browser cookies to collect or store your data.
Thank you for your interest in this blog post!
Looking for something else? View infographics, explore the archives or read the recommended posts below: