Ok, now it is time for some L2VPN. Here we will use the same diagram as before, but instead of providing MPLS VPN between CE1 and CE2, we are going to create a L2VPN so that CE1 and CE2 think that they are directly connected to each other. This lab builds off the previous post, so the routers where already configured.
First up, CE1
CE1(config-if)#int f0/0
CE1(config-if)#ip add 10.1.34.3 255.255.255.0
CE1(config-if)#int l0
CE1(config-if)#ip add 10.1.3.3 255.255.255.255
CE1(config-if)#router ospf 1
CE1(config-router)#net 10.0.0.0 0.255.255.255 a 0
CE1(config-router)#
Now CE2
CE2(config-if)#ip add 10.1.34.4 255.255.255.0
CE2(config-if)#int l0
CE2(config-if)#ip add 10.4.4.4 255.255.255.255
CE2(config-if)#router ospf 1
CE2(config-router)#net 10.0.0.0 0.255.255.255 a 0
CE2(config-router)#
Ok, now time for the PE routers.
PE1:
First, lets reset the interface to all its defaults:
RP/0/RSP0/CPU0:PE1(config)#default interface g0/1/0/19
RP/0/RSP0/CPU0:PE1(config)#commit
Now PE2:
RP/0/RSP0/CPU0:PE2(config)#default interface g0/1/0/19
RP/0/RSP0/CPU0:PE2(config)#commit
Now, lets kill our OSPF sessions. On both routers:
PE1:
RP/0/RSP0/CPU0:PE1(config)#no router ospf 100
RP/0/RSP0/CPU0:PE1(config)#commit
PE2:
RP/0/RSP0/CPU0:PE2(config)#no router ospf 100
RP/0/RSP0/CPU0:PE2(config)#commit
OK, now we can build out L2VPN cross-connects.
Fist up, we need to get to the L2VPN configuration
RP/0/RSP0/CPU0:PE1(config)#l2vpn
Now to configure our X-Connect group
RP/0/RSP0/CPU0:PE1(config-l2vpn)#xconnect group R3R4
And our Point-to-Point settings
RP/0/RSP0/CPU0:PE1(config-l2vpn-xc)#p2p R3_to_R4
Place the interface in the P2P group R3_to_R4
RP/0/RSP0/CPU0:PE1(config-l2vpn-xc-p2p)#interface g0/1/0/19
Specify our Neighbor for this with a pseudowire ID (think of it as a circuit ID) and then commit our changes
RP/0/RSP0/CPU0:PE1(config-l2vpn-xc-p2p)#neighbor 150.2.2.2 pw-id 304
RP/0/RSP0/CPU0:PE1(config-l2vpn-xc-p2p-pw)#comm
Now, this is unique to our CE devices, we need to specify the speed in order to get the interfaces up as the CE routers here do not support Gigabit Ethernet
RP/0/RSP0/CPU0:PE2(config-if)#int g0/1/0/19
RP/0/RSP0/CPU0:PE2(config-if)#spee 100
RP/0/RSP0/CPU0:PE2(config-if)#comm
Now for PE2:
RP/0/RSP0/CPU0:PE2(config)#l2vpn
RP/0/RSP0/CPU0:PE2(config-l2vpn)#xconnect group R3R4
RP/0/RSP0/CPU0:PE2(config-l2vpn-xc)#p2p R3_to_R4
RP/0/RSP0/CPU0:PE2(config-l2vpn-xc-p2p)#interface g0/1/0/19
The Pseudo-wire ID must match.
RP/0/RSP0/CPU0:PE2(config-l2vpn-xc-p2p)#neighbor 150.1.1.1 pw-id 304
RP/0/RSP0/CPU0:PE2(config-l2vpn-xc-p2p-pw)#comm
RP/0/RSP0/CPU0:PE2(config-if)#int g0/1/0/19
RP/0/RSP0/CPU0:PE2(config-if)#spee 100
RP/0/RSP0/CPU0:PE2(config-if)#comm
Now we can look at our L2VPN Cross-connects RP/0/RSP0/CPU0:PE1#sh l2vpn xconnect Tue Apr 24 03:40:36.619 UTC Legend: ST = State, UP = Up, DN = Down, AD = Admin Down, UR = Unresolved, SB = Standby, SR = Standby Ready
XConnect Segment 1 Segment 2 Group Name ST Description ST Description ST --------------------- ------------------ ------------------------- R3R4 R3_to_R4 UP Gi0/1/0/19 UP 150.2.2.2 304 UP ---------------------------------------------------------------------- RP/0/RSP0/CPU0:PE1#
There you go, that looks good. Now, can we PING between CE1 and CE2?
CE1#p 10.1.34.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.34.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
Yup, PING works. Hmm, wonder what CDP looks like? CE1#sh cdp nei Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID CE2 Fas 0/0 160 R S I 2811 Fas 0/0 CE1#
Now if we look at OSPF:
CE1#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface 10.4.4.4 1 FULL/DR 00:00:33 10.1.34.4 FastEthernet0/0
All neighbored up! That means we should be able to PING between loopback interfaces:
CE1#p 10.4.4.4 so l0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 10.1.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
CE1#
Leandro Freitas said:
Great article!Just one correction: in the image, the lo IP address and mask of CE1 is 10.3.3.3/24, but in the configuration you have used 10.1.3.3/32. Thanks!
jjfry18018 said:
Guess that is what happens when you work it out first and then do the image 🙂 Some typing habits are hard to break. Thanks for pointing that out – will update it later.
Leandro Freitas said:
Great article!Just one correction: in the image, the lo IP address and mask of CE1 is 10.3.3.3/24, but in the configuration you have used 10.1.3.3/32. Thanks!
jjfry18018 said:
Guess that is what happens when you work it out first and then do the image 🙂 Some typing habits are hard to break. Thanks for pointing that out – will update it.
RepotSirc said:
Hi, Will you help me with my pseudo-wire config, please.
I believe I got it configured correctly however I can not ping from CE to the other CE.
-======-
l2vpn
xconnect group ETH_2_ETH
p2p CUSTOMER1
interface GigabitEthernet0/0/0/0
neighbor ipv4 2.2.2.2 pw-id 100
RP/0/0/CPU0:XR_PE1#sho l2vpn xconnect
Tue Jun 23 10:39:07.040 UTC
Legend: ST = State, UP = Up, DN = Down, AD = Admin Down, UR = Unresolved,
SB = Standby, SR = Standby Ready, (PP) = Partially Programmed
XConnect Segment 1 Segment 2
Group Name ST Description ST Description ST
———————— —————————– —————————–
ETH_2_ETH CUSTOMER1 UP Gi0/0/0/0 UP 2.2.2.2 100 UP
—————————————————————————————-
RP/0/0/CPU0:XR_PE1# sho mpls ldp neighbor
Peer LDP Identifier: 2.2.2.2:0
TCP connection: 2.2.2.2:59737 – 1.1.1.1:646
Graceful Restart: No
Session Holdtime: 180 sec
State: Oper; Msgs sent/rcvd: 33/30; Downstream-Unsolicited
Up time: 00:17:01
LDP Discovery Sources:
IPv4: (1)
Targeted Hello (1.1.1.1 -> 2.2.2.2, active)
IPv6: (0)
Addresses bound to this peer:
IPv4: (2)
2.2.2.2 10.2.3.2
IPv6: (0)
-======-
l2vpn
xconnect group ETH_2_ETH
p2p CUSTOMER1
interface GigabitEthernet0/0/0/0
neighbor ipv4 1.1.1.1 pw-id 100
RP/0/0/CPU0:XR_PE2#sho l2vpn xconnect
Tue Jun 23 10:41:03.562 UTC
Legend: ST = State, UP = Up, DN = Down, AD = Admin Down, UR = Unresolved,
SB = Standby, SR = Standby Ready, (PP) = Partially Programmed
XConnect Segment 1 Segment 2
Group Name ST Description ST Description ST
———————— —————————– —————————–
ETH_2_ETH CUSTOMER1 UP Gi0/0/0/0 UP 1.1.1.1 100 UP
—————————————————————————————-
RP/0/0/CPU0:XR_PE2#sho mpls ldp neighbor
Peer LDP Identifier: 1.1.1.1:0
TCP connection: 1.1.1.1:646 – 2.2.2.2:59737
Graceful Restart: No
Session Holdtime: 180 sec
State: Oper; Msgs sent/rcvd: 28/30; Downstream-Unsolicited
Up time: 00:14:49
LDP Discovery Sources:
IPv4: (1)
Targeted Hello (2.2.2.2 -> 1.1.1.1, active)
IPv6: (0)
Addresses bound to this peer:
IPv4: (2)
1.1.1.1 10.1.3.1
IPv6: (0)