The static LSP is used in MPLS L2VPN.
Networking Diagram
Figure 16-3 shows the networking diagram of the static Label Switched Path (LSP) configuration.
Figure 16-3 Networking Diagram of Static LSP Configuration
The Label Distribution Protocol (LDP) is running on the four ZXA10 C300s. Configure two static LSPs between C300-1 and C300-3.
The static LSP from C300-1 to C300-3 is: C300-1 > C300-2 > C300-3.
The static LSP from C300-3 to C300-1 is: C300-3 > C300-4 > C300-1.
Configuration Data
Table 16-2lists the configuration data of the static LSP.
Table 16-2 Configuration Data of the Static LSP
Item Data
Loopback interface l ID: 1
l IP address: 1.1.1.1/32
L3 interface 1 l VLAN ID: 10
l Interface: gei_1/21/1 l IP address: 10.1.1.1/24
L3 interface 2 l VLAN ID: 13
l Interface: gei_1/21/2 l IP address: 13.1.1.12/24
Static LSP (C300-1 to C300-3) l Destination IP address: 3.3.3.3/32 l Next hop IP address: 10.1.1.2/24 l Out label: 1040001
C300-1
Static LSP (C300-3 to C300-1) l Destination IP address: 1.1.1.1/32 l In label: 1041004
Item Data Loopback interface l ID: 1
l IP address: 2.2.2.2/32
L3 interface 1 l VLAN ID: 11
l Interface: gei_1/21/1 l IP address: 11.1.1.1/24
L3 interface 2 l VLAN ID: 10
l Interface: gei_1/21/2 l IP address: 10.1.1.2/24 C300-2
Static LSP (C300-1 to C300-3) l Destination IP address: 3.3.3.3/32 l Next hop IP address: 11.1.1.2/24 l Out label: 1040002
l In label: 1040001 Loopback interface l ID: 1
l IP address: 3.3.3.3/32
L3 interface 1 l VLAN ID: 12
l Interface: gei_1/21/1 l IP address: 12.1.1.1/24
L3 interface 2 l VLAN ID: 11
l Interface: gei_1/21/2 l IP address: 11.1.1.2/24
Static LSP (C300-1 to C300-3) l Destination IP address: 3.3.3.3/32 l In label: 1040002
C300-3
Static LSP (C300-3 to C300-1) l Destination IP address: 1.1.1.1/32 l Next hop IP address: 10.1.1.2/24 l Out label: 1041005
Loopback interface l ID: 1
l IP address: 4.4.4.4/32
L3 interface 1 l VLAN ID: 13
l Interface: gei_1/21/1 l IP address: 13.1.1.1/24
L3 interface 2 l VLAN ID: 12
l Interface: gei_1/21/2 l IP address: 12.1.1.2/24 C300-4
Static LSP (C300-3 to C300-1) l Destination IP address: 1.1.1.1/32 l Next hop IP address: 13.1.1.2/24 l Out label: 1040004
l In label: 1040005
Configuration Flow
Figure 16-4shows the configuration flowchart of the static LSP.
Figure 16-4 Configuration Flowchart of Static LSP
Steps
l Configuration on C300-1.
1. Configure the loopback interface.
ZXAN(config)#interface loopback1
ZXAN(config-loopback1)#ip address 1.1.1.1 255.255.255.255 ZXAN(config-loopback1)#exit
2. Configure the VLAN of the uplink interfaces.
ZXAN(config)#interface gei_1/21/1 ZXAN(config-if)#switchport vlan 10 tag ZXAN(config-if)#exit
ZXAN(config)#interface gei_1/21/2 ZXAN(config-if)#switchport vlan 13 tag ZXAN(config-if)#exit
3. Configure the IP address of the VLAN interfaces.
ZXAN(config)#interface vlan 10
ZXAN(config-if-vlan10)#ip address 10.1.1.1 255.255.255.0 ZXAN(config-if-vlan10)#exit
ZXAN(config)#interface vlan 13
ZXAN(config-if-vlan13)#ip address 13.1.1.2 255.255.255.0 ZXAN(config-if-vlan13)#exit
4. Enable the MPLS on the VLAN interfaces.
ZXAN(config)#interface vlan 10 ZXAN(config-if-vlan10)#mpls ip ZXAN(config-if-vlan10)#exit ZXAN(config)#interface vlan 13 ZXAN(config-if-vlan13)#mpls ip ZXAN(config-if-vlan13)#exit
5. Configure the routing protocol.
ZXAN(config)#router ospf 1
ZXAN(config-router)#network 1.1.1.1 0.0.0.0 area 0.0.0.0 ZXAN(config-router)#network 10.1.1.0 0.0.0.255 area 0.0.0.0 ZXAN(config-router)#network 13.1.1.0 0.0.0.255 area 0.0.0.0 ZXAN(config-router)#exit
6. Enable the global MPLS function.
ZXAN(config)#mpls ldp router-id loopback1 ZXAN(config)#mpls ip
7. Configure the static label binding.
ZXAN(config)#mpls static binding ipv4 3.3.3.3 255.255.255.255 outlabel 10.1.1.2 1040001 //static LSP from C300-1 to C300-3
ZXAN(config)#mpls static binding ipv4 1.1.1.1 255.255.255.255 inlabel 1041004 //static LSP from C300-3 to C300-1
8. Save the configuration data.
l Configuration on C300-2.
1. Configure the loopback interface.
ZXAN(config)#interface loopback1
ZXAN(config-loopback1)#ip address 2.2.2.2 255.255.255.255 ZXAN(config-loopback1)#exit
2. Configure the VLAN of the uplink interfaces.
ZXAN(config)#interface gei_1/21/1 ZXAN(config-if)#switchport vlan 11 tag ZXAN(config-if)#exit
ZXAN(config)#interface gei_1/21/2 ZXAN(config-if)#switchport vlan 10 tag ZXAN(config-if)#exit
3. Configure the IP address of the VLAN interfaces.
ZXAN(config)#interface vlan 10
ZXAN(config-if-vlan10)#ip address 10.1.1.2 255.255.255.0 ZXAN(config-if-vlan10)#exit
ZXAN(config)#interface vlan 11
ZXAN(config-if-vlan11)#ip address 11.1.1.1 255.255.255.0 ZXAN(config-if-vlan11)#exit
4. Enable the MPLS on the VLAN interfaces.
ZXAN(config)#interface vlan 10 ZXAN(config-if-vlan10)#mpls ip ZXAN(config-if-vlan10)#exit ZXAN(config)#interface vlan 11 ZXAN(config-if-vlan11)#mpls ip ZXAN(config-if-vlan11)#exit
5. Configure the routing protocol.
ZXAN(config)#router ospf 1
ZXAN(config-router)#network 2.2.2.2 0.0.0.0 area 0.0.0.0 ZXAN(config-router)#network 10.1.1.0 0.0.0.255 area 0.0.0.0 ZXAN(config-router)#network 11.1.1.0 0.0.0.255 area 0.0.0.0 ZXAN(config-router)#exit
6. Enable the global MPLS function.
ZXAN(config)#mpls ldp router-id loopback1 ZXAN(config)#mpls ip
7. Configure the static label binding.
ZXAN(config)#mpls static binding ipv4 3.3.3.3 255.255.255.255 inlabel 1040001 //static LSP from C300-1 to C300-3
ZXAN(config)#mpls static binding ipv4 3.3.3.3 255.255.255.255 outlabel 11.1.1.2 1040002 //static LSP from C300-1 to C300-3
8. Save the configuration data.
l Configuration on C300-3.
1. Configure the loopback interface.
ZXAN(config)#interface loopback1
ZXAN(config-loopback1)#ip address 3.3.3.3 255.255.255.255 ZXAN(config-loopback1)#exit
2. Configure the VLAN of the uplink interfaces.
ZXAN(config)#interface gei_1/21/1 ZXAN(config-if)#switchport vlan 12 tag ZXAN(config-if)#exit
ZXAN(config)#interface gei_1/21/2 ZXAN(config-if)#switchport vlan 11 tag ZXAN(config-if)#exit
3. Configure the IP address of the VLAN interfaces.
ZXAN(config)#interface vlan 11
ZXAN(config-if-vlan11)#ip address 11.1.1.2 255.255.255.0 ZXAN(config-if-vlan11)#exit
ZXAN(config)#interface vlan 12
ZXAN(config-if-vlan12)#ip address 12.1.1.1 255.255.255.0 ZXAN(config-if-vlan12)#exit
4. Enable the MPLS on the VLAN interfaces.
ZXAN(config)#interface vlan 11 ZXAN(config-if-vlan11)#mpls ip ZXAN(config-if-vlan11)#exit ZXAN(config)#interface vlan 12 ZXAN(config-if-vlan12)#mpls ip ZXAN(config-if-vlan12)#exit
5. Configure the routing protocol.
ZXAN(config)#router ospf 1
ZXAN(config-router)#network 3.3.3.3 0.0.0.0 area 0.0.0.0 ZXAN(config-router)#network 11.1.1.0 0.0.0.255 area 0.0.0.0 ZXAN(config-router)#network 12.1.1.0 0.0.0.255 area 0.0.0.0 ZXAN(config-router)#exit
6. Enable the global MPLS function.
ZXAN(config)#mpls ldp router-id loopback1 ZXAN(config)#mpls ip
7. Configure the static label binding.
ZXAN(config)#mpls static binding ipv4 3.3.3.3 255.255.255.255 inlabel 1040002 //static LSP from C300-1 to C300-3
ZXAN(config)#mpls static binding ipv4 1.1.1.1 255.255.255.255 outlabel 12.1.1.2 1041005 //static LSP from C300-3 to C300-1
8. Save the configuration data.
l Configuration on C300-4.
1. Configure the loopback interface.
ZXAN(config)#interface loopback1
ZXAN(config-loopback1)#ip address 4.4.4.4 255.255.255.255 ZXAN(config-loopback1)#exit
2. Configure the VLAN of the uplink interfaces.
ZXAN(config)#interface gei_1/21/1 ZXAN(config-if)#switchport vlan 13 tag ZXAN(config-if)#exit
ZXAN(config)#interface gei_1/21/2 ZXAN(config-if)#switchport vlan 12 tag ZXAN(config-if)#exit
3. Configure the IP address of the VLAN interfaces.
ZXAN(config)#interface vlan 12
ZXAN(config-if-vlan12)#ip address 12.1.1.2 255.255.255.0 ZXAN(config-if-vlan12)#exit
ZXAN(config)#interface vlan 13
ZXAN(config-if-vlan13)#ip address 13.1.1.1 255.255.255.0 ZXAN(config-if-vlan13)#exit
4. Enable the MPLS on the VLAN interfaces.
ZXAN(config)#interface vlan 12 ZXAN(config-if-vlan12)#mpls ip ZXAN(config-if-vlan12)#exit ZXAN(config)#interface vlan 13 ZXAN(config-if-vlan13)#mpls ip ZXAN(config-if-vlan13)#exit
5. Configure the routing protocol.
ZXAN(config)#router ospf 1
ZXAN(config-router)#network 4.4.4.4 0.0.0.0 area 0.0.0.0 ZXAN(config-router)#network 12.1.1.0 0.0.0.255 area 0.0.0.0 ZXAN(config-router)#network 13.1.1.0 0.0.0.255 area 0.0.0.0 ZXAN(config-router)#exit
6. Enable the global MPLS function.
ZXAN(config)#mpls ldp router-id loopback1 ZXAN(config)#mpls ip
7. Configure the static label binding.
ZXAN(config)#mpls static binding ipv4 1.1.1.1 255.255.255.255 inlabel 1041005 //static LSP from C300-3 to C300-1
ZXAN(config)#mpls static binding ipv4 1.1.1.1 255.255.255.255 outlabel 13.1.1.2 1041004 //static LSP from C300-3 to C300-1
8. Save the configuration data.
Result
Execute the command ping mpls ipv4 3.3.3.3 32 repeat 1000 on C300-1. The ping is successfully.