Allow packets with an MPLS header to be received on the interface towards the MPLS network (in this
example, the interface towards PE2):
PE1(config)# mpls
PE1(config-mpls)# forwarding interface gigabitethernet 1/0/1
Configure the LDP protocol and enable neighbor detection on the interface towards PE2:
PE1(config-mpls)# ldp
PE1(config-ldp)# router-id 1.1.1.1
PE1(config-ldp)# address-family ipv4
PE1(config-ldp-af-ipv4)# interface gigabitethernet 1/0/1
PE1(config-ldp-af-ipv4-if)# exit
PE1(config-ldp-af-ipv4)# transport-address 1.1.1.1
PE1(config-ldp-af-ipv4)# exit
PE1(config-ldp)# enable
PE1(config-ldp)# exit
Create a pw-class on the basis of which the virtual channels (pw) will be created later. Since, in this example,
the default parameters will be applied to pw, it will be sufficient to specify the class name:
PE1(config-mpls)# l2vpn
PE1(config-l2vpn)# pw-class for_vpls1
PE1(config-l2vpn-pw-class)# exit
Create a new l2vpn of vpls type and add pw to routers PE2 and PE3, take the pw identifier as VID for
convenience (in this case = 100):
PE1(config-l2vpn)# vpls vpls1
PE1(config-l2vpn-vpls)# bridge-group 10
PE1(config-l2vpn-vpls)# pw 100 2.2.2.2
PE1(config-l2vpn-pw)# pw-class for_vpls1
PE1(config-l2vpn-pw)# enable
PE1(config-l2vpn-pw)# exit
PE1(config-l2vpn-vpls)# pw 100 3.3.3.3
PE1(config-l2vpn-pw)# pw-class for_vpls1
PE1(config-l2vpn-pw)# enable
PE1(config-l2vpn-pw)# exit
PE1(config-l2vpn-vpls)# enable
PE1(config-l2vpn-vpls)# end
Apply the created configuration: