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 Basic Functions

Network Requirements

  • Set up EBGP neighbors between Device1 and Device2, and set up IBGP neighbors between Device2 and Device3.
  • Device1 learns the interface direct route 2001:4::/64 of Device3, and Device3 learns the interface direct route 2001:1::/64 of Device1.

Network Topology

Networking for configuring IPv6 BGP basic functions

Figure 13–1 Networking for configuring IPv6 BGP basic functions

Configuration Steps

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

Step 2: Configure OSPFv3 so that loopback routes are reachable between devices.

#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 vlan 2
Device2(config-if-vlan2)#ipv6 router ospf 100 area 0
Device2(config-if-vlan2)#exit
Device2(config)#interface loopback 0
Device2(config-if-loopback0)#ipv6 router ospf 100 area 0
Device2(config-if-loopback0)#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 loopback 0
Device3(config-if-loopback0)#ipv6 router ospf 100 area 0
Device3(config-if-loopback0)#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 ::, 1w1d:23:51:37, lo0
LC 1::1/128 [0/0] 
     via ::, 00:09:34, loopback0
O 2::2/128 [110/2] 
     via fe80::201:7aff:fec0:525a, 00:05:29, vlan2
C  2001:2::/64 [0/0] 
     via ::, 00:09:41, vlan3
L 2001:2::2/128 [0/0] 
     via ::, 00:09:39, vlan3
C 2001:3::/64 [0/0] 
     via ::, 00:08:55, vlan2
L 2001:3::2/128 [0/0] 
     via ::, 00:08:53, vlan2 

#View the route table of Device3.

Device3#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 ::, 1w5d:18:34:53, lo0
O 1::1/128 [110/2] 
     via fe80::201:7aff:fe5e:6d2e, 00:29:59, vlan2
LC 2::2/128 [0/0] 
     via ::, 00:32:36, loopback0
C 2001:3::/64 [0/0] 
     via ::, 00:32:59, vlan2
L 2001:3::1/128 [0/0] 
     via ::, 00:32:58, vlan2
C 2001:4::/64 [0/0] 
     via ::, 00:32:44, vlan3
L 2001:4::1/128 [0/0] 
     via ::, 00:32:43, vlan3

According to the queried information, Device2 and Device3 have learnt the routes of the peer loopback interfaces by running OSPFv3, preparing for setting up IBGP neighbors on the loopback interfaces of Device2 and Device3.

Step 3: Configure the IPv6 BGP basic functions.

#Configure Device1.

Set up a direct-connect EBGP peer with Device2. Introduce 2001:1::/64 to BGP in network mode.

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

#Configure Device2.

Set up the direct-connect EBGP peer with Device1, set up a non-direct-connect IBGP peer with Device3 through Loopback0, and set the next hop of the advertised route to the local device.

Device2(config)#router bgp 100
Device2(config-bgp)#bgp router-id 2.2.2.2
Device2(config-bgp)#address-family ipv6
Device2(config-bgp-af)#neighbor 2001:2::1 remote-as 200
Device2(config-bgp-af)#neighbor 2::2 remote-as 100
Device2(config-bgp-af)#neighbor 2::2 next-hop-self
Device2(config-bgp-af)#exit-address-family
Device2(config-bgp)#neighbor 2::2 update-source loopback 0
Device2(config-bgp)#exit

#Configure Device3.

Set up a non-direct-connect IBGP peer relation with Device2 through Loopback0. Introduce 2001:4::/64 to BGP in network mode.

Device3(config)#router bgp 100
Device3(config-bgp)#bgp router-id 3.3.3.3
Device3(config-bgp)#address-family ipv6
Device3(config-bgp-af)#neighbor 1::1 remote-as 100
Device3(config-bgp-af)#network 2001:4::/64
Device3(config-bgp-af)#exit-address-family
Device3(config-bgp)#neighbor 1::1 update-source loopback 0
Device3(config-bgp)#exit

note


  • To prevent route flapping, IBGP neighbors are set up through the loopback interfaces, and OSPFv3 need to synchronize the routing information of loopback interfaces between IBGP neighbors.

Step 4: Check the result.

#On Device2, check the IPv6 BGP neighbor status.

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

According to the numbers (Number of route prefixes received from neighbors) that are displayed in the State/PfxRcd column, IPv6 BGP neighbors have been successfully set up between Device 2 and Device 1, Device 3.

#View the route table of Device1.

Device1#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:00:42:57, lo0
C 2001:1::/64 [0/0] 
     via ::, 00:02:59, vlan2
L 2001:1::1/128 [0/0] 
     via ::, 00:02:56, vlan2
C 2001:2::/64 [0/0] 
     via ::, 00:52:17, vlan3
L 2001:2::1/128 [0/0] 
     via ::, 00:52:16, vlan3
B 2001:4::/64 [20/0] 
     via 2001:2::2, 00:06:13, vlan3 

#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:00:34:53, lo0
LC 1::1/128 [0/0] 
     via ::, 00:52:49, loopback0
O 2::2/128 [110/2] 
     via fe80::201:7aff:fec0:525a, 00:48:45, vlan2
B 2001:1::/64 [20/0] 
     via 2001:2::1, 00:03:18, vlan3
C 2001:2::/64 [0/0] 
     via ::, 00:52:57, vlan3
L 2001:2::2/128 [0/0] 
     via ::, 00:52:55, vlan3
C 2001:3::/64 [0/0] 
     via ::, 00:52:10, vlan2
L 2001:3::2/128 [0/0] 
     via ::, 00:52:09, lo0
B 2001:4::/64 [200/0] 
     via 2::2, 00:07:27, vlan2 

#View the route table of Device3.

Device3#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 ::, 1w5d:18:54:38, lo0
O 1::1/128 [110/2] 
     via fe80::201:7aff:fe5e:6d2e, 00:49:44, vlan2
LC 2::2/128 [0/0] 
     via ::, 00:52:21, loopback0
B 2001:1::/64 [200/0] 
     via 1::1, 00:03:54, vlan2
C 2001:3::/64 [0/0] 
     via ::, 00:52:44, vlan2
L 2001:3::1/128 [0/0] 
     via ::, 00:52:43, vlan2
C 2001:4::/64 [0/0] 
     via ::, 00:52:29, vlan3
L 2001:4::1/128 [0/0] 
     via ::, 00:52:28, vlan3 

Device1 has learnt the interface direct-connect route 2001:4::/64 of Device3, and Device3 has learnt the interface direct-connect route 2001:1::/64 of Device1.