IPv6 BGP basic configuration example

Network requirements

As shown in Figure 74, all switches run BGP. Run EBGP between Switch A and Switch B, and run IBGP between Switch B and Switch C to allow Switch C to access network 50::/64 connected to Switch A.

Figure 74: Network diagram

Configuration procedure

  1. Configure IP addresses for interfaces. (Details not shown.)

  2. Configure IBGP:

    # Configure Switch B.

    <SwitchB> system-view
    [SwitchB] bgp 65009
    [SwitchB-bgp] router-id 2.2.2.2
    [SwitchB-bgp] peer 9::2 as-number 65009
    [SwitchB-bgp] address-family ipv6
    [SwitchB-bgp-ipv6] peer 9::2 enable
    [SwitchB-bgp-ipv6] quit
    

    # Configure Switch C.

    <SwitchC> system-view
    [SwitchC] bgp 65009
    [SwitchC-bgp] router-id 3.3.3.3
    [SwitchC-bgp] peer 9::1 as-number 65009
    [SwitchC-bgp] address-family ipv6
    [SwitchC-bgp-ipv6] peer 9::1 enable
    
  3. Configure EBGP:

    # Configure Switch A.

    <SwitchA> system-view
    [SwitchA] bgp 65008
    [SwitchA-bgp] router-id 1.1.1.1
    [SwitchA-bgp] peer 10::1 as-number 65009
    [SwitchA-bgp] address-family ipv6
    [SwitchA-bgp-ipv6] peer 10::1 enable
    

    # Configure Switch B.

    [SwitchB-bgp] peer 10::2 as-number 65008
    [SwitchB-bgp] address-family ipv6
    [SwitchB-bgp-ipv6] peer 10::2 enable
    
  4. Inject network routes to the BGP routing table:

    # Configure Switch A.

    [SwitchA-bgp-ipv6] network 10:: 64
    [SwitchA-bgp-ipv6] network 50:: 64
    [SwitchA-bgp-ipv6] quit
    [SwitchA-bgp] quit
    

    # Configure Switch B.

    [SwitchB-bgp-ipv6] network 10:: 64
    [SwitchB-bgp-ipv6] network 9:: 64
    [SwitchB-bgp-ipv6] quit
    [SwitchB-bgp] quit
    

    # Configure Switch C.

    [SwitchC-bgp-ipv6] network 9:: 64
    [SwitchC-bgp-ipv6] quit
    [SwitchC-bgp] quit
    

Verifying the configuration

# Display IPv6 BGP peer information on Switch B.

[SwitchB] display bgp peer ipv6

 BGP local router ID: 2.2.2.2
 Local AS number: 65009
 Total number of peers: 2                  Peers in established state: 2

  Peer                    AS  MsgRcvd  MsgSent OutQ PrefRcv Up/Down  State

  9::2                 65009       41       43    0       1 00:29:00 Established
  10::2                65008       38       38    0       2 00:27:20 Established

The output shows that Switch A and Switch B have established an EBGP connection, and Switch B and Switch C have established an IBGP connection.

# Display IPv6 BGP routing table information on Switch A.

[SwitchA] display bgp routing-table ipv6

 Total number of routes: 4

 BGP local router ID is 1.1.1.1
 Status codes: * - valid, > - best, d - dampened, h - history,
               s - suppressed, S - stale, i - internal, e - external
               Origin: i - IGP, e - EGP, ? - incomplete

* >e Network : 9::                                      PrefixLen : 64
     NextHop : 10::1                                    LocPrf    :
     PrefVal : 0                                        OutLabel  : NULL
     MED     : 0
     Path/Ogn: 65009i

* >  Network : 10::                                     PrefixLen : 64
     NextHop : ::                                       LocPrf    :
     PrefVal : 32768                                    OutLabel  : NULL
     MED     : 0
     Path/Ogn: i

*  e Network : 10::                                     PrefixLen : 64
     NextHop : 10::1                                    LocPrf    :
     PrefVal : 0                                        OutLabel  : NULL
     MED     : 0
     Path/Ogn: 65009i

* >  Network : 50::                                     PrefixLen : 64
     NextHop : ::                                       LocPrf    :
     PrefVal : 32768                                    OutLabel  : NULL
     MED     : 0
     Path/Ogn: i

The output shows that Switch A has learned routing information of AS 65009.

# Display IPv6 BGP routing table information on Switch C.

[SwitchC] display bgp routing-table ipv6

 Total number of routes: 4

 BGP local router ID is 3.3.3.3
 Status codes: * - valid, > - best, d - dampened, h - history,
               s - suppressed, S - stale, i - internal, e - external
               Origin: i - IGP, e - EGP, ? - incomplete

* >  Network : 9::                                      PrefixLen : 64
     NextHop : ::                                       LocPrf    :
     PrefVal : 32768                                    OutLabel  : NULL
     MED     : 0
     Path/Ogn: i

*  i Network : 9::                                      PrefixLen : 64
     NextHop : 9::1                                     LocPrf    : 100
     PrefVal : 0                                        OutLabel  : NULL
     MED     : 0
     Path/Ogn: i

* >i Network : 10::                                     PrefixLen : 64
     NextHop : 9::1                                     LocPrf    : 100
     PrefVal : 0                                        OutLabel  : NULL
     MED     : 0
     Path/Ogn: i

* >i Network : 50::                                     PrefixLen : 64
     NextHop : 10::2                                    LocPrf    : 100
     PrefVal : 0                                        OutLabel  : NULL
     MED     : 0
     Path/Ogn: 65008i

The output shows that Switch C has learned the route 50::/64.

# Verify that Switch C can ping hosts on network 50::/64. (Details not shown.)