#configure terminal | Enter configure mode. |
(config)#interface eth1 | Specify the interface (eth1) to be configured. |
(config-if)#ip address 10.10.10.1/24 | Configure IP address for the interface |
(config-if)#label-switching | Enable label switching on interface eth1. |
(config-if)#exit | Exit interface mode. |
(config)#interface lo | Specify the loopback (lo) interface to be configured. |
(config-if)#ip address 192.168.0.1/32 | Set the IP address of the loopback interface to 192.168.0.1/32 |
#configure terminal | Enter configure mode. |
(config)#router ospf 100 | Configure the routing process and specify the Process ID (100). The Process ID should be a unique positive integer identifying the routing process. |
(config-router)#network 10.10.10.0/24 area 0 (config-router)#network 192.168.0.1/32 area 0 | Define the interface on which OSPF runs and associate the area ID (0) with the interface. |
(config-router)#exit | Exit from router mode |
#configure terminal | Enter configure mode. |
(config)#router ldp | Enter Router mode for LDP. |
(config-router)#router-id 192.168.0.1 | Set the router ID to IP address 192.168.0.1. |
(config-router)#transport-address ipv4 192.168.0.1 | Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface. Note: It is preferable to use the loopback address as transport address. |
(config-router)#exit | Exit router mode. |
(config)#interface eth1 | Enter interface mode. |
(config-if)#enable-ldp ipv4 | Enable LDP on eth1. |
(config-if)#exit | Exit interface mode. |
#configure terminal | Enter configure mode. |
(config)#interface eth1 | Specify the interface (eth1) to be configured. |
(config-if)#ip address 10.10.10.2/24 | Configure IP address for the interface |
(config-if)#label-switching | Enable label switching on interface eth1. |
(config-if)#exit | Exit interface mode. |
(config)#interface eth2 | Specify the interface (eth2) to be configured. |
(config-if)#ip address 10.10.11.1/24 | Configure IP address for the interface |
(config-if)#label-switching | Enable label switching on interface eth1. |
(config-if)#exit | Exit interface mode. |
(config)#interface lo | Specify the loopback (lo) interface to be configured. |
(config-if)#ip address 192.168.0.2/32 | Set the IP address of the loopback interface to 192.168.0.2/32 |
(config-if)#exit | Exit interface mode. |
#configure terminal | Enter configure mode. |
(config)#router ospf 100 | Configure the routing process and specify the Process ID (100). The Process ID should be a unique positive integer identifying the routing process. |
(config-router)#network 10.10.10.0/24 area 0 (config-router)#network 10.10.11.0/24 area 0 (config-router)#network 192.168.0.2/32 area 0 | Define the interface on which OSPF runs and associate the area ID (0) with the interface. |
(config-router)#exit | Exit from router mode |
#configure terminal | Enter configure mode. |
(config)#router ldp | Enter Router mode for LDP. |
(config-router)#router-id 192.168.0.2 | Set the router ID to IP address 192.168.0.2. |
(config-router)#transport-address ipv4 192.168.0.2 | Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface. Note: It is preferable to use the loopback address as transport address. |
(config-router)#exit | Exit router mode. |
(config)#interface eth1 | Enter interface mode. |
(config-if)#enable-ldp ipv4 | Enable LDP on eth1. |
(config-if)#exit | Exit interface mode. |
(config)#interface eth2 | Enter interface mode. |
(config-if)#enable-ldp ipv4 | Enable LDP on eth2. |
(config-if)#exit | Exit interface mode. |
#configure terminal | Enter configure mode. |
(config)#interface eth2 | Specify the interface (eth2) to be configured. |
(config-if)#ip address 10.10.11.2/24 | Configure IP address for the interface |
(config-if)#label-switching | Enable label switching on interface eth1. |
(config-if)#exit | Exit interface mode. |
(config)#interface lo | Specify the loopback (lo) interface to be configured. |
(config-if)#ip address 192.168.0.3/32 | Set the IP address of the loopback interface to 192.168.0.3/32 |
#configure terminal | Enter configure mode. |
(config)#router ospf 100 | Configure the routing process and specify the Process ID (100). The Process ID should be a unique positive integer identifying the routing process. |
(config-router)#network 10.10.11.0/24 area 0 (config-router)#network 192.168.0.3/32 area 0 | Define the interface on which OSPF runs and associate the area ID (0) with the interface. |
(config-router)#exit | Exit from router mode |
#configure terminal | Enter configure mode. |
(config)#router ldp | Enter Router mode for LDP. |
(config-router)#router-id 192.168.0.3 | Set the router ID to IP address 192.168.0.3. |
(config-router)#explicit-null | To disable PHP. |
(config-router)#transport-address ipv4 192.168.0.3 | Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface. Note: It is preferable to use the loopback address as transport address. |
(config-router)#exit | Exit router mode. |
(config)#interface eth2 | Enter interface mode. |
(config-if)#enable-ldp ipv4 | Enable LDP on eth2. |
(config-if)#exit | Exit interface mode. |
#configure terminal | Enter configure mode. |
(config)#qos enable | Enable QOS. |
(config)#qos statistics | Enable QOS statistics. |
(config)#qos map exp 5 class 7 | Map exp value 5 to Class 7. |
#configure terminal | Enter configure mode. |
(config)#qos enable | Enable QOS. |
(config)#qos statistics | Enable QOS statistics. |
(config)#mpls lsp-model uniform | To change the lsp model to Uniform. |
(config)#class-map cmap2 | Enter Class-map mode |
(config-class-qos)#match mpls experimental topmost 5 | Configure match EXP as EXP with Value 5 |
(config-class-qos)#exit | Exit Class-map mode |
(config)#policy-map pmap2 | Enter policy-map mode |
(config-pmap-qos)#class cmap2 | Assign Class cmap1 to Policy-map pmap1 |
(config-pmap-c-qos)#set mpls class 7 | Remark EXP from EXP 2 to class 7 |
(config-pmap-c-qos)#exit | Exit out of policy-class-map mode |
(config-pmap-qos)#exit | Exit out of Policy-map mode |
(config)#interface eth1 | Enter eth1 interface |
(config-if)#service-policy type qos input pmap2 | Assign service-policy to interface on in-direction |
(config-if)#exit | Exit interface mode. |