#configure terminal | Enter configure mode. |
(config)#interface lo | Specify the loopback interface (lo0) to be configured. |
(config-if)#ip address 1.1.1.1/32 secondary | Set the IP address of the loopback interface to 1.1.1.1/32. |
(config-if)#exit | Exit interface mode. |
(config)#interface eth1 | Specify the interface (eth1) to be configured. |
(config-if)#ip address 10.1.1.1/24 | Set the IP address of the interface to 10.1.1.1/24. |
(config-if)#exit | Exit interface 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.1.1.0/24 area 0 (config-router)#network 1.1.1.1/32 area 0 | Define the interface on which OSPF runs and associate the area ID (0) with the interface. |
#configure terminal | Enter configure mode. |
(config)#interface lo | Specify the loopback interface (lo0) to be configured. |
(config-if)#ip address 9.9.9.9/32 secondary | Set the IP address of the loopback interface to 9.9.9.9/32. |
(config-if)#exit | Exit interface mode. |
(config)#interface eth1 | Specify the interface (eth1) to be configured. |
(config-if)#ip address 10.1.1.2/24 | Set the IP address of the interface to 10.1.1.2/24. |
(config-if)#exit | Exit interface mode. |
(config)#interface eth2 | Specify the interface (eth2) to be configured. |
(config-if)#ip address 20.1.1.1/24 | Set the IP address of the interface to 20.1.1.1/24. |
(config-if)#exit | Exit interface 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.1.1.0/24 area 0 (config-router)#network 20.1.1.0/24 area 0 (config-router)#network 9.9.9.9/32 area 0 | Define the interface on which OSPF runs and associate the area ID (0) with the interface. |
#configure terminal | Enter configure mode. |
(config)#interface lo | Specify the loopback interface (lo0) to be configured. |
(config-if)#ip address 2.2.2.2/32 secondary | Set the IP address of the loopback interface to 2.2.2.2/32. |
(config-if)#exit | Exit interface mode. |
(config)#interface eth1 | Specify the interface (eth1) to be configured. |
(config-if)#ip address 20.1.1.2/24 | Set the IP address of the interface to 20.1.1.2/24. |
(config-if)#exit | Exit interface 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 20.1.1.0/24 area 0 (config-router)#network 2.2.2.2/32 area 0 | Define the interface on which OSPF runs, and associate the area ID (0) with the interface. |
#configure terminal | Enter configure mode. |
(config)#router ldp | Enter the Router mode. |
(config-router)#transport-address ipv4 1.1.1.1 | Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface. |
(config-router)#targeted-peer ipv4 2.2.2.2 | Specify the targeted LDP peer on PE-1. |
(config-router-targeted-peer)# exit | Exit the Router targeted peer mode. |
(config-router)#exit | Exit the Router mode. |
(config)#interface eth1 | Specify the interface (eth1) to be configured. |
(config-if)#label-switching | Enable label switching on interface eth1. |
(config-if)#enable-ldp ipv4 | Enable LDP on interface eth1. |
#configure terminal | Enter configure mode. |
(config)#router ldp | Enter the Router mode. |
(config-router)#transport-address ipv4 9.9.9.9 | Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface. |
(config-router)#exit | Exit the Router mode. |
(config)#interface eth1 | Specify the interface (eth1) to be configured. |
(config-if)#label-switching | Enable label switching on interface eth2. |
(config-if)#enable-ldp ipv4 | Enable LDP on interface eth2. |
(config-if)#exit | Exit interface mode. |
(config)#interface eth2 | Specify the interface (eth2) to be configured. |
(config-if)#label-switching | Enable label switching on interface eth2. |
(config-if)#enable-ldp ipv4 | Enable LDP on interface eth2. |
#configure terminal | Enter configure mode. |
(config)#router ldp | Enter the Router mode. |
(config-router)#transport-address ipv4 2.2.2.2 | Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface. |
(config-router)#targeted-peer ipv4 1.1.1.1 | Specify the targeted LDP peer on PE-2. |
(config-router-targeted-peer)# exit | Exit the Router targeted peer mode. |
(config-router)#exit | Exit the Router mode. |
(config)#interface eth1 | Specify the interface(eth1) to be configured. |
(config-if)#label-switching | Enable label switching on interface eth1. |
(config-if)#enable-ldp ipv4 | Enable LDP on interface eth1. |
#configure terminal | Enter configure mode. |
(config)#mpls l2-circuit t1 100 2.2.2.2 | Configure the VC for PE-2. In this example, t1 is the VC name, 100 is the VC ID, and 2.2.2.2 is the VC endpoint IP address. |
#configure terminal | Enter configure mode. |
(config)#mpls l2-circuit t1 100 1.1.1.1 | Configure the VC for PE-1. In this example, t1 is the VC name, 100 is the VC ID, and 1.1.1.1 is the VC endpoint IP address. |
#configure terminal | Enter configure mode. |
(config)#service-template SUT1 | Create a service template SUT1 |
(config-svc)#match untagged | Allow untagged traffic. |
(config-svc)#exit | Exit the service template mode |
(config)#interface eth3 | Specify the interface (eth3) to be configured. |
(config-if)#switchport | Switch to Layer-2 mode. |
(config-if)#mpls-l2-circuit t1 service-template SUT1 | Bind the interface to the VC with service template. |
#configure terminal | Enter configure mode. |
(config)#service-template SUT1 | Create a service template SUT1 |
(config-svc)#match untagged | Allow untagged traffic. |
(config-svc)#exit | Exit the service template mode |
(config)#interface eth3 | Specify the interface (eth3) to be configured. |
(config-if)#switchport | Switch to Layer-2 mode. |
(config-if)#mpls-l2-circuit t1 service-template SUT1 | Bind the interface to the VC with service template. |
#configure terminal | Enter configure mode. |
(config)#mpls l2-circuit t2 200 2.2.2.2 | Configure the VC for PE-2. In this example, t2 is the VC name, 200 is the VC ID, and 2.2.2.2 is the VC endpoint IP address. |
(config-pseudowire)#exit | Exit pseudowire config mode. |
(config)#service-template ST1 | Create a service template ST1 |
(config-svc)#match outer-vlan 2 | Allow VLAN 2 traffic on this VC. |
(config-svc)#match outer-vlan 3 | Allow VLAN 3 traffic on this VC. |
(config-svc)#exit | Exit the service template mode |
(config)#interface eth2 | Specify the interface (eth2) to be configured. |
(config-if)#switchport | Switch to Layer-2 mode. |
(config-if)#mpls-l2-circuit t2 service-template ST1 | Bind the interface to the VC with service template. |
#configure terminal | Enter configure mode. |
(config)#mpls l2-circuit t2 200 1.1.1.1 | Configure the VC for PE-2. In this example, t2 is the VC name, 200 is the VC ID, and 1.1.1.1 is the VC endpoint IP address. |
(config-pseudowire)#exit | Exit pseudowire config mode. |
(config)#service-template ST1 | Create a service template ST1 |
(config-svc)#match outer-vlan 2 | Allow VLAN 2 traffic on this VC. |
(config-svc)#match outer-vlan 3 | Allow VLAN 3 traffic on this VC. |
(config-svc)#exit | Exit the service template mode |
(config)#interface eth2 | Specify the interface (eth2) to be configured. |
(config-if)#switchport | Switch to Layer-2 mode. |
(config-if)#mpls-l2-circuit t2 service-template ST1 | Bind the interface to the VC with service template. |
#configure terminal | Enter configure mode. |
PE1(config)#mpls l2-circuit t3 300 2.2.2.2 manual | Configure the VC ID with the manual option (no signaling used). |
PE1(config-pseudowire)#exit | Exit pseudowire config mode. |
PE1(config)#service-template ST3 | Create a service template ST3 |
PE1(config-svc)#exit | Exit the service template mode |
PE1(config)#interface eth2 | Add an FTN entry; where 1000 is the incoming label, 2000 is the outgoing label, 2.2.2.2 is the endpoint, eth1 is the incoming interface name, and eth2 is outgoing interface name. |
PE1(config-if)#mpls-l2-circuit t2 service-template ST3 | Bind the interface to the VC with service template. |
PE1(config-if)#exit | Exit interface mode |
PE1(config)#mpls l2-circuit-fib-entry 300 1000 2000 2.2.2.2 eth1 eth2 | Configure the VC ID with the manual option (no signaling used). |
#configure terminal | Enter configure mode. |
PE2(config)#mpls l2-circuit t3 300 1.1.1.1 manual | Configure the VC ID with the manual option (no signaling used). |
PE1(config-pseudowire)#exit | Exit pseudowire config mode. |
PE1(config)#service-template ST3 | Create a service template ST3 |
(config-svc)#exit | Exit the service template mode |
PE2(config)#interface eth2 | Add an FTN entry; where 2000 is the incoming label, 1000 is the outgoing label, 1.1.1.1 is the endpoint, eth1 is the incoming interface name, and eth 2 is outgoing interface name. |
PE2(config-if)#mpls-l2-circuit t2 service-template ST3 | Bind the interface to the VC with service template. |
PE2(config-if)#exit | Exit interface mode. |
PE2(config)#mpls l2-circuit-fib-entry 300 2000 1000 1.1.1.1 eth1 eth2 | Configure the VC ID with the manual option (no signaling used). |
PE2(config)#end | Exit configure mode |
#configure terminal | Enter configure mode. |
(config)#mpls l2-circuit vc1 10 2.2.2.2 | Configure the VC |
(config-pseudowire)#service-tpid dot1.ad | Configure Service-TPID as dot1.ad (0x88a8) |
(config-pseudowire)#exit | Exit pseudowire config mode. |
(config)# service-template template1 | Configure the service template. |
(config-svc)# match double-tag outer-vlan 204 inner-vlan 203 | Matching criteria for service template. |
(config-svc)#rewrite ingress pop outgoing-tpid dot1.ad | Action performed for service template. |
(config-svc)#exit | Exit configure SVC mode |
(config)#interface eth2 | Specify the interface (eth2) to be configured. |
(config-if)#switchport | Switch to Layer-2 mode. |
(config-if)# switchport dot1q ethertype 0x88a8 | Configure interface ethertype as dot1.ad (0x88a8) |
(config-if)#mpls-l2-circuit vc1 service-template template1 | Bind the interface to the VC with service template. |
(config-if)#exit | End of Interface and configurations mode. |
(config)#mpls l2-circuit vc1 10 1.1.1.1 | Configure the VC. |
(config-pseudowire)#service-tpid dot1.ad | Configure Service-TPID as dot1.ad (0x88a8) |
(config-pseudowire)#exit | Exit pseudowire config mode. |
(config)# service-template template1 | Configure the service template. |
(config-svc)# match double-tag outer-vlan 204 inner-vlan 203 | Matching criteria for service template. |
(config-svc)# rewrite ingress pop outgoing-tpid dot1.ad | Action performed for service template. |
(config-svc)#exit | Exit configure SVC mode |
(config)#interface eth2 | Specify the interface (eth2) to be configured. |
(config-if)#switchport | Switch to Layer-2 mode. |
(config-if)#switchport dot1q ethertype 0x88a8 | Configure interface ethertype as dot1.ad (0x88a8) |
(config-if)#mpls-l2-circuit vc1 service-template template1 | Bind the interface to the VC with service template. |
(config-if)#exit | End of interface and configurations mode. |
#configure terminal | Enter configure mode. |
(config)#mpls l2-circuit t4 400 2.2.2.2 | Configure the VC for PE-1. In this example, t4 is the VC name, 400 is the VC ID, and 2.2.2.2 is the VC endpoint IP address. |
(config-pseudowire)#exit | Exit pseudowire config mode. |
(config)#service-template template4 | Template configuration |
(config-svc)# match outer-vlan 700 | Allow VLAN 700 traffic on this VC |
(config-svc)# match double-tag outer-vlan 1200 inner-vlan 3200 | Allow double tag match with s+c tags |
(config-svc)# match untagged | Allow untagged traffic |
(config-svc)# rewrite ingress push 300 | Push Action performed for service template |
(config)#interface eth2 | Specify the interface (eth2) to be configured. |
(config-if)#switchport | Switch to Layer-2 mode. |
(config-if)#mpls-l2-circuit t4 service-template template4 | Bind the interface to the VC with service template. |
#configure terminal | Enter configure mode. |
(config)#mpls l2-circuit t4 400 1.1.1.1 | Configure the VC for PE-2. In this example, t4 is the VC name, 400 is the VC ID, and 1.1.1.1 is the VC endpoint IP address. |
(config-pseudowire)#exit | Exit pseudowire config mode. |
(config)#service-template template4 | Template configuration |
(config-svc)# match outer-vlan 700 | Allow VLAN 700 traffic on this VC |
(config-svc)# match double-tag outer-vlan 1200 inner-vlan 3200 | Allow double tag match with s+c tags |
(config-svc)# match untagged | Allow untagged traffic |
(config-svc)# rewrite ingress push 300 | Push Action performed for service template |
(config)#interface eth2 | Specify the interface (eth2) to be configured. |
(config-if)#switchport | Switch to Layer-2 mode. |
(config-if)#mpls-l2-circuit t4 service-template template4 | Bind the interface to the VC with service template. |