CÔNG TY TNHH CÔNG NGHỆ VIỆT THÁI DƯƠNG
Logo CNTTShop.vn

NTT03, Line 1, Thống Nhất Complex, Thanh Xuân, Hà Nội.
Danh mục sản phẩm

Configure IPv6 BGP Route Summary

Network Requirements

  • Set up OSPFv3 neighbors between Device1 and Device3, and configure Device3 to advertise routes 2002:1::/64 and 2002:2::/64 to Device1.
  • Set up EBGP neighbors between Device1 and Device2.
  • On Device1, aggregate routes 2002:1::/64 and 2002:2::/64 into route 2002::/30 and advertise the aggregated route to Device2.

Network Topology

Networking for configuring IPv6 BGP route summary

Figure 13–5 Networking for configuring IPv6 BGP route summary

Configuration Steps

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

Step 2: Configure OSPFv3 so that Device1 can learn the two routes 2002:1:/64 and 2002:2::/64 advertised by Device3.

#Configure Device1.

Device1#configure terminal
Device1(config)#ipv6 router ospf 100
Device1(config-ospf6)#router-id 1.1.1.1
Device1(config-ospf6)#exit
Device1(config)#interface vlan 2
Device1(config-if-vlan2)#ipv6 router ospf 100 area 0
Device1(config-if-vlan2)#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
Device3(config)#interface gigabitethernet 0/2/2
Device3(config-if-gigabitethernet0/2/2)#ipv6 router ospf 100 area 0
Device3(config-if-gigabitethernet0/2/2)#exit

#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:07:35:38, lo0
C 2001:1::/64 [0/0] 
     via ::, 00:01:11, vlan2
L 2001:1::2/128 [0/0] 
     via ::, 00:01:10, lo0
C 2001:2::/64 [0/0] 
     via ::, 00:01:06, vlan3
L 2001:2::2/128 [0/0] 
     via ::, 00:01:04, lo0
O 2002:1::/64 [110/2] 
     via fe80::201:7aff:fe62:bb7e, 00:01:54, vlan2
O  2002:2::/64 [110/2] 
     via fe80::201:7aff:fe62:bb7e, 00:01:54, vlan2 

According to the route table, Device1 has learnt routes 2002:1:1::/64 and 2002:1:2::/64 advertised by Device3.

Step 3: Configure the IPv6 BGP basic functions.

#Configure Device1.

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:2::1 remote-as 200
Device1(config-bgp-af)#exit-address-family
Device1(config-bgp)#exit

#Configure Device2.

Device2#configure terminal
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:2::2 remote-as 100
Device2(config-bgp-af)#exit-address-family
Device2(config-bgp)#exit

#On Device1, check the IPv6 BGP neighbor status.

Device1#show bgp ipv6 unicast summary  
BGP router identifier 1.1.1.1, local AS number 100 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:2::1   4 200    3            3           1         0    0      00:01:16       0 

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

Step 4: Configure IPv6 BGP route summary.

Two solutions are available to complete the network requirements.

Solution 1: Configure an IPv6 static route that is targeted at null0 to introduce the the static route to BGP.

#Configure Device1.

Device1(config)#ipv6 route 2002::/30 null 0
Device1(config)#router bgp 100
Device1(config-bgp)#address-family ipv6
Device1(config-bgp-af)#network 2002::/30
Device1(config-bgp-af)#exit-address-family
Device1(config-bgp)#exit

Check the result.

#View the IPv6 BGP route table of Device1.

Device1#show bgp ipv6 unicast  
BGP table version is 2, 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]*> 2002::/30          ::                0                   32768   i

You can see that the aggregated route 2001::/16 is generated in the IPv6 BGP route table of Device1.

#View the 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
[B]*> 2002::/30    2001:2::2    0                   0         100 i

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 ::, 1w6d:03:14:01, lo0
C 2001:2::/64 [0/0] 
     via ::, 01:20:21, vlan3
L 2001:2::1/128 [0/0] 
     via ::, 01:20:20, lo0
B 2002::/30 [20/0] 
     via 2001:2::2, 00:00:44, vlan3 

Device2 has successfully learnt the aggregated route 2002::/30 that has been advertised by Device1.

Solution 2: First introduce detailed routes into BGP, and then run the aggregate-address command to aggregate the routes.

#Configure Device1.

Device1(config)#router bgp 100
Device1(config-bgp)#address-family ipv6
Device1(config-bgp-af)#redistribute ospf 100
Device1(config-bgp-af)#aggregate-address 2002::/30 summary-only
Device1(config-bgp-af)#exit-address-family
Device1(config-bgp)#exit

Check the result.

#Query the IPv6 BGP route table of Device1.

Device1#show bgp ipv6 unicast  
BGP table version is 4, 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
[O]*> 2001:1::/64        ::                 1                  32768   ?
[B]*> 2002::/30           ::                                     32768    i
[O]s> 2002:1::/64        ::                 2                  32768    ?
[O]s> 2002:2::/64        ::                 2                  32768    ? 

The aggregated route 2002::/30 has been generated in the IPv6 BGP route table of Device1.

#View the route table of Device2.

Device2#show bgp ipv6 unicast  
BGP table version is 4, 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
[B]*> 2001:1::/64    2001:2::2    1                   0         100 ?
[B]*> 2002::/30       2001:2::2    0                   0         100 i

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 ::, 1w6d:03:16:42, lo0
B 2001:1::/64 [20/0] 
     via 2001:2::2, 00:00:50, vlan2
C 2001:2::/64 [0/0] 
     via ::, 01:23:01, vlan2
L 2001:2::1/128 [0/0] 
     via ::, 01:23:00, lo0
B 2002::/30 [20/0] 
     via 2001:2::2, 00:00:50, vlan2 

Device2 has successfully learnt the aggregated route 2002::/30 that has been advertised by Device1.

note


  • When the aggregate-address command is used to aggregate routes, if the extended command summary-only is configured, the device advertises only the aggregated route; otherwise, both common routes and aggregated routes are advertised.