BGP 4+ features examples

The 2 next-hops: local and global

Due to the 2 BGP 4+ next-hops, the IPv6 case is slightly different than the IPv4 case described before in the BGP 4 section. The following figure illustrates the IPv6 case:

../../../../../_images/resolution-of-the-next-hop-with-bgp-4-plus.png

Resolution of the next-hop with BGP 4+

The routers are configured as follows:

rt1

eth0_0
  ipaddress 2001:fe::1/64
eth1_0
  ipaddress 3ffe:fe::1/64

rtg
  router bgp 65520
           neighbor 3ffe:fe::5 remote-as 65500
           neighbor 2001:fe::2 remote-as 65520
           neighbor 2001:fe::3 remote-as 65520
           neighbor 2001:ff::4 remote-as 65520
           bgp router-id 1.1.1.1
           address-family ipv6
             neighbor 2001:fe::2 activate
             neighbor 2001:fe::3 activate
             neighbor 2001:ff::4 activate
             neighbor 3ffe:fe::5 activate
           exit
  exit
  router ripng
           network 2001::/16
  exit

rt2

eth0_0
  ipaddress 2001:fe::2/64
eth1_0
  ipaddress 2001:2::2/64

rtg
  router bgp 65520
           neighbor 2001:fe::1 remote-as 65520
           neighbor 2001:fe::3 remote-as 65520
           neighbor 2001:ff::4 remote-as 65520
           bgp router-id 1.1.1.2
           address-family ipv6
             neighbor 2001:fe::1 activate
             neighbor 2001:fe::3 activate
             neighbor 2001:ff::4 activate
             network 2001:2::2/64
           exit
  exit
  router ripng
             network 2001::/16
  exit

rt3

eth0_0
  ipaddress 2001:fe::3/64
eth1_0
  ipaddress 2001:ff::3/64
loopback
  loop 1 2001:3::1/64

rtg
  router bgp 65520
       neighbor 2001:ff::4 remote-as 65520
       neighbor 2001:fe::1 remote-as 65520
       neighbor 2001:fe::2 remote-as 65520
       bgp router-id 1.1.1.3
       address-family ipv6
         neighbor 2001:fe::1 activate
         neighbor 2001:fe::2 activate
         neighbor 2001:ff::4 activate
         network 2001:3::/64
       exit
  exit
  router ripng
       network 2001::/16
  exit

rt4

eth0_0
  ipaddress 2001:4::4/64
eth1_0
 ipaddress 2001:ff::4/64

rtg
 router bgp 65520
       neighbor 2001:fe::2 remote-as 65520
       neighbor 2001:fe::1 remote-as 65520
       neighbor 2001:ff::3 remote-as 65520
       bgp router-id 1.1.1.4
       address-family ipv6
         neighbor 2001:fe::1 activate
         neighbor 2001:fe::2 activate
         neighbor 2001:ff::3 activate
         network 2001:4::/64
       exit
 exit
 router ripng
         network 2001::/16
 exit

rt5

eth0_0
  ipaddress 3ffe:1::1/64
eth1_0
  ipaddress 3ffe:fe::5/64

rtg
      router bgp 65500
        neighbor 3ffe:fe::1 remote-as 65520
        bgp router-id 1.1.1.5
        address-family ipv6
          neighbor 3ffe:fe::1 activate
          network 3ffe:1::/32
rt3{}show routing ipv6 bgp
BGP table version is 0, local router ID is 1.1.1.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i -IGP, e - EGP, ? - incomplete

  Network       Next Hop    Metric  LocPrf Weight Path
*>i2001:2::/64  2001:fe::2       0  100         0 i
*> 2001:3::/64  ::               0          32768 i
*>i2001:4::/64  2001:ff::4       0  100         0 i
*>i3ffe:1::/32  3ffe:fe::5       0  100         0 65500 i

Total number of prefixes 4

rt3 can reach the network 3ffe:1::/32:

rt3{}show routing ipv6 bgp 3ffe:1::/32

BGP routing table entry for 3ffe:1::/32
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Not advertised to any peer
  65500
    3ffe:fe::5 from 2001:fe::1 (1.1.1.1)
    (fe80::209:c0ff:fe30:404a)
      Origin IGP, metric 0, localpref 100, valid, internal, best
      Last update: Mon Sep 4 19:18:52 2000

Then, the rt3 FIB gets all the BGP 4+ routes whereas it did not work with the previous IPv4 case.

rt3{}show routing ipv6 route
Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPF v3,

       B - BGP, D - DEP, N - NAT-PT, * - FIB route.

C>* ::/96 is directly connected, tu0
C>* ::1/128 is directly connected, lo0
B 2001:2::/64 [200/0] via fe80::209:c0ff:fe30:4046, eth0_0, 01:34:58
R>* 2001:2::/64 [120/0] via fe80::209:c0ff:fe30:4046, eth0_0, 01:35:04
C>* 2001:3::/64 is directly connected, loop1
B 2001:4::/64 [200/0] via fe80::209:c0ff:fe30:435d, eth1_0, 01:34:21
R>* 2001:4::/64 [120/0] via fe80::209:c0ff:fe30:435d, eth1_0, 01:34:25
C>* 2001:fe::/64 is directly connected, eth0_0
C>* 2001:ff::/64 is directly connected, eth1_0
B>* 3ffe:1::/32 [200/0] via fe80::209:c0ff:fe30:404a, eth0_0, 01:32:42
C * fe80::/64 is directly connected, eth1_0
C * fe80::/64 is directly connected, eth0_0
C>* fe80::/64 is directly connected, lo0

However, rt4 cannot resolve the next-hop to 3ffe:1::/32 because the IGP does not announce a way to 3ffe:fe::5. Moreover, rt1 link-local address cannot be used anymore because it is not directly connected.

rt4{}show routing ipv6 bgp
BGP table version is 0, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i -IGP, e - EGP, ? - incomplete

  Network       Next Hop   Metric LocPrf Weight Path
*>i2001:2::/64  2001:fe::2      0    100      0 i
*>i2001:3::/64  2001:ff::3      0    100      0 i
*> 2001:4::/64  ::              0         32768 i
* i3ffe:1::/32  3ffe:fe::5      0    100      0 65500 i

Total number of prefixes 4

In fact, rt4 cannot determine a next-hop to reach 3ffe:fe::5. This issue is fixed when 3ffe:fe::/64 is received by rt4’s IGP.

rt4{}show routing ipv6 bgp 3ffe:1::/32
BGP routing table entry for 3ffe:1::/32
Paths: (1 available, no best path)
  Not advertised to any peer
  65500
    3ffe:fe::5 (inaccessible) from 2001:fe::1 (1.1.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal
      Last update: Mon Sep 4 16:46:01 2000

rt3{}show routing ip bgp neighbors 2001:fe::1
BGP neighbor is 2001:fe::1, remote AS 65520, local AS 65520, internal link
  BGP version 4, remote router ID 1.1.1.1
  BGP state = Established, up for 01:36:07
  Last read 00:00:06, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received (old and new)
    Address family IPv4 Unicast: advertised and received
    Address family IPv6 Unicast: advertised and received
  Received 102 messages, 0 notifications, 0 in queue
  Sent 105 messages, 0 notifications, 0 in queue
  Route refresh request: received 0, sent 0
  Minimum time between advertisement runs is 5 seconds
  For address family: IPv4 Unicast
  Community attribute sent to this neighbor (both)
  0 accepted prefixes

For address family: IPv6 Unicast
 Community attribute sent to this neighbor (both)
 1 accepted prefixes

  Connections established 2; dropped 1
Local host: 2001:fe::3, Local port: 179
Foreign host: 2001:fe::1, Foreign port: 1350
Nexthop: 1.1.1.3
Nexthop global: 2001:fe::3
Nexthop local: fe80::209:c0ff:fe30:4358
BGP connection: shared network
Read thread: on Write thread: off

rt4{}show routing ip bgp neighbors 2001:fe::1
BGP neighbor is 2001:fe::1, remote AS 65520, local AS 65520, internal link
  BGP version 4, remote router ID 1.1.1.1
  BGP state = Established, up for 01:36:52
  Last read 00:00:51, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received (old and new)
    Address family IPv4 Unicast: advertised and received
    Address family IPv6 Unicast: advertised and received
Received 98 messages, 0 notifications, 0 in queue
Sent 101 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds

For address family: IPv4 Unicast
 Community attribute sent to this neighbor (both)
 0 accepted prefixes

For address family: IPv6 Unicast
 Community attribute sent to this neighbor (both)
 1 accepted prefixes

  Connections established 1; dropped 0
Local host: 2001:ff::4, Local port: 179
Foreign host: 2001:fe::1, Foreign port: 1352
Nexthop: 1.1.1.4
Nexthop global: 2001:ff::4
Nexthop local: ::
BGP connection: non shared network
Read thread: on Write thread: off

Flush BGP 4+ sessions

The principle is the same in IPv6 with BGP 4+ like in IPv4 with BGP 4. If you have configured or changed a policy with a BGP neighbor, you should manually reset a BGP session. You may also want to reset sessions each time you think there is a problem of integrity with neighbor’s information.

  • Flush BGP 4+ sessions:

    router{}flush routing bgp ipv6 * [([soft] in|out)|rsclient]
    router{}flush routing bgp ipv6 X:X::X:X [([soft] in|out)|rsclient]
    
    • All remote BGP peers
    X:X::X:X

    IPv6 address of the remote BGP router.

    soft

    Soft reconfig.

    in

    Inbound update.

    out

    Outbound update

    rsclient

    Soft reconfig for rsclient RIB.

If you used the keyword soft, the session is not reset but all routing updates are resent, therefore the following command is generally advised when you configured a route-map or a filter and you want to update the neighbor’s BGP data:

router{}flush routing bgp ipv6 X:X::X:X soft out

Another example is to use the following command to reset a session with a specific neighbor. The relationship will then become idle and the reestablished:

router{}flush routing bgp ipv6 X:X::X:X out

Conversely, keyword in is used for inbound reconfiguration.

Route refresh

This feature is the same as for IPv4. Like in IPv4, Route Refresh is enabled by default.

When the command flush is used, Route Refresh messages are sent to the peers, the router receives one or more Update packets with all the routes of the Adj-RIB-Out.

Example

router{}flush routing bgp ipv6 * soft in
router{}show routing ipv6 route
router{}show routing ipv6 bgp neighbors
BGP neighbor is 3ffe::2:2, remote AS 2, local AS 1, external link
  BGP version 4, remote router ID 10.23.0.2
  BGP state = Established, up for 00:31:41
  Last read 00:00:10, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
    Address family IPv6 Unicast: advertised and received
  Message statistics:
    Inq depth is 0
    Outq depth is 0
    Sent Rcvd
    Opens: 1 0
    Notifications: 0 0
    Updates: 2 4
    Keepalives: 33 32
    Route Refresh: 1 0
    Capability: 0 0
    Total: 37 36

Soft reconfiguration

Like in IPv4, when using the BGP soft reconfiguration, all the updates received from the neighbors will be stored unmodified regardless of the inbound policy. The feature should be used on routers that have enough RAM.

The command to enable soft reconfiguration with a peer can be used as follows:

router{conf:myconfig-rtg-bgp}neighbor X:X::X:X soft-reconfiguration inbound

After this command, you may for example define an access list to accept some routes from a neighbor X:X::X:X :

router{conf:myconfig-rtg}ipv6 access-list my_acl permit 3ffe:506::/32

Apply to the incoming routes the distribute list policy name based on this access-list:

router{conf:myconfig-rtg-bgp}neighbor X:X::X:X distribute-list my_acl in

A soft reset uses stored prefix information to reconfigure and activate BGP routing tables without tearing down existing peering session. No route refresh packet is sent to the peer during soft reconfiguration is enabled.

When the command flush routing is used, if Soft Reconfiguration is enabled, Route Refresh message is not sent:

router{}flush routing bgp ipv6 X:X::X:X soft in
router{}show routing ipv6 route
router{}show routing ipv6 bgp neighbors
...
Route Refresh: 1 0
Route Refresh count is not incremented.