< Home

Example for Configuring Remote MPLS LDP Sessions

Networking Requirements

As shown in Figure 1, LSRA and LSRC are PEs of the IP/MPLS backbone network. MPLS L2VPN services need to be deployed on LSRA and LSRC to connect VPN sites at Layer 2, so remote LDP sessions need to be deployed between LSRA and LSRC to implement VC label exchange.

Figure 1 Networking diagram for configuring remote LDP sessions

Configuration Roadmap

If LSRA is directly connected to LSRC, local LDP sessions established on LSRs can be used to set up LDP LSPs to transmit services and exchange VC labels. In this example, LSRA is indirectly connected to LSRC, so remote LDP sessions must be configured. The configuration roadmap is as follows:

  1. Configure OSPF between the LSRs to implement IP connectivity on the backbone network.
  2. Configure remote LDP sessions on LSRA and LSRC to exchange VC labels.

Procedure

  1. Create VLANs and VLANIF interfaces on the switch, configure IP addresses for the VLANIF interfaces, and add physical interfaces to the VLANs.

    # Configure LSRA. The configurations of LSRB and LSRC are similar to the configuration of LSRA, and are not mentioned here.

    <HUAWEI> system-view
    [HUAWEI] sysname LSRA
    [LSRA] interface loopback 0
    [LSRA-LoopBack0] ip address 1.1.1.1 32
    [LSRA-LoopBack0] quit
    [LSRA] vlan batch 10
    [LSRA] interface vlanif 10
    [LSRA-Vlanif10] ip address 10.1.1.1 24
    [LSRA-Vlanif10] quit
    [LSRA] interface gigabitethernet 0/0/1
    [LSRA-GigabitEthernet0/0/1] port link-type trunk
    [LSRA-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
    [LSRA-GigabitEthernet0/0/1] quit

  2. Configure OSPF to advertise the network segments connecting to interfaces on each node and to advertise the routes of hosts with LSR IDs.

    # Configure LSRA.

    [LSRA] ospf 1
    [LSRA-ospf-1] area 0
    [LSRA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
    [LSRA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [LSRA-ospf-1-area-0.0.0.0] quit
    [LSRA-ospf-1] quit

    # Configure LSRB.

    [LSRB] ospf 1
    [LSRB-ospf-1] area 0
    [LSRB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
    [LSRB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [LSRB-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [LSRB-ospf-1-area-0.0.0.0] quit
    [LSRB-ospf-1] quit

    # Configure LSRC.

    [LSRC] ospf 1
    [LSRC-ospf-1] area 0
    [LSRC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
    [LSRC-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [LSRC-ospf-1-area-0.0.0.0] quit
    [LSRC-ospf-1] quit

    After the configuration is complete, run the display ip routing-table command on each node, and you can view that the nodes learn routes from each other.

  3. Enable global MPLS and MPLS LDP on each LSR.

    # Configure LSRA.

    [LSRA] mpls lsr-id 1.1.1.1 
    [LSRA] mpls
    [LSRA-mpls] quit 
    [LSRA] mpls ldp
    [LSRA-mpls-ldp] quit
    

    # Configure LSRB.

    [LSRB] mpls lsr-id 2.2.2.2 
    [LSRB] mpls 
    [LSRB-mpls] quit 
    [LSRB] mpls ldp
    [LSRB-mpls-ldp] quit

    # Configure LSRC.

    [LSRC] mpls lsr-id 3.3.3.3 
    [LSRC] mpls 
    [LSRC-mpls] quit 
    [LSRC] mpls ldp
    [LSRC-mpls-ldp] quit

  4. Specify the name and IP address of the remote peer on the two LSRs of a remote LDP session.

    # Configure LSRA.

    [LSRA] mpls ldp remote-peer LSRC
    [LSRA-mpls-ldp-remote-lsrc] remote-ip 3.3.3.3 
    [LSRA-mpls-ldp-remote-lsrc] quit
    

    # Configure LSRC.

    [LSRC] mpls ldp remote-peer LSRA 
    [LSRC-mpls-ldp-remote-lsra] remote-ip 1.1.1.1
    [LSRC-mpls-ldp-remote-lsra] quit

  5. Verify the configuration.

    # After the configuration is complete, run the display mpls ldp session command on the node. The command output shows that the status of the remote LDP session between LSRA and LSRC is Operational.

    LSRA is used as an example.

    [LSRA] 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
     --------------------------------------------------------------------------
     3.3.3.3:0          Operational DU   Passive  0000:00:01  6/6
     --------------------------------------------------------------------------
     TOTAL: 1 session(s) Found.
    

    # Run the display mpls ldp remote-peer command on the two LSRs of the remote LDP session to view information about the remote peer.

    LSRA is used as an example.

    [LSRA] display mpls ldp remote-peer
    
                            LDP Remote Entity Information
     ------------------------------------------------------------------------------
     Remote Peer Name  : lsrc
     Remote Peer IP    : 3.3.3.3            LDP ID        : 1.1.1.1:0
     Transport Address : 1.1.1.1            Entity Status : Active
    
     Configured Keepalive Hold Timer : 45 Sec
     Configured Keepalive Send Timer : ---
     Configured Hello Hold Timer     : 45 Sec
     Negotiated Hello Hold Timer     : 45 Sec
     Configured Hello Send Timer     : ---
     Configured Delay Timer          : 10 Sec
     Hello Packet sent/received      : 6347/6307
     Label Advertisement Mode        : Downstream Unsolicited                                                                           
     Remote Peer Deletion Status     : No                                                                                               
     Auto-config                     : ---                                                                                              
     ------------------------------------------------------------------------------
     TOTAL: 1 Peer(s) Found.
    

Configuration Files

  • LSRA configuration file

    #
    sysname LSRA
    #
    vlan batch 10
    #
    mpls lsr-id 1.1.1.1
    mpls
    #
    mpls ldp
    #
    mpls ldp remote-peer lsrc
     remote-ip 3.3.3.3
    #
    interface Vlanif10
     ip address 10.1.1.1 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type trunk 
     port trunk allow-pass vlan 10 
    #
    interface LoopBack0
     ip address 1.1.1.1 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 1.1.1.1 0.0.0.0
      network 10.1.1.0 0.0.0.255
    #
    return
  • LSRB configuration file

    #
    sysname LSRB
    #
    vlan batch 10 20
    #
    mpls lsr-id 2.2.2.2
    mpls
    #
    mpls ldp
    #
    interface Vlanif10
     ip address 10.1.1.2 255.255.255.0
    #
    interface Vlanif20
     ip address 10.2.1.1 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type trunk 
     port trunk allow-pass vlan 10 
    #
    interface GigabitEthernet0/0/2
     port link-type trunk 
     port trunk allow-pass vlan 20 
    #
    interface LoopBack0
     ip address 2.2.2.2 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 2.2.2.2 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 10.2.1.0 0.0.0.255
    #
    return
  • LSRC configuration file

    #
    sysname LSRC
    #
    vlan batch 20
    #
    mpls lsr-id 3.3.3.3
    mpls
    #
    mpls ldp
    #
    mpls ldp remote-peer lsra
     remote-ip 1.1.1.1
    #
    interface Vlanif20
     ip address 10.2.1.2 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type trunk 
     port trunk allow-pass vlan 20 
    #
    interface LoopBack0
     ip address 3.3.3.3 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 3.3.3.3 0.0.0.0
      network 10.2.1.0 0.0.0.255
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >