Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure IPv6 BGP to Re-distribute Routes

Network Requirements

  • Set up OSPFv3 neighbors between Device3 and Device2, and advertise interface direct-connect route 2001:3::/64 to Device2.
  • Set up EBGP neighbors between Device1 and Device2, and redistribute the OSPFv3 route that Device2 learns to BGP and advertise the route to Device1.

Network Topology

Networking for configuring IPv6 BGP to redistribute routes

Figure 13–2 Networking for configuring IPv6 BGP to redistribute routes

Configuration Steps

Step 1: Configure the IPv6 global unicast addresses of the interfaces. (Omitted)

Step 2: Configure OSPFv3 so that Device2 can learn the direct-connect interface route 2001:3::/64 to Device3.

#Configure Device2.

Device2#configure terminal
Device2(config)#ipv6 router ospf 100
Device2(config-ospf6)#router-id 2.2.2.2
Device2(config-ospf6)#exit
Device2(config)#interface vlan3
Device2(config-if-vlan3)#ipv6 router ospf 100 area 0
Device2(config-if-vlan3)#exit

#Configure Device3.

Device3#configure terminal
Device3(config)#ipv6 router ospf 100
Device3(config-ospf6)#router-id 3.3.3.3
Device3(config-ospf6)#exit
Device3(config)#interface vlan 2
Device3(config-if-vlan2)#ipv6 router ospf 100 area 0
Device3(config-if-vlan2)#exit
Device3(config)#interface vlan3
Device3(config-if-vlan3)#ipv6 router ospf 100 area 0
Device3(config-if-vlan3)#exit

#View the route table of Device2.

Device2#show ipv6 route 
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS 
       U - Per-user Static route 
       O - OSPF, OE-OSPF External, M - Management 

L ::1/128 [0/0] 
     via ::, 1w2d:01:10:38, lo0
C 2001:1::/64 [0/0] 
     via ::, 00:06:25, vlan2
L 2001:1::2/128 [0/0] 
     via ::, 00:06:24, lo0
C 2001:2::/64 [0/0] 
     via ::, 00:05:46, vlan3
L 2001:2::2/128 [0/0] 
     via ::, 00:05:43, lo0
O 2001:3::/64 [110/2] 
     via fe80::201:7aff:fec0:525a, 00:02:41, vlan3 

According to the route table, Device2 has learnt the OSPFv3 route 2001:3::/64 that has been advertised by Device3.

Step 3: Configure the IPv6 BGP basic functions.

#Configure Device1.

Device1#configure terminal
Device1(config)#router bgp 100
Device1(config-bgp)#bgp router-id 1.1.1.1
Device1(config-bgp)#address-family ipv6
Device1(config-bgp-af)#neighbor 2001:1::2 remote-as 200
Device1(config-bgp-af)#exit-address-family
Device1(config-bgp)#exit

#Configure Device2.

Device2(config)#router bgp 200
Device2(config-bgp)#bgp router-id 2.2.2.2
Device2(config-bgp)#address-family ipv6
Device2(config-bgp-af)#neighbor 2001:1::1 remote-as 100
Device2(config-bgp-af)#exit-address-family
Device2(config-bgp)#exit

#On Device2, check the IPv6 BGP neighbor status.

Device2#show bgp ipv6 unicast summary  
BGP router identifier 2.2.2.2, local AS number 200 BGP table version is 1 
1 BGP AS-PATH entries 0 BGP community entries 
 
Neighbor     V AS      MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:1::1   4 100      2           2           1        0     0       00:00:50       0 
 
Total number of neighbors 1 

IPv6 BGP neighbors have been successfully set up between Device2 and Device1.

Step 4: Configure IPv6 BGP to redistribute the OSPFv3 route.

#Configure Device2.

Device2(config)#router bgp 200
Device2(config-bgp)#address-family ipv6
Device2(config-bgp-af)#redistribute ospf 100
Device2(config-bgp-af)#exit-address-family
Device2(config-bgp)#exit

Step 5: Check the result.

#View the IPv6 BGP route table of Device2.

Device2#show bgp ipv6 unicast  
BGP table version is 2, local router ID is 2.2.2.2 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              S Stale 
Origin codes: i - IGP, e - EGP, ? - incomplete 
          Network          Next Hop    Metric  LocPrf  Weight Path
[O]*> 2001:2::/64        ::           1                    32768 ?
[O]*> 2001:3::/64        ::           2                    32768 ? 

According to the queried information, OSPFv3 routes have been successfully redistributed to IPv6 BGP.

#View the route table of Device1.

Device1#show bgp ipv6 unicast  
BGP table version is 3, local router ID is 1.1.1.1 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              S Stale 
Origin codes: i - IGP, e - EGP, ? - incomplete 
           Network            Next Hop      Metric  LocPrf Weight Path
[B]*> 2001:2::/64       2001:1::2     1                   0        200 ?
[B]*> 2001:3::/64       2001:1::2     2                   0        200 ? 

According to the queried information, Device1 has successfully learnt routes 2001:2::/64 and 2001:3::/64.

note


  • In an actual application, if there are two or more AS boundary routers, it is recommended that you do not redistribute routes between different routing protocols. If route redistribution must be configured, you are required to configure route control policies such as route filtering and filtration summary on the AS boundary routers to prevent routing loops.