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

CLI-based Configuration Guide - VPN

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R010

This document describes VPN features on the device and provides configuration procedures and 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 Inter-AS VPN Option C (Solution 2)

Example for Configuring Inter-AS VPN Option C (Solution 2)

Networking Requirements

The headquarters and branches of a company connect to networks of different carriers. To enable the headquarters and branches to communicate, Inter-AS BGP/MPLS IP VPN needs to be implemented. As shown in Figure 7-49, CE1 is located in the headquarters and connects to PE1 in AS 100. CE2 is located at the branch and connects to PE2 in AS 200. Both CE1 and CE2 belong to vpn1.

Figure 7-49  Networking diagram for configuring Inter-AS VPN Option C

No IBGP peer relationship is required between the PE and ASBR-PEs. The ASBR-PE learns the labeled BGP routes of the public network at the remote AS from the remote ASBR-PE. Then these BGP routes are imported to IGP. In this manner, LDP can distribute labels for these routes and establish an inter-AS LDP LSP. The inter-AS BGP/MPLS IP VPN Option C can then be implemented.

Configuration Roadmap

Inter-AS Option C can be deployed to meet the company's requirement. The configuration roadmap is as follows:

  1. On the MPLS backbone network in AS 100 and AS 200, configure an IGP protocol to enable the PE and ASBR-PEs to communicate with each other.

  2. Configure basic MPLS capabilities and MPLS LDP on the MPLS backbone network to set up LDP LSPs.

  3. Create a VPN instance on the PE in each AS and bind the VPN instance to the interface connected to the CE.

  4. Set up an EBGP peer relationship between the PEs and CEs in each AS to exchange VPN routing information.

  5. Advertise routes of the PE in an AS to the remote PE: First on the local ASBR-PE, advertise the routes of the PE in an AS to the remote ASBR-PE through BGP; then on the remote ASBR-PE, import these BGP routes to IGP. Then the remote PE learns routes of the PE in the local AS through IGP.

  6. Configure a routing policy on the ASBR-PE: Assign MPLS labels to the routes advertised to the emote ASBR-PE.

  7. Enable the capability of exchanging labeled IPv4 routes between the local ASBR-PE and the remote ASBR-PE.

  8. Configure LDP LSPs for the labeled BGP routes of the public network on ASBR-PEs.

  9. Set up MP-EBGP peer relationships between PEs of different ASs. In most cases, these PEs are not directly connected, and the maximum hops between them must be specified.

Procedure

  1. Assign IP addresses to interfaces according to Figure 7-49.

    # Configure PE1. The configuration on PE2, CE1, CE2, ASBR-PE1, and ASBR-PE2 is similar to the configuration on PE1 and is not mentioned here.

    <Huawei> system-view
    [Huawei] sysname PE1
    [PE1] interface loopback 1
    [PE1-LoopBack1] ip address 1.1.1.9 32
    [PE1-LoopBack1] quit
    [PE1] interface gigabitethernet 1/0/0
    [PE1-GigabitEthernet1/0/0] ip address 172.1.1.2 24
    [PE1-GigabitEthernet1/0/0] quit
    

  2. On the MPLS backbone network in AS 100 and AS 200, configure OSPF to enable the PEs and the ASBR-PEs to communicate with each other.

    # Configure PE1. The configuration on PE2 and ASBR-PEs is similar to the configuration on PE1 and is not mentioned here.

    [PE1] ospf
    [PE1-ospf-1] area 0
    [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
    [PE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255
    [PE1-ospf-1-area-0.0.0.0] quit
    [PE1-ospf-1] quit
    
    NOTE:

    The 32-bit loopback interface address used as LSR ID should be advertised by the PEs and ASBR-PEs using OSPF.

    After the configuration is complete, the ASBR and PEs in the same AS can set up an OSPF neighbor relationship. Run the display ospf peer command to verify that the status of the neighbor relationship is Full. Run the display ip routing-table command. The command output shows that the ASBR and PEs in the same AS have learned the routes to Loopback1 of each other.

    The information displayed on PE1 is used as an example.

    [PE1] display ospf peer
                                                                                    
             OSPF Process 1 with Router ID 1.1.1.9                                  
                     Neighbors                                                      
                                                                                    
     Area 0.0.0.0 interface 172.1.1.2(GigabitEthernet1/0/0)'s neighbors             
     Router ID: 2.2.2.9          Address: 172.1.1.1                                 
       State: Full  Mode:Nbr is  Master  Priority: 1                                
       DR: 172.1.1.2  BDR: 172.1.1.1  MTU: 0                                        
       Dead timer due in 34  sec                                                    
       Retrans timer interval: 5                                                    
       Neighbor is up for 18:50:53                                                  
       Authentication Sequence: [ 0 ]                                               

    The ASBR-PE and PEs in the same AS have obtained the IP address of Loopback1 interface of each other and can ping Loopback1 interface address of each other.

  3. Set up the EBGP peer relationship between ASBR-PEs.

    # Configure ASBR-PE1.

    [ASBR-PE1] bgp 100
    [ASBR-PE1-bgp] peer 192.1.1.2 as-number 200
    [ASBR-PE1-bgp] quit

    # Configure ASBR-PE2.

    [ASBR-PE2] bgp 200
    [ASBR-PE2-bgp] peer 192.1.1.1 as-number 100
    [ASBR-PE2-bgp] quit

    After the configuration is complete, run the display bgp peer command on ASBR-PEs. The command output shows that the statue of neighbors is Established.

    ASBR-PE1 is used as an example.

    [ASBR-PE1] display bgp peer
    
     BGP local router ID : 2.2.2.9
     Local AS number : 100
     Total number of peers : 1                 Peers in established state : 1
    
      Peer        V  AS    MsgRcvd  MsgSent  OutQ  Up/Down       State       PrefRcv
    
      192.1.1.2   4 200        129      134     0 01:39:21 Established             1
    

  4. Advertise the routes of a PE in an AS to the remote PE.

    # On ASBR-PE1: Advertise routes to loopback interfaces to ASBR-PE2.

    [ASBR-PE1] bgp 100
    [ASBR-PE1-bgp] network 1.1.1.9 32
    [ASBR-PE1-bgp] quit

    # On ASBR-PE2: Advertise routes to loopback interfaces to ASBR-PE1.

    [ASBR-PE2] bgp 200
    [ASBR-PE2-bgp] network 4.4.4.9 32
    [ASBR-PE2-bgp] quit

    # On ASBR-PE1: Import BGP routes to OSPF, and advertise the routes of PE2 to PE1 according to OSPF.

    [ASBR-PE1] ospf 1
    [ASBR-PE1-ospf-1] import-route bgp

    # On ASBR-PE2: Import BGP routes to OSPF, and advertise the routes of PE1 to PE2 according to OSPF.

    [ASBR-PE2] ospf 1
    [ASBR-PE2-ospf-1] import-route bgp

    After the configuration is complete, run the display ip routing-table command on PEs to check the routing table. PE1 is used as an example.

    [PE1] display ip routing-table
    Route Flags:
    R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 10       Routes : 10
    
    Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface
    
            1.1.1.9/32  Direct 0    0           D  127.0.0.1       LoopBack1
            2.2.2.9/32  OSPF   10   1           D  172.1.1.1       GigabitEthernet1/0/0
          4.4.4.9/32  O_ASE  150  1           D  172.1.1.1       GigabitEthernet1/0/0
          127.0.0.0/8   Direct 0    0           D  127.0.0.1       InLoopBack0
          127.0.0.1/32  Direct 0    0           D  127.0.0.1       InLoopBack0
    127.255.255.255/32  Direct 0    0           D  127.0.0.1       InLoopBack0  
          172.1.1.0/24  Direct 0    0           D  172.1.1.2       GigabitEthernet1/0/0
          172.1.1.2/32  Direct 0    0           D  127.0.0.1       GigabitEthernet1/0/0
        172.1.1.255/32  Direct 0    0           D  127.0.0.1       GigabitEthernet1/0/0
    255.255.255.255/32  Direct 0    0           D  127.0.0.1       InLoopBack0 

  5. Configure basic MPLS capabilities and MPLS LDP on the MPLS backbone network of AS 100 and AS 200 to set up LDP LSPs.

    # Configure basic MPLS capabilities on PE1 and enable LDP on the interface connected to ASBR-PE1.

    [PE1] mpls lsr-id 1.1.1.9
    [PE1] mpls
    [PE1-mpls] quit
    [PE1] mpls ldp
    [PE1-mpls-ldp] quit
    [PE1] interface gigabitethernet 1/0/0
    [PE1-GigabitEthernet1/0/0] mpls
    [PE1-GigabitEthernet1/0/0] mpls ldp
    [PE1-GigabitEthernet1/0/0] quit

    # Configure basic MPLS capabilities on ASBR-PE1 and enable LDP on the interface connected to PE1.

    [ASBR-PE1] mpls lsr-id 2.2.2.9
    [ASBR-PE1] mpls
    [ASBR-PE1-mpls] quit
    [ASBR-PE1] mpls ldp
    [ASBR-PE1-mpls-ldp] quit
    [ASBR-PE1] interface gigabitethernet 1/0/0
    [ASBR-PE1-GigabitEthernet1/0/0] mpls
    [ASBR-PE1-GigabitEthernet1/0/0] mpls ldp
    [ASBR-PE1-GigabitEthernet1/0/0] quit

    # Configure basic MPLS capabilities on ASBR-PE2 and enable LDP on the interface connected to PE2.

    [ASBR-PE2] mpls lsr-id 3.3.3.9
    [ASBR-PE2] mpls
    [ASBR-PE2-mpls] quit
    [ASBR-PE2] mpls ldp
    [ASBR-PE2-mpls-ldp] quit
    [ASBR-PE2] interface gigabitethernet 1/0/0
    [ASBR-PE2-GigabitEthernet1/0/0] mpls
    [ASBR-PE2-GigabitEthernet1/0/0] mpls ldp
    [ASBR-PE2-GigabitEthernet1/0/0] quit

    # Configure basic MPLS capabilities on PE2 and enable LDP on the interface connected to ASBR-PE2.

    [PE2] mpls lsr-id 4.4.4.9
    [PE2] mpls
    [PE2-mpls] quit
    [PE2] mpls ldp
    [PE2-mpls-ldp] quit
    [PE2] interface gigabitethernet 1/0/0
    [PE2-GigabitEthernet1/0/0] mpls
    [PE2-GigabitEthernet1/0/0] mpls ldp
    [PE2-GigabitEthernet1/0/0] quit

    After the configuration is complete, the LDP sessions between PE1 and the ASBR-PE1, and between PE2 and ASBR-PE2 are set up. Run the display mpls ldp session command. The command output shows that the status is "Operational". Run the display mpls ldp lsp command. Information about the established LDP LSPs is displayed.

    The information displayed on PE1 is used as an example.

    [PE1] display mpls ldp session
    
     LDP Session(s) in Public Network
     Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
     A '*' before a session means the session is being deleted.
     ------------------------------------------------------------------------------
     PeerID             Status      LAM  SsnRole  SsnAge      KASent/Rcv
     ------------------------------------------------------------------------------
     2.2.2.9:0          Operational DU   Passive  0000:00:01  5/5
     ------------------------------------------------------------------------------
     TOTAL: 1 session(s) Found.
    
    
    [PE1] display mpls ldp lsp
     LDP LSP Information
     -------------------------------------------------------------------------------
     DestAddress/Mask   In/OutLabel   UpstreamPeer   NextHop         OutInterface
     -------------------------------------------------------------------------------
     1.1.1.9/32         3/NULL        2.2.2.9        127.0.0.1       InLoop0
    *1.1.1.9/32         Liberal/1024                 DS/2.2.2.9
     2.2.2.9/32         NULL/3        -              172.1.1.1       GE1/0/0
     2.2.2.9/32         1024/3        2.2.2.9        172.1.1.1       GE1/0/0
     -------------------------------------------------------------------------------
     TOTAL: 3 Normal LSP(s) Found.
     TOTAL: 1 Liberal LSP(s) Found.
     TOTAL: 0 Frr LSP(s) Found.
     A '*' before an LSP means the LSP is not established                           
     A '*' before a Label means the USCB or DSCB is stale                           
     A '*' before a UpstreamPeer means the session is stale                         
     A '*' before a DS means the session is stale                                   
     A '*' before a NextHop means the LSP is FRR LSP
    

  6. Enable the capability of exchanging labeled IPv4 routes on ASBR-PEs.

    # On ASBR-PE1: Enable MPLS on the interface connected to ASBR-PE2. The configuration on ASBR-PE2 is similar to the configuration on ASBR-PE1 and is not mentioned here.

    [ASBR-PE1] interface gigabitethernet 2/0/0
    [ASBR-PE1-GigabitEthernet2/0/0] ip address 192.1.1.1 24
    [ASBR-PE1-GigabitEthernet2/0/0] mpls
    [ASBR-PE1-GigabitEthernet2/0/0] quit

    # On ASBR-PE1: Create a routing policy. The configuration on ASBR-PE2 is similar to the configuration on ASBR-PE1 and is not mentioned here.

    [ASBR-PE1] route-policy policy1 permit node 1
    [ASBR-PE1-route-policy] apply mpls-label
    [ASBR-PE1-route-policy] quit

    # On ASBR-PE1: Apply a routing policy to the routes advertised to ASBR-PE2, and enable the capability of exchanging labeled IPv4 routes with ASBR-PE2. The configuration on ASBR-PE2 is similar to the configuration on ASBR-PE1 and is not mentioned here.

    [ASBR-PE1] bgp 100
    [ASBR-PE1-bgp] peer 192.1.1.2 route-policy policy1 export
    [ASBR-PE1-bgp] peer 192.1.1.2 label-route-capability
    [ASBR-PE1-bgp] quit

  7. Configure LDP LSPs for the labeled BGP routes of the public network on ASBR devices.

    # Configure ASBR-PE1.

    [ASBR-PE1] mpls
    [ASBR-PE1-mpls] lsp-trigger bgp-label-route
    [ASBR-PE1-mpls] quit

    # Configure ASBR-PE2.

    [ASBR-PE2] mpls
    [ASBR-PE2-mpls] lsp-trigger bgp-label-route
    [ASBR-PE2-mpls] quit

  8. Configure VPN instances to access CEs on PEs.

    # Configure PE1.

    [PE1] ip vpn-instance vpn1
    [PE1-vpn-instance-vpn1] ipv4-family
    [PE1-vpn-instance-vpn1-af-ipv4] route-distinguisher 100:1
    [PE1-vpn-instance-vpn1-af-ipv4] vpn-target 1:1 export-extcommunity
    [PE1-vpn-instance-vpn1-af-ipv4] vpn-target 1:1 import-extcommunity
    [PE1-vpn-instance-vpn1-af-ipv4] quit
    [PE1-vpn-instance-vpn1] quit
    [PE1] interface gigabitethernet 2/0/0
    [PE1-GigabitEthernet2/0/0] ip binding vpn-instance vpn1
    [PE1-GigabitEthernet2/0/0] ip address 10.1.1.2 24
    [PE1-GigabitEthernet2/0/0] quit

    # Configure PE2.

    [PE2] ip vpn-instance vpn1
    [PE2-vpn-instance-vpn1] ipv4-family
    [PE2-vpn-instance-vpn1-af-ipv4] route-distinguisher 200:1
    [PE2-vpn-instance-vpn1-af-ipv4] vpn-target 1:1 export-extcommunity
    [PE2-vpn-instance-vpn1-af-ipv4] vpn-target 1:1 import-extcommunity
    [PE2-vpn-instance-vpn1-af-ipv4] quit
    [PE2-vpn-instance-vpn1] quit
    [PE2] interface gigabitethernet 2/0/0
    [PE2-GigabitEthernet2/0/0] ip binding vpn-instance vpn1
    [PE2-GigabitEthernet2/0/0] ip address 10.2.1.2 24
    [PE2-GigabitEthernet2/0/0] quit

    After the configuration is complete, run the display ip vpn-instance verbose command on the PEs to check the configuration of VPN instances. Each PE can ping its connected CE.

    The information displayed on PE1 and CE1 is used as an example.

    [PE1] display ip vpn-instance verbose
     Total VPN-Instances configured : 1
     Total IPv4 VPN-Instances configured : 1
     Total IPv6 VPN-Instances configured : 0
    
     VPN-Instance Name and ID : vpn1, 1
      Interfaces : GigabitEthernet2/0/0
     Address family ipv4
      Create date : 2008/02/27 09:53:47
      Up time : 0 days, 00 hours, 35 minutes and 43 seconds
      Route Distinguisher : 100:1
      Export VPN Targets :  1:1
      Import VPN Targets :  1:1
      Label Policy : label per route
      Log Interval : 5
    [PE1] ping -vpn-instance vpn1 10.1.1.1
      PING 10.1.1.1: 56  data bytes, press CTRL_C to break
        Request time out
        Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=50 ms
        Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=40 ms
        Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
        Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=255 time=10 ms
    
      --- 10.1.1.1 ping statistics ---
        5 packet(s) transmitted
        4 packet(s) received
        20.00% packet loss
    round-trip min/avg/max = 10/32/50 ms
    

  9. Set up an MP-EBGP peer relationship between PE1 and PE2.

    # Configure PE1.

    [PE1] bgp 100
    [PE1-bgp] peer 4.4.4.9 as-number 200
    [PE1-bgp] peer 4.4.4.9 connect-interface LoopBack 1
    [PE1-bgp] peer 4.4.4.9 ebgp-max-hop 10
    [PE1-bgp] ipv4-family vpnv4
    [PE1-bgp-af-vpnv4] peer 4.4.4.9 enable
    [PE1-bgp-af-vpnv4] quit
    [PE1-bgp] quit

    # Configure PE2.

    [PE2] bgp 200
    [PE2-bgp] peer 1.1.1.9 as-number 100
    [PE2-bgp] peer 1.1.1.9 connect-interface LoopBack 1
    [PE2-bgp] peer 1.1.1.9 ebgp-max-hop 10
    [PE2-bgp] ipv4-family vpnv4
    [PE2-bgp-af-vpnv4] peer 1.1.1.9 enable
    [PE2-bgp-af-vpnv4] quit
    [PE2-bgp] quit

  10. Set up EBGP peer relationships between the PEs and CEs and import VPN routes into BGP.

    # Configure CE1.

    [CE1] bgp 65001
    [CE1-bgp] peer 10.1.1.2 as-number 100
    [CE1-bgp] import-route direct
    [CE1-bgp] quit

    # Configure CE2.

    [CE2] bgp 65002
    [CE2-bgp] peer 10.2.1.2 as-number 200
    [CE2-bgp] import-route direct
    [CE2-bgp] quit

    # Configure PE1.

    [PE1] bgp 100
    [PE1-bgp] ipv4-family vpn-instance vpn1
    [PE1-bgp-vpn1] peer 10.1.1.1 as-number 65001
    [PE1-bgp-vpn1] import-route direct
    [PE1-bgp-vpn1] quit
    [PE1-bgp] quit

    # Configure PE2.

    [PE2] bgp 200
    [PE2-bgp] ipv4-family vpn-instance vpn1
    [PE2-bgp-vpn1] peer 10.2.1.1 as-number 65002
    [PE2-bgp-vpn1] import-route direct
    [PE2-bgp-vpn1] quit
    [PE2-bgp] quit

    After the configuration is complete, run the display bgp vpnv4 vpn-instance peer command on the PEs. The command output shows that BGP peer relationships have been established between the PEs and CEs.

    The peer relationship between PE1 and CE1 is used as an example.

    [PE1] display bgp vpnv4 vpn-instance vpn1 peer
    
     BGP local router ID : 1.1.1.9
     Local AS number : 100
     
    VPN-Instance vpn1, router ID 1.1.1.9:
     Total number of peers : 1                 Peers in established state : 1
    
      Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv
      10.1.1.1        4 65001        3        3     0 00:00:52 Established       1
    

  11. Verify the configuration.

    # After the configuration is complete, CE1 and CE2 learn routes to interfaces on each other and can ping each other successfully.

    # The information displayed on CE1 is used as an example.

    [CE1] display ip routing-table
    Route Flags:
    R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 8        Routes : 8
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
           10.1.1.0/24  Direct  0    0           D   10.1.1.1        GigabitEthernet1/0/0
           10.1.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
         10.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
           10.2.1.0/24  EBGP    255  0           D   10.1.1.2        GigabitEthernet1/0/0
           127.0.0.0/8  Direct  0    0           D   127.0.0.1       InLoopBack0
          127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    [CE1] ping 10.2.1.1
      PING 10.2.1.1: 56  data bytes, press CTRL_C to break
        Reply from 10.2.1.1: bytes=56 Sequence=1 ttl=251 time=102 ms
        Reply from 10.2.1.1: bytes=56 Sequence=2 ttl=251 time=89 ms
        Reply from 10.2.1.1: bytes=56 Sequence=3 ttl=251 time=106 ms
        Reply from 10.2.1.1: bytes=56 Sequence=4 ttl=251 time=104 ms
        Reply from 10.2.1.1: bytes=56 Sequence=5 ttl=251 time=56 ms
    
      --- 10.2.1.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 56/91/106 ms

    # After the configuration is complete, run the display ip routing-table dest-ip-address verbose command on ASBR-PE1. The command output shows that the routes from ASBR-PE1 to PE2 are labeled BGP routes of the public network: routing table is "Public", the protocol type is "BGP", and the label has a non-zero value.

    # The information displayed on ASBR-PE1 is used as an example.

    [ASBR-PE1] display ip routing-table 4.4.4.9 verbose
    Route Flags:
    R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Table : Public
    Summary Count : 1
    
     Destination	: 4.4.4.9/32
        Protocol	: BGP            Process ID	: 0
      Preference	: 255                  Cost	: 1
         NextHop	: 192.1.1.2       Neighbour	: 192.1.1.2
           State	: Active Adv            Age	: 00h12m53s
             Tag	: 0                Priority	: 0
           Label	: 15360             QoSInfo	: 0x0
      IndirectID	: 0x0
    RelayNextHop	: 192.1.1.2       Interface	: GigabitEthernet2/0/0
        TunnelID	: 0x6002006           Flags	: D

    # Run the display mpls lsp protocol ldp include dest-ip-address verbose on ASBR-PE1 and PE2 respectively. The command output shows that an LDP LSP is established between ASBR-PE1 and PE2. Besides, you can find an LDP Ingress LSP on a PE to the remote PE.

    [ASBR-PE1] display mpls lsp protocol ldp include 4.4.4.9 32 verbose
    ----------------------------------------------------------------------
                     LSP Information: LDP LSP
    ----------------------------------------------------------------------
      No                  :  1
      VrfIndex            :
      Fec                 :  4.4.4.9/32
      Nexthop             :  192.1.1.2
      In-Label            :  1024
      Out-Label           :  NULL
      In-Interface        :  ----------
      Out-Interface       :  ----------
      LspIndex            :  13313
      Token               :  0x0
      FrrToken            :  0x0
      LsrType             :  Egress
      Outgoing token      :  0x6002006
      Label Operation     :  SWAPPUSH
      Mpls-Mtu            :  ------
      TimeStamp           :  15829sec
      Bfd-State           :  ---
      BGPKey              :  0x24  
    

Configuration Files

  • CE1 configuration file

    #
     sysname CE1
    #
    interface GigabitEthernet1/0/0
     ip address 10.1.1.1 255.255.255.0
    #
    bgp 65001
     peer 10.1.1.2 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 10.1.1.2 enable
    #
    return
    
  • PE1 configuration file

    #
     sysname PE1
    #
    ip vpn-instance vpn1
     ipv4-family
      route-distinguisher 100:1
      vpn-target 1:1 export-extcommunity
      vpn-target 1:1 import-extcommunity
    #
     mpls lsr-id 1.1.1.9
     mpls
    #
    mpls ldp
    #
    interface GigabitEthernet1/0/0
     ip address 172.1.1.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet2/0/0
     ip binding vpn-instance vpn1
     ip address 10.1.1.2 255.255.255.0
    #
    interface LoopBack1
     ip address 1.1.1.9 255.255.255.255
    #
    bgp 100
     peer 4.4.4.9 as-number 200
     peer 4.4.4.9 ebgp-max-hop 10
     peer 4.4.4.9 connect-interface LoopBack1
     #
     ipv4-family unicast
      undo synchronization
      peer 4.4.4.9 enable
     #
     ipv4-family vpnv4
      policy vpn-target
      peer 4.4.4.9 enable
     #
     ipv4-family vpn-instance vpn1
      import-route direct
      peer 10.1.1.1 as-number 65001
    #
    ospf 1
     area 0.0.0.0
      network 1.1.1.9 0.0.0.0
      network 172.1.1.0 0.0.0.255
    #
    return
    
  • ASBR-PE1 configuration file

    #
     sysname ASBR-PE1
    #
     mpls lsr-id 2.2.2.9
     mpls
      lsp-trigger bgp-label-route
    #
    mpls ldp
    #
    interface GigabitEthernet1/0/0
     ip address 172.1.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet2/0/0
     ip address 192.1.1.1 255.255.255.0
     mpls
    #
    interface LoopBack1
     ip address 2.2.2.9 255.255.255.255
    #
    bgp 100
     peer 192.1.1.2 as-number 200
     #
     ipv4-family unicast
      undo synchronization
      network 1.1.1.9 255.255.255.255
      peer 192.1.1.2 enable
      peer 192.1.1.2 route-policy policy1 export
      peer 192.1.1.2 label-route-capability
    #
    ospf 1
     import-route bgp
     area 0.0.0.0
      network 2.2.2.9 0.0.0.0
      network 172.1.1.0 0.0.0.255
    #
    route-policy policy1 permit node 1
     apply mpls-label
    #
    return
    
  • ASBR-PE2 configuration file

    #
     sysname ASBR-PE2
    #
     mpls lsr-id 3.3.3.9
     mpls
      lsp-trigger bgp-label-route
    #
    mpls ldp
    #
    interface GigabitEthernet1/0/0
     ip address 162.1.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet2/0/0
     ip address 192.1.1.2 255.255.255.0
     mpls
    #
    interface LoopBack1
     ip address 3.3.3.9 255.255.255.255
    #
    bgp 200
     peer 192.1.1.1 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      network 4.4.4.9 255.255.255.255
      peer 192.1.1.1 enable
      peer 192.1.1.1 route-policy policy1 export
      peer 192.1.1.1 label-route-capability
    #
    ospf 1
     import-route bgp
     area 0.0.0.0
      network 3.3.3.9 0.0.0.0
      network 162.1.1.0 0.0.0.255
    #
    route-policy policy1 permit node 1
     apply mpls-label
    #
    return
    
  • PE2 configuration file

    #
     sysname PE2
    #
    ip vpn-instance vpn1
     ipv4-family
      route-distinguisher 200:1
      vpn-target 1:1 export-extcommunity
      vpn-target 1:1 import-extcommunity
    #
     mpls lsr-id 4.4.4.9
     mpls
    #
    mpls ldp
    #
    interface GigabitEthernet1/0/0
     ip address 162.1.1.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet2/0/0
     ip binding vpn-instance vpn1
     ip address 10.2.1.2 255.255.255.0
    #
    interface LoopBack1
     ip address 4.4.4.9 255.255.255.255
    #
    bgp 200
     peer 1.1.1.9 as-number 100
     peer 1.1.1.9 ebgp-max-hop 10
     peer 1.1.1.9 connect-interface LoopBack1
     #
     ipv4-family unicast
      undo synchronization
      peer 1.1.1.9 enable
     #
     ipv4-family vpnv4
      policy vpn-target
      peer 1.1.1.9 enable
     #
     ipv4-family vpn-instance vpn1
      import-route direct
      peer 10.2.1.1 as-number 65002
    #
    ospf 1
     area 0.0.0.0
      network 4.4.4.9 0.0.0.0
      network 162.1.1.0 0.0.0.255
    #
    return
    
  • CE2 configuration file

    #
     sysname CE2
    #
    interface GigabitEthernet1/0/0
     ip address 10.2.1.1 255.255.255.0
    #
    bgp 65002
     peer 10.2.1.2 as-number 200
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 10.2.1.2 enable
    #
    return
    
Translation
Download
Updated: 2019-08-07

Document ID: EDOC1100033725

Views: 142032

Downloads: 357

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