Friday, December 14, 2012

MPLS L2VPN With AToM - Eth to Eth


Issue

In this example we will examine L2VPN with AToM
Our CEs in this example are R1 and R5
Our PEs are R2 and R4, and R3 is the P

We will run OSPF as the IGP inside the MPLS backbone and we will configure OSPF also as the routing protocol running between the CEs

Configuration

R1

R1#sh run int f1/0
interface FastEthernet1/0
 ip address 192.1.15.1 255.255.255.0
 speed 100
 duplex full

R1#sh run int lo0
interface Loopback0
 ip address 1.1.1.1 255.255.255.255

R1#sh run | sec router ospf
router ospf 1
 router-id 1.1.1.1
 network 1.1.1.1 0.0.0.0 area 0
 network 192.1.15.1 0.0.0.0 area 0

R2

mpls label protocol ldp
mpls ldp router-id Loopback0 force

R2#sh run int f1/0
interface FastEthernet1/0
 no ip address
 speed 100
 duplex full
 no keepalive
 xconnect 4.4.4.4 15 encapsulation mpls pw-class MSSK
end

R2#sh run int f1/1
Building configuration...

Current configuration : 103 bytes
!
interface FastEthernet1/1
 ip address 192.1.23.2 255.255.255.0
 speed 100
 duplex full
 mpls ip
end

R2#sh run int lo0
Building configuration...

Current configuration : 63 bytes
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
end

R2#sh run | sec router ospf
router ospf 1
 router-id 2.2.2.2
 network 2.2.2.2 0.0.0.0 area 0
 network 192.1.23.2 0.0.0.0 area 0

R3

mpls label protocol ldp
mpls ldp router-id Loopback0 force

R3#sh run int f1/0
Building configuration...

Current configuration : 103 bytes
!
interface FastEthernet1/0
 ip address 192.1.23.3 255.255.255.0
 speed 100
 duplex full
 mpls ip
end

R3#sh run int f1/1
Building configuration...

Current configuration : 103 bytes
!
interface FastEthernet1/1
 ip address 192.1.34.3 255.255.255.0
 speed 100
 duplex full
 mpls ip
end

R3#sh run int lo0
Building configuration...

Current configuration : 63 bytes
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
end

R3#sh run | sec router ospf
router ospf 1
 router-id 3.3.3.3
 network 3.3.3.3 0.0.0.0 area 0
 network 192.1.23.3 0.0.0.0 area 0
 network 192.1.34.3 0.0.0.0 area 0

R4

mpls label protocol ldp
mpls ldp router-id Loopback0 force

R4#sh run int f1/0
interface FastEthernet1/0
 ip address 192.1.34.4 255.255.255.0
 speed 100
 duplex full
 mpls ip

R4#sh run int f1/1
interface FastEthernet1/1
 no ip address
 speed 100
 duplex full
 no keepalive
 xconnect 2.2.2.2 15 encapsulation mpls pw-class MSSK

R4#sh run int lo0
Building configuration...

Current configuration : 63 bytes
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255

R4#sh run | sec router ospf
router ospf 1
 router-id 4.4.4.4
 network 4.4.4.4 0.0.0.0 area 0
 network 192.1.34.4 0.0.0.0 area 0

R5

R5#sh run int f1/0
interface FastEthernet1/0
 ip address 192.1.15.5 255.255.255.0
 speed 100
 duplex full

R5#sh run int lo0
interface Loopback0
 ip address 5.5.5.5 255.255.255.255

R5#sh run | sec router ospf
router ospf 1
 router-id 5.5.5.5
 network 5.5.5.5 0.0.0.0 area 0
 network 192.1.15.5 0.0.0.0 area 0


           

Verification

We will start our verification from the PE routers

R2#sh mpls ldp neighbor 4.4.4.4
    Peer LDP Ident: 4.4.4.4:0; Local LDP Ident 2.2.2.2:0
        TCP connection: 4.4.4.4.50601 - 2.2.2.2.646
        State: Oper; Msgs sent/rcvd: 2105/2103; Downstream
        Up time: 1d06h
        LDP discovery sources:
          Targeted Hello 2.2.2.2 -> 4.4.4.4, active, passive
        Addresses bound to peer LDP Ident:
          192.1.34.4      4.4.4.4 

R2#sh mpls l2transport summary
Destination address: 4.4.4.4, total number of vc: 1
  0 unknown, 1 up, 0 down, 0 admin down, 0 recovering, 0 standby, 0 hotstandby
  1 active vc on MPLS interface Fa1/1

R4#sh mpls l2transport summary
Destination address: 2.2.2.2, total number of vc: 1
  0 unknown, 1 up, 0 down, 0 admin down, 0 recovering, 0 standby, 0 hotstandby
  1 active vc on MPLS interface Fa1/0

As we can see the status is up, the pseudowire adjacency will be formed once the xconnect is configured on the attachment circuit, i.e. the link facing the CE

Now, R1 and R5 are as they were directly connected, let us check reachability

R1#ping 192.1.15.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.1.15.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/18/28 ms

Now, OSPF adjacency between R1 and R5 should be established
R1#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
5.5.5.5           1   FULL/DR         00:00:35    192.1.15.5      FastEthernet1/0

R1#sh ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      5.0.0.0/32 is subnetted, 1 subnets
O        5.5.5.5 [110/2] via 192.1.15.5, 1d01h, FastEthernet1/0

R1#ping 5.5.5.5 source 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/16/16 ms

R1#sh ip ospf database

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1724        0x80000030 0x00ED51 2
5.5.5.5         5.5.5.5         2019        0x80000030 0x00AD5D 2

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
192.1.15.5      5.5.5.5         2019        0x8000002E 0x00DD2D

If we wanted to check the data plane

R3#debug mpls packet
R1#ping 5.5.5.5 sou lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/16/20 ms
*Dec 14 22:20:15.692: MPLS turbo: Fa1/0: rx: Len 391 Stack {17 0 255} {19 0 255} CW {f:0 l:0 s:0}
*Dec 14 22:20:15.692: MPLS turbo: Fa1/1: tx: Len 387 Stack {19 0 254} CW {f:0 l:0 s:0}
*Dec 14 22:20:16.952: MPLS turbo: Fa1/1: rx: Len 80 Stack {16 6 255} - ipv4 data s:4.4.4.4 d:2.2.2.2 ttl:255 tos:C0 prot:11
*Dec 14 22:20:17.280: MPLS turbo: Fa1/0: rx: Len 86 Stack {17 0 255} {19 0 255} CW {f:0 l:0 s:0}
*Dec 14 22:20:17.280: MPLS turbo: Fa1/1: tx: Len 82 Stack {19 0 254} CW {f:0 l:0 s:0}
*Dec 14 22:20:17.472: MPLS turbo: Fa1/0: rx: Len 80 Stack {17 6 255} - ipv4 data s:2.2.2.2 d:4.4.4.4 ttl:255 tos:C0 prot:11
*Dec 14 22:20:18.432: MPLS turbo: Fa1/1: rx: Len 86 Stack {16 0 255} {19 0 255} CW {f:0 l:0 s:0}
*Dec 14 22:20:18.432: MPLS turbo: Fa1/0: tx: Len 82 Stack {19 0 254} CW {f:0 l:0 s:0}
*Dec 14 22:20:20.340: MPLS turbo: Fa1/0: rx: Len 120 Stack {17 0 255} {19 0 255} CW {f:0 l:0 s:0}
*Dec 14 22:20:20.340: MPLS turbo: Fa1/1: tx: Len 116 Stack {19 0 254} CW {f:0 l:0 s:0}
*Dec 14 22:20:23.628: MPLS turbo: Fa1/1: rx: Len 120 Stack {16 0 255} {19 0 255} CW {f:0 l:0 s:0}
*Dec 14 22:20:23.628: MPLS turbo: Fa1/0: tx: Len 116 Stack {19 0 254} CW {f:0 l:0 s:0}
*Dec 14 22:20:24.332: MPLS turbo: Fa1/0: rx: Len 140 Stack {17 0 255} {19 0 255} CW {f:0 l:0 s:0}

R3#sh mpls forwarding-table
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
16         Pop Label  2.2.2.2/32       4318680       Fa1/0      192.1.23.2 
17         Pop Label  4.4.4.4/32       4314590       Fa1/1      192.1.34.4 

The 16 and 17 label values can be seen from the debug output above as well as the 19 value which can be demonstrated more in the output below

R2#sh mpls l2transport vc detail
Local interface: Fa1/0 up, line protocol up, Ethernet up
  Destination address: 4.4.4.4, VC ID: 15, VC status: up
    Output interface: Fa1/1, imposed label stack {17 19}
    Preferred path: not configured 
    Default path: active
    Next hop: 192.1.23.3
  Create time: 1d06h, last status change time: 1d06h
    Last label FSM state change time: 1d06h
  Signaling protocol: LDP, peer 4.4.4.4:0 up
    Targeted Hello: 2.2.2.2(LDP Id) -> 4.4.4.4, LDP is UP
    Status TLV support (local/remote)   : enabled/supported
      LDP route watch                   : enabled
      Label/status state machine        : established, LruRru
      Last local dataplane   status rcvd: No fault
      Last BFD dataplane     status rcvd: Not sent
      Last BFD peer monitor  status rcvd: No fault
      Last local AC  circuit status rcvd: No fault
      Last local AC  circuit status sent: No fault
      Last local PW i/f circ status rcvd: No fault
      Last local LDP TLV     status sent: No fault
      Last remote LDP TLV    status rcvd: No fault
      Last remote LDP ADJ    status rcvd: No fault
    MPLS VC labels: local 19, remote 19
         
R2#sh mpls forwarding-table
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
16         Pop Label  3.3.3.3/32       0             Fa1/1      192.1.23.3 
17         Pop Label  192.1.34.0/24    0             Fa1/1      192.1.23.3 
18         17         4.4.4.4/32       0             Fa1/1      192.1.23.3 
19         No Label   l2ckt(1)         2538066       Fa1/0      point2point

Note the l2ckt keyword in the output above has a label value of 19, and the show mpls l2transport vc detail the remote and local label value is 19


No comments: