No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Configuration Guide - IP Unicast Routing

S9300, S9300E, and S9300X V200R011C10

This document describes IP Unicast Routing configurations supported by the switch, including the principle and configuration procedures of IP Routing Overview, Static Route, RIP, RIPng, OSPF, OSPFv3, IS-IS(IPv4), IS-IS(IPv6), BGP, Routing Policy ,and PBR, and provides configuration examples.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring the BGP 6PE

Example for Configuring the BGP 6PE

Networking Requirements

As shown in Figure 9-58, the link between CE1 and PE1 is an IPv6 link, the link between PE1 and PE2 is an IPv4 link, and the link between PE2 and CE2 is an IPv6 link. BGP4+ runs between CE1 and PE1 and between PE2 and CE2. MPLS runs between PE1 and PE2. 6PE is configured to connect IPv6 networks.

Figure 9-58  Networking diagram of configuring the BGP 6PE

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure OSPF on the link between PE1 and PE2 to ensure that PE1 and PE2 can learn the loopback interface addresses from each other.

  2. Configure BGP4+ on the links between CE1 and PE1 and between PE2 and CE2.

  3. Configure MPLS on the link between PE1 and PE2 and set up an LSP.

  4. Configure 6PE on the link between PE1 and PE2.

Procedure

  1. Add interfaces to VLANs.

    <Quidway> system-view
    [Quidway] sysname PE1
    [PE1] vlan batch 10 20
    [PE1] interface gigabitethernet 1/0/0
    [PE1-GigabitEthernet1/0/0] port link-type trunk
    [PE1-GigabitEthernet1/0/0] port trunk allow-pass vlan 10
    [PE1-GigabitEthernet1/0/0] quit
    [PE1]interface gigabitethernet 2/0/0
    [PE1-GigabitEthernet2/0/0] port link-type trunk
    [PE1-GigabitEthernet2/0/0] port trunk allow-pass vlan 20
    [PE1-GigabitEthernet2/0/0] quit
    

    The configurations of CE1, PE2, and CE2 are similar to the configuration of PE1 and are not mentioned here.

  2. Assign IPv4 or IPv6 addresses to interfaces. The following is the configuration of PE1. The configurations of other devices are similar to the configuration of PE1 and are not mentioned here.

    [PE1] ipv6
    [PE1] interface vlanif 10
    [PE1-Vlanif10] ipv6 enable
    [PE1-Vlanif10] ipv6 address fc00:0:0:1::2/64
    [PE1-Vlanif10] quit
    [PE1] interface vlanif 20
    [PE1-Vlanif20] ip address 10.0.0.1 30
    [PE1-Vlanif20] quit
    [PE1] interface loopback 0
    [PE1-LoopBack0] ip address 10.2.2.2 32
    [PE1-LoopBack0] quit

  3. Configure OSPF on the link between PE1 and PE2 to ensure that PE1 and PE2 can learn the routes from each other. The configuration procedure is not mentioned here.

    # Configure PE1.

    [PE1] ospf
    [PE1-ospf-1] area 0.0.0.0
    [PE1-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.0
    [PE1-ospf-1-area-0.0.0.0] network 10.0.0.0 0.0.0.3
    [PE1-ospf-1-area-0.0.0.0] quit
    [PE1-ospf-1] quit

    The configurations of PE2 is similar to the configuration of PE1, and is not mentioned here.

  4. Configure BGP4+.

    # Configure CE1.

    [CE1] bgp 100
    [CE1-bgp] peer fc00:0:0:1::2 as-number 200
    [CE1-bgp] ipv6-family unicast
    [CE1-bgp-af-ipv6] peer fc00:0:0:1::2 enable
    [CE1-bgp-af-ipv6] network fc00:0:0:5::5 64
    [CE1-bgp-af-ipv6] quit
    [CE1-bgp] quit

    # Configure PE1.

    [PE1] bgp 200
    [PE1-bgp] peer fc00:0:0:1::1 as-number 100
    [PE1-bgp] ipv6-family unicast
    [PE1-bgp-af-ipv6] peer fc00:0:0:1::1 enable
    [PE1-bgp-af-ipv6] quit
    [PE1-bgp] quit

    # Configure PE2.

    [PE2] bgp 200
    [PE2-bgp] peer fc00:0:0:2::1 as-number 300
    [PE2-bgp] ipv6-family unicast
    [PE2-bgp-af-ipv6] peer fc00:0:0:2::1 enable
    [PE2-bgp-af-ipv6] quit
    [PE2-bgp] quit

    # Configure CE2.

    [CE2] bgp 300
    [CE2-bgp] peer fc00:0:0:2::2 as-number 200
    [CE2-bgp] ipv6-family unicast
    [CE2-bgp-af-ipv6] peer fc00:0:0:2::2 enable
    [CE2-bgp-af-ipv6] network fc00:0:0:6::6 64
    [CE2-bgp-af-ipv6] quit
    [CE2-bgp] quit

    # Check information about the peers on PE1 and PE2, and you can see that the peer relationship between PE1 and PE2 is set up.

    [PE1] display bgp ipv6 peer
    
     BGP local router ID : 10.2.2.2
     Local AS number : 200
     Total number of peers : 1                 Peers in established state : 1
    
      Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State    PrefRcv
    
      1::1             4   100       32       35     0 00:27:20   Established       1
    [PE2] display bgp ipv6 peer
    
     BGP local router ID : 10.3.3.3
     Local AS number : 200
     Total number of peers : 1                 Peers in established state : 1
    
      Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State    PrefRcv
    
      2::1            4   300       31       37     0 00:28:08    Established       1

  5. Configure MPLS on the link between PE1 and PE2 and set up an LSP.

    # Configure PE1.

    [PE1] mpls lsr-id 10.2.2.2
    [PE1] mpls
    [PE1-mpls] lsp-trigger all
    [PE1-mpls] quit
    [PE1] mpls ldp
    [PE1-mpls-ldp] quit
    [PE1] interface vlanif 20
    [PE1-Vlanif20] mpls
    [PE1-Vlanif20] mpls ldp
    [PE1-Vlanif20] quit

    # Configure PE2.

    [PE2] mpls lsr-id 10.3.3.3
    [PE2] mpls
    [PE2-mpls] lsp-trigger all
    [PE2-mpls] quit
    [PE2] mpls ldp
    [PE2-mpls-ldp] quit
    [PE2] interface vlanif 20
    [PE2-Vlanif20] mpls
    [PE2-Vlanif20] mpls ldp
    [PE2-Vlanif20] quit

    # View information about the LSP on PE1, and you can see that the LSP is set up.

    [PE1] display mpls lsp
    
    Flag after Out IF: (I) - LSP Is Only Iterated by RLFA
    ----------------------------------------------------------------------
                     LSP Information: LDP LSP
    ----------------------------------------------------------------------
    FEC                In/Out Label  In/Out IF                      Vrf Name
    10.2.2.2/32        3/NULL        -/- 
    10.0.0.0/30        3/NULL        -/- 
    10.3.3.3/32        NULL/3        -/Vlanif20
    10.3.3.3/32        1024/3        -/Vlanif20
    ----------------------------------------------------------------------
                     LSP Information: BGP IPV6 LSP
    ----------------------------------------------------------------------
      FEC                 :  FC00:0:0:1::/64
      In Label            :  15360                 Out Label    :  -----
      In Interface        :  -----                 OutInterface :  -----
      Vrf Name            :
      FEC                 :  FC00:0:0:5::/64
      In Label            :  15361                 Out Label    :  -----
      In Interface        :  -----                 OutInterface :  -----
      Vrf Name            :                                                        

  6. Configure 6PE.

    # Configure PE1.

    [PE1] bgp 200
    [PE1-bgp] peer 10.3.3.3 as-number 200
    [PE1-bgp] peer 10.3.3.3 connect-interface LoopBack0
    [PE1-bgp] ipv6-family unicast
    [PE1-bgp-af-ipv6] peer 10.3.3.3 enable
    [PE1-bgp-af-ipv6] peer 10.3.3.3 label-route-capability
    [PE1-bgp-af-ipv6] import-route direct
    [PE1-bgp-af-ipv6] quit
    [PE1-bgp] quit

    # Configure PE2.

    [PE2] bgp 200
    [PE2-bgp] peer 10.2.2.2 as-number 200
    [PE2-bgp] peer 10.2.2.2 connect-interface LoopBack0
    [PE2-bgp] ipv6-family unicast
    [PE2-bgp-af-ipv6] peer 10.2.2.2 enable
    [PE2-bgp-af-ipv6] peer 10.2.2.2 label-route-capability
    [PE2-bgp-af-ipv6] import-route direct
    [PE2-bgp-af-ipv6] quit
    [PE2-bgp] quit

    # View the status of the 6PE peers.

    [PE1] display bgp ipv6 peer
    
     BGP local router ID : 10.2.2.2
     Local AS number : 200
     Total number of peers : 2                 Peers in established state : 2
    
      Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State    PrefRcv
    
      10.3.3.3        4    200     1248     1342      0 18:06:28  Established       1
      FC00:0:0:1::1   4    100       32       35      0 00:27:20  Established       1

    You can see that the BGP 6PE connection is set up between PE1 and PE2.

  7. Verify the configuration.

    Take CE1 as an example. CE1 can learn the loopback1 address from CE2. CE1 and CE2 can ping each other.

    [CE1] display ipv6 routing-table
    Routing Table : Public
             Destinations : 8        Routes : 8
    
     Destination  : ::1                                     PrefixLength : 128
     NextHop      : ::1                                     Preference   : 0
     Cost         : 0                                       Protocol     : Direct
     RelayNextHop : ::                                      Tunnel ID    : 0x0   
     Interface    : InLoopBack0                             Flags        : D
     
     Destination  : FC00:0:0:1::                            PrefixLength : 64
     NextHop      : FC00:0:0:1::1                           Preference   : 0
     Cost         : 0                                       Protocol     : Direct
     RelayNextHop : ::                                      Tunnel ID    : 0x0   
     Interface    : Vlanif10                                Flags        : D
    
     Destination  : FC00:0:0:1::1                           PrefixLength : 128
     NextHop      : ::1                                     Preference   : 0
     Cost         : 0                                       Protocol     : Direct
     RelayNextHop : ::                                      Tunnel ID    : 0x0   
     Interface    : Vlanif10                                Flags        : D
     
     Destination  : FC00:0:0:2::                            PrefixLength : 64
     NextHop      : FC00:0:0:1::2                           Preference   : 255
     Cost         : 0                                       Protocol     : EBGP
     RelayNextHop : ::                                      Tunnel ID    : 0x0   
     Interface    : Vlanif10                                Flags        : D
     
     Destination  : FC00:0:0:5::                            PrefixLength : 64
     NextHop      : FC00:0:0:5::5                           Preference   : 0
     Cost         : 0                                       Protocol     : Direct
     RelayNextHop : ::                                      Tunnel ID    : 0x0   
     Interface    : LoopBack1                               Flags        : D
     
     Destination  : FC00:0:0:5::5                           PrefixLength : 128
     NextHop      : ::1                                     Preference   : 0
     Cost         : 0                                       Protocol     : Direct
     RelayNextHop : ::                                      Tunnel ID    : 0x0   
     Interface    : LoopBack1                               Flags        : D
     
     Destination  : FC00:0:0:6::                            PrefixLength : 64
     NextHop      : FC00:0:0:1::2                           Preference   : 255
     Cost         : 0                                       Protocol     : EBGP
     RelayNextHop : ::                                      Tunnel ID    : 0x0   
     Interface    : Vlanif10                                Flags        : D
     
     Destination  : FE80::                                  PrefixLength : 10
     NextHop      : ::                                      Preference   : 0
     Cost         : 0                                       Protocol     : Direct
     RelayNextHop : ::                                      Tunnel ID    : 0x0   
     Interface    : NULL0                                   Flags        : D

    Ping loopback1 address of CE2 on CE1.

    [CE1] ping ipv6 -c 5 fc00:0:0:6::6
      PING 6::6 : 56  data bytes, press CTRL_C to break
        Reply from FC00:0:0:6::6
        bytes=56 Sequence=1 hop limit=64  time = 80 ms
        Reply from FC00:0:0:6::6
        bytes=56 Sequence=2 hop limit=64  time = 80 ms
        Reply from FC00:0:0:6::6
        bytes=56 Sequence=3 hop limit=64  time = 90 ms
        Reply from FC00:0:0:6::6
        bytes=56 Sequence=4 hop limit=64  time = 90 ms
        Reply from FC00:0:0:6::6
        bytes=56 Sequence=5 hop limit=64  time = 60 ms
    
      --- FC00:0:0:6::6 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 60/80/90 ms

    The preceding information shows that 6PE connects separated IPv6 networks and implements interworking.

Configuration Files

  • Configuration file of CE1

    #
    sysname CE1
    #
    ipv6
    #
    vlan batch 10
    #
    interface Vlanif10
     ipv6 enable
     ipv6 address FC00:0:0:1::1/64
    #
    interface GigabitEthernet1/0/0
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface LoopBack0
     ip address 10.1.1.1 255.255.255.255
    #
    interface LoopBack1
     ipv6 enable
     ipv6 address FC00:0:0:5::5/64
    #
    bgp 100
     router-id 10.1.1.1
     peer FC00:0:0:1::2 as-number 200
     #
     ipv4-family unicast
      undo synchronization
     #
     ipv6-family unicast
      undo synchronization
      network FC00:0:0:5:: 64
      peer FC00:0:0:1::2 enable
    #
    return
  • Configuration file of PE1

    #
    sysname PE1
    #
    ipv6
    #
    vlan batch 10 20
    #
    mpls lsr-id 10.2.2.2
    mpls
      lsp-trigger all
    #
    mpls ldp
    #
    interface Vlanif10
     ipv6 enable
     ipv6 address FC00:0:0:1::2/64
    #
    interface Vlanif20
     ip address 10.0.0.1 255.255.255.252
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/0
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet2/0/0
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface LoopBack0
     ip address 10.2.2.2 255.255.255.255
    #
    bgp 200
     router-id 10.2.2.2
     peer 10.3.3.3 as-number 200
     peer 10.3.3.3 connect-interface LoopBack0
     peer FC00:0:0:1::1 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      peer 10.3.3.3 enable
     #
     ipv6-family unicast
      undo synchronization
      import-route direct
      peer 10.3.3.3 enable
      peer 10.3.3.3 label-route-capability
      peer FC00:0:0:1::1 enable
    #
    ospf 1
     area 0.0.0.0
      network 10.2.2.2 0.0.0.0
      network 10.0.0.0 0.0.0.3
    #
    return
  • Configuration file of PE2

    #
    sysname PE2
    #
    ipv6
    #
    vlan batch 20 30
    #
    mpls lsr-id 10.3.3.3
    mpls
      lsp-trigger all
    #
    mpls ldp
    #
    interface Vlanif20
     ip address 10.0.0.2 255.255.255.252
     mpls
     mpls ldp
    #
    interface Vlanif30
     ipv6 enable
     ipv6 address FC00:0:0:2::2/64
    #
    interface GigabitEthernet1/0/0
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface GigabitEthernet2/0/0
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface LoopBack0
     ip address 10.3.3.3 255.255.255.255
    #
    bgp 200
     router-id 10.3.3.3
     peer 10.2.2.2 as-number 200
     peer 10.2.2.2 connect-interface LoopBack0
     peer FC00:0:0:2::1 as-number 300
     #
     ipv4-family unicast
      undo synchronization
      peer 10.2.2.2 enable
     #
     ipv6-family unicast
      undo synchronization
      import-route direct
      peer 10.2.2.2 enable
      peer 10.2.2.2 label-route-capability
      peer FC00:0:0:2::1 enable
    #
    ospf 1
     area 0.0.0.0
      network 10.3.3.3 0.0.0.0
      network 10.0.0.0 0.0.0.3
    #
    return
  • Configuration file of CE2

    #
    sysname CE2
    #
    ipv6
    #
    vlan batch 30
    #
    interface Vlanif30
     ipv6 enable
     ipv6 address FC00:0:0:2::1/64
    #
    interface GigabitEthernet1/0/0
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface LoopBack0
     ipv6 enable
     ip address 10.4.4.4 255.255.255.255
    #
    interface LoopBack1
     ipv6 enable
     ipv6 address FC00:0:0:6::6/64
    #
    bgp 300
     router-id 10.4.4.4
     peer FC00:0:0:2::2 as-number 200
     #
     ipv4-family unicast
      undo synchronization
     #
     ipv6-family unicast
      undo synchronization
      network FC00:0:0:6:: 64
      peer FC00:0:0:2::2 enable
    #
    return
Translation
Download
Updated: 2019-10-22

Document ID: EDOC1000178418

Views: 205803

Downloads: 38

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next