Wednesday, June 19, 2013

Frame-relay L2TPv3




Issue

In this example we will configure L2TPv3 between our PEs (R2, R3) in order to achieve IPv4 and IPv6 connectivity between our CEs (R1, R4)
Routing protocol is use between the CEs is RIP version 2

Configuration

R1

R1#sh run int lo0
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
 ipv6 address 2001::1/128
 ipv6 rip RIPng enable

R1#sh run int s1/0
interface Serial1/0
 ip address 192.1.14.1 255.255.255.0
 encapsulation frame-relay
 ipv6 address 2001:192:14::1/64
 ipv6 rip RIPng enable
 serial restart-delay 0
 frame-relay map ipv6 2001:192:14::4 101 broadcast
 frame-relay map ipv6 FE80::C804:13FF:FEA2:0 101 broadcast
 frame-relay map ip 192.1.14.4 101 broadcast
 frame-relay lmi-type ansi

R1#sh run | sec router rip
router rip
 version 2
 network 1.0.0.0
 network 192.1.14.0
 no auto-summary
ipv6 router rip RIPng

R2

R2#sh run int lo0
interface Loopback0
 ip address 2.2.2.2 255.255.255.255

R2#sh run int f2/0
interface FastEthernet2/0
 ip address 192.1.23.2 255.255.255.0
 speed 100
 duplex full

R2#sh run int s1/0
interface Serial1/0
 no ip address
 encapsulation frame-relay

R2#sh run | sec pse
pseudowire-class MSSK
 encapsulation l2tpv3
 ip local interface Loopback0

R2#sh run | sec connect
connect FR Serial1/0 202 l2transport
 xconnect 3.3.3.3 14 pw-class MSSK

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

R3

R3#sh run int lo0
interface Loopback0
 ip address 3.3.3.3 255.255.255.255

R3#sh run int f2/0
interface FastEthernet2/0
 ip address 192.1.23.3 255.255.255.0
 speed 100
 duplex full

R3#sh run int ser1/0
interface Serial1/0
 no ip address
 encapsulation frame-relay

R3#sh run | sec pse
pseudowire-class MSSK
 encapsulation l2tpv3
 ip local interface Loopback0
R3#sh run | sec connect
connect FR Serial1/0 303 l2transport
 xconnect 2.2.2.2 14 pw-class MSSK
 !
R3#sh run | sec router ospf
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 3.3.3.3 0.0.0.0 area 0
 network 192.1.23.3 0.0.0.0 area 0

R4

R4#sh run int lo0
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
 ipv6 address 2001::4/128
 ipv6 rip RIPng enable

R4#sh run int s1/0
interface Serial1/0
 ip address 192.1.14.4 255.255.255.0
 encapsulation frame-relay
 ipv6 address 2001:192:14::4/64
 ipv6 rip RIPng enable
 serial restart-delay 0
 frame-relay map ipv6 2001:192:14::1 404 broadcast
 frame-relay map ipv6 FE80::C801:13FF:FE92:0 404 broadcast
 frame-relay map ip 192.1.14.1 404 broadcast
 frame-relay lmi-type ansi

R4#sh run | sec router rip
router rip
 version 2
 network 4.0.0.0
 network 192.1.14.0
 no auto-summary
ipv6 router rip RIPng

Note:
When dealing with frame-relay and IPv6, we have to configure mapping to the link local address as well which is extracted (and can be hardcoded) from the below

R1#sh ipv6 interface serial 1/0 | inc link
  IPv6 is enabled, link-local address is FE80::C801:13FF:FE92:0
  No Virtual link-local address(es):

R4#sh ipv6 int s1/0 | inc link
  IPv6 is enabled, link-local address is FE80::C804:13FF:FEA2:0
  No Virtual link-local address(es):



Verification

R1#sh frame-relay map
Serial1/0 (up): ipv6 2001:192:14::4 dlci 101(0x65,0x1850), static,
              broadcast,
              CISCO, status defined, active
Serial1/0 (up): ipv6 FE80::C804:13FF:FEA2:0 dlci 101(0x65,0x1850), static,
              broadcast,
              CISCO, status defined, active
Serial1/0 (up): ip 192.1.14.4 dlci 101(0x65,0x1850), static,
              broadcast,
              CISCO, status defined, active

R1#sh ip route rip
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
       + - replicated route, % - next hop override

Gateway of last resort is not set

      4.0.0.0/32 is subnetted, 1 subnets
R        4.4.4.4 [120/1] via 192.1.14.4, 00:00:00, Serial1/0

R1#ping 4.4.4.4         

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/19/24 ms

R1#traceroute 4.4.4.4 numeric

Type escape sequence to abort.
Tracing the route to 4.4.4.4

  1 192.1.14.4 16 msec *  16 msec

R1#sh ipv6 route rip
IPv6 Routing Table - default - 5 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, R - RIP, I1 - ISIS L1, I2 - ISIS L2
       IA - ISIS interarea, IS - ISIS summary, D - EIGRP, EX - EIGRP external
       ND - Neighbor Discovery
       O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
R   2001::4/128 [120/2]
     via FE80::C804:13FF:FEA2:0, Serial1/0

R1#ping 2001::4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/19/28 ms

R1#traceroute 2001::4   

Type escape sequence to abort.
Tracing the route to 2001::4

  1 2001:192:14::4 12 msec 16 msec 16 msec

R4#sh frame-relay map
Serial1/0 (up): ipv6 2001:192:14::1 dlci 404(0x194,0x6440), static,
              broadcast,
              CISCO, status defined, active
Serial1/0 (up): ipv6 FE80::C801:13FF:FE92:0 dlci 404(0x194,0x6440), static,
              broadcast,
              CISCO, status defined, active
Serial1/0 (up): ip 192.1.14.1 dlci 404(0x194,0x6440), static,
              broadcast,
              CISCO, status defined, active

R4#sh ip route rip
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
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
R        1.1.1.1 [120/1] via 192.1.14.1, 00:00:12, Serial1/0

R4#ping 1.1.1.1

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

R4#traceroute 1.1.1.1 numeric

Type escape sequence to abort.
Tracing the route to 1.1.1.1

  1 192.1.14.1 16 msec *  16 msec

R4#sh ipv6 route rip
IPv6 Routing Table - default - 5 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, R - RIP, I1 - ISIS L1, I2 - ISIS L2
       IA - ISIS interarea, IS - ISIS summary, D - EIGRP, EX - EIGRP external
       ND - Neighbor Discovery
       O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
R   2001::1/128 [120/2]
     via FE80::C801:13FF:FE92:0, Serial1/0

R4#ping 2001::1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/16/20 ms

R4#traceroute 2001::1

Type escape sequence to abort.
Tracing the route to 2001::1

  1 2001:192:14::1 12 msec 12 msec 16 msec

R2#show l2tp tunnel summary

L2TP Tunnel Information Total tunnels 1 sessions 1

LocTunID   RemTunID   Remote Name   State  Remote Address  Sessn L2TP Class/
                                                           Count VPDN Group
4166035714 3475960279 R3            est    3.3.3.3         1     l2tp_default_cl

R2#show l2tp session brief

L2TP Session Information Total tunnels 1 sessions 1

LocID      TunID      Peer-address    State     Username, Intf/                
                                      sess/cir  Vcid, Circuit                  
3186344884 4166035714 3.3.3.3         est,UP    14, Se1/0:202

R3#show l2tp tunnel summary

L2TP Tunnel Information Total tunnels 1 sessions 1

LocTunID   RemTunID   Remote Name   State  Remote Address  Sessn L2TP Class/
                                                           Count VPDN Group
3475960279 4166035714 R2            est    2.2.2.2         1     l2tp_default_cl

R3#show l2tp session brief

L2TP Session Information Total tunnels 1 sessions 1

LocID      TunID      Peer-address    State     Username, Intf/                
                                      sess/cir  Vcid, Circuit                  
1379301905 3475960279 2.2.2.2         est,UP    14, Se1/0:303

Monday, June 17, 2013

Inter-AS xconnect





Issue

In this example we will configure xconnect between two PE routers (R2 and R5) which are located in different ASs in order to achieve connectivity

Configuration

R1

R1#sh run int s1/0
interface Serial1/0
 ip address 192.1.16.1 255.255.255.0
 no keepalive

R2

R2#sh run int s2/0
interface Serial2/0
 no ip address
 no keepalive

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

R2#sh run int lo0
interface Loopback0
 ip address 2.2.2.2 255.255.255.255

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

R3#sh run int f2/0
interface FastEthernet2/0
 ip address 192.1.23.3 255.255.255.0
 speed 100
 duplex full
 mpls ip

R3#sh run int pos1/0
interface POS1/0
 ip address 192.1.34.3 255.255.255.0
 encapsulation ppp

R3#sh run | sec router ospf
router ospf 1
 router-id 3.3.3.3
 redistribute bgp 100 subnets route-map MSSK
 network 3.3.3.3 0.0.0.0 area 0
 network 192.1.23.3 0.0.0.0 area 0

R3#sh run | sec router bgp
router bgp 100
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor 192.1.34.4 remote-as 200
 !
 address-family ipv4
  network 2.2.2.2 mask 255.255.255.255
  network 3.3.3.3 mask 255.255.255.255
  neighbor 192.1.34.4 activate
 exit-address-family

R4

R4#sh run int pos1/0
interface POS1/0
 ip address 192.1.34.4 255.255.255.0
 encapsulation ppp

R4#sh run int f2/0
interface FastEthernet2/0
 ip address 192.1.45.4 255.255.255.0
 ip router isis 1
 speed 100
 duplex full
 mpls ip

router isis 1
 net 49.0001.0000.0000.0004.00
 is-type level-2-only
 redistribute bgp 200 route-map MSSK

R4#sh run | sec router bgp
router bgp 200
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor 192.1.34.3 remote-as 100
 !
 address-family ipv4
  network 4.4.4.4 mask 255.255.255.255
  network 5.5.5.5 mask 255.255.255.255
  neighbor 192.1.34.3 activate
 exit-address-family

R5

R5#sh run int f1/0
interface FastEthernet1/0
 ip address 192.1.45.5 255.255.255.0
 ip router isis 1
 speed 100
 duplex full
 mpls ip

R5#sh run int ser2/0
interface Serial2/0
 no ip address
 no keepalive
 serial restart-delay 0
 xconnect 2.2.2.2 16 encapsulation mpls

R5#sh run | sec router isis
 ip router isis 1
 ip router isis 1
router isis 1
 net 49.0001.0000.0000.0005.00
 is-type level-2-only

R6

R6#sh run int s1/0
interface Serial1/0
 ip address 192.1.16.6 255.255.255.0
 no keepalive
 serial restart-delay 0


Verification

Now, R2 (the PE in AS 100) does not know about the loopback of R5 (and vice versa) which will be used to configure the xconnect peering, and in order for MPLS to operate, LDP has to assign labels, in order for that to take place we will redistribute the routes in IGP (OSPF and ISIS in AS 100, 200 respectively) as IGP will handle label assignments

R3#sh run | sec ip pref
ip prefix-list MSSK seq 5 permit 4.4.4.4/32
ip prefix-list MSSK seq 10 permit 5.5.5.5/32

R4#sh run | sec ip pref
ip prefix-list MSSK seq 5 permit 2.2.2.2/32
ip prefix-list MSSK seq 10 permit 3.3.3.3/32

route-map MSSK permit 10
 match ip address prefix-list MSSK

R3
router ospf 1
redistribute bgp 100 subnets route-map MSSK

R4
router isis 1
redistribute bgp 200 route-map MSSK

R2#show mpls forwarding-table | inc 5.5.5.5
17         19         5.5.5.5/32       0             Fa1/0      192.1.23.3

R5#show mpls forwarding-table | inc 2.2.2.2
17         18         2.2.2.2/32       0             Fa1/0      192.1.45.4 

Now in order for the labels to be passed through the ASes , we have to configure the BGP neighbors to send the labels

R3
router bgp 100
address-family ipv4
  neighbor 192.1.34.4 send-label

R4
router bgp 200
address-family ipv4
  neighbor 192.1.34.3 send-label

Now let us check the status of our L2VPN

R2#show mpls l2transport vc 16

Local intf     Local circuit              Dest address    VC ID      Status
-------------  -------------------------- --------------- ---------- ----------
Se2/0          HDLC                       5.5.5.5         16         UP      

R5#sh mpls l2transport vc 16

Local intf     Local circuit              Dest address    VC ID      Status
-------------  -------------------------- --------------- ---------- ----------
Se2/0          HDLC                       2.2.2.2         16         UP       

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

R6#ping 192.1.16.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.1.16.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/21/24 ms

R1#traceroute 192.1.16.6 numeric
Type escape sequence to abort.
Tracing the route to 192.1.16.6
VRF info: (vrf in name/id, vrf out name/id)
  1 192.1.16.6 20 msec *  20 msec

R6#traceroute 192.1.16.1 numeric
Type escape sequence to abort.
Tracing the route to 192.1.16.1
VRF info: (vrf in name/id, vrf out name/id)
  1 192.1.16.1 20 msec *  20 msec