Tuesday, January 3, 2017

CCIE SPv4 - MPLS L3 VPN - VRF Lite - IS-IS for IPv4 and IPv6

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post we will continue looking at VRF Lite but with IS-IS for IPv4 and IPv6. I covered the details of VRFs in the previous post, we'll just tweak the routing so that we will get IPv4 and IPv6 based routing in place. We'll use R4 and R3, IOS XR on 5.3 code doesn't support IS-IS based VRF configuration.

Currently, only default VRF is supported. VPNv4, VPNv6 and VPN routing and forwarding (VRF) address families, L3VPN and Multicast will be supported in a future release.

R3
router isis CCIE

 vrf CCIE
 net 49.0000.0000.0000.0003.00
 metric-style wide
 !
 address-family ipv6
  multi-topology
 exit-address-family

!
interface GigabitEthernet1.102

 ip router isis CCIE
 ipv6 router isis CCIE
!
interface Loopback100
 ip router isis CCIE
 ipv6 router isis CCIE


R4
router isis CCIE
 vrf CCIE
 net 49.0000.0000.0000.0004.00
 metric-style wide
 !
 address-family ipv6
  multi-topology
 exit-address-family
!
interface GigabitEthernet1.102
 ip router isis CCIE
 ipv6 router isis CCIE
!
interface Loopback100
 ip router isis CCIE
 ipv6 router isis CCIE



R4#sh isis neighbors

Tag CCIE:
System Id      Type Interface   IP Address      State Holdtime Circuit Id
R3             L1   Gi1.102     192.168.34.3    UP    22       R4.01
R3             L2   Gi1.102     192.168.34.3    UP    25       R4.01

This output shows that we are peered with R3 both for Level1 and Level2 adjacency. 

R4#sh clns interface
GigabitEthernet1.102 is up, line protocol is up
  Checksums enabled, MTU 1497, Encapsulation SAP
  ERPDUs enabled, min. interval 10 msec.
  CLNS fast switching enabled
  CLNS SSE switching disabled
  DEC compatibility mode OFF for this interface
  Next ESH/ISH in 12 seconds
  Routing Protocol: IS-IS (CCIE)
    Circuit Type: level-1-2
    Interface number 0x1, local circuit ID 0x1
    Level-1 Metric: 10, Priority: 64, Circuit ID: R4.01
    DR ID: R4.01
    Level-1 IPv6 Metric: 10
    Number of active level-1 adjacencies: 1
    Level-2 Metric: 10, Priority: 64, Circuit ID: R4.01
    DR ID: R4.01
    Level-2 IPv6 Metric: 10
    Number of active level-2 adjacencies: 1
    Next IS-IS LAN Level-1 Hello in 2 seconds
    Next IS-IS LAN Level-2 Hello in 556 milliseconds

This output gives you an overview of all the particular options this interface is running for IS-IS. 


R4#sh clns protocol
IS-IS Router: CCIE
  System Id: 0000.0000.0004.00  IS-Type: level-1-2
  Manual area address(es):
        49.0000
  Routing for area address(es):
        49.0000
  Interfaces supported by IS-IS:
        GigabitEthernet1.102 - IP - IPv6
        Loopback100 - IP - IPv6
  Redistribute:
    static (on by default)
    eBGP-neighbors
  Distance for L2 CLNS routes: 110
  RRR level: none
  Generate narrow metrics: none
  Accept narrow metrics:   none
  Generate wide metrics:   level-1-2
  Accept wide metrics:     level-1-2

This output from a protocol level, is the details around the protocol, 

R4#sh ip route vrf CCIE isis

Routing Table: CCIE
Gateway of last resort is not set

      100.0.0.0/32 is subnetted, 4 subnets
i L1     100.100.100.3
           [115/20] via 192.168.34.3, 00:05:26, GigabitEthernet1.102



R4#sh ipv6 route vrf CCIE isis
IPv6 Routing Table - CCIE - 7 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
I1  FC00::3/128 [115/20]
     via FE80::20C:29FF:FE87:8561, GigabitEthernet1.102


CCIE SPv4 - MPLS L3 VPN - VRF Lite - RIPv2 and RIPng

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post we will begin the Layer 3 aspect of the SPv4 blueprint, this will include both IPv4 and IPv6 AFIs, where applicable and supported. We'll start out with the very basic with the VRF aspect, what a VRF is, why you would use it, where it fits, etc. The VRF is a really important component in the MPLS L3 VPN deployment model, however, MPLS is not needed to VRFs. This is where VRF Lite comes into play. To be transparent/clear, MPLS is deployed everywhere in the SP core, however, with the creation of the VRF, we are not enabling MPLS on VRF based interfaces, so IP based forwarding will be used.

A VRF or Virtual Routing and Forwarding table is a way for a Layer 3 device to create a new routing table, which is a broadcast domain. If you are familiar with Layer 2 switching uses the "VLAN" to create multiple broadcast domains on a switch or multiplex the switch. By default, switches and routers, on the main interface, all interfaces are in VLAN 1. A VRF on a router is 1:1 analogous to a VLAN on a switch. A VRF simply allows a router to create multiple user defined broadcast domains. Like a VLAN, an interface is placed into the VRF, which then takes the interface out of the default or global RIB. When you create a VRF, a Route Distinguisher or RD is configured to make any routes that are in that VRF globally unique. 

A Route Distinguisher in its simplest form is a way for VRF routes to be uniquely identified. Technically not needed for VRF lite, since VRF lite isn't leveraging MPLS for transport, it could, but in our demo we are not. The RD is a 64 bit value or 8 bytes broken into a A:N or 50693:100 where typically the ASN of the provider is used in conjunction with a customer ID, this is just one way of many to break it down. The other way is IP:N or 192.168.1.11:100, where the RID/MP-BGP Loopback for VPNv4/v6 could be used as well. It's up to the organization to determine. I use 50693:100 for simplicity. The RD is prepended to the beginning of the route in the VRF RIB to make it unique, 50693:100:100.100.100.1/32 for instance. In total, when used, the IPv4 address increases in size from 32 bits or 4 bytes to 96 bits or 12 bytes, 64 are unique the RD the other 32 the original IPv4 address. 

Our demo will be very simple to setup from a VRF perspective, the actual VRF configuration is only a few commands, placing interfaces into the VRFs, IPv4/v6 addressing, configuring routing all come later on. We'll configure VRF lite on R1, XR5, R4 and R3 with the goal of advertising loopback 100 into the IGP or via static routing. We'll configure all the IGPs and any supported AFIs so we can test that functionality. We'll start with RIP having a high AD of 120. So first we'll configure  VRF CCIE, place interfaces into VRF CCIE and then setup routing inside VRF CCIE.

R3, R4 and R1
vrf definition CCIE


 rd 50693:100
 !
 address-family ipv4
 exit-address-family
 !
 address-family ipv6
 exit-address-family

XR5
vrf CCIE
 address-family ipv4 unicast
 !
 address-family ipv6 unicast
!
router bgp 1
 vrf CCIE
  rd 50693:100


In IOS XR, the RD is configured under the BGP VRF configuration mode, the RT or Route Target is configured under the VRF globally, covered when we begin L3 VPN.


Now we'll configure new interfaces and place those interfaces into VRF CCIE.

XR5
interface Loopback100
 vrf CCIE
 ipv4 address 100.100.100.15 255.255.255.255
 ipv6 address fc00::15/128
!
interface GigabitEthernet0/0/0/0.100
 vrf CCIE
 ipv4 address 192.168.15.15 255.255.255.0
 ipv6 address 2100:15::15/64
 encapsulation dot1q 100
!
interface GigabitEthernet0/0/0/0.101
 vrf CCIE
 ipv4 address 192.168.45.15 255.255.255.0
 ipv6 address 2100:45::15/64
 encapsulation dot1q 101


R1
interface Loopback100
 vrf forwarding CCIE
 ip address 100.100.100.1 255.255.255.255
 ipv6 address FC00::1/128
!
interface GigabitEthernet1.100
 encapsulation dot1Q 100
 vrf forwarding CCIE
 ip address 192.168.15.1 255.255.255.0
 ipv6 address 2100:15::1/64


R4
interface GigabitEthernet1.101
 encapsulation dot1Q 101
 vrf forwarding CCIE
 ip address 192.168.45.4 255.255.255.0
 ipv6 address 2100:45::4/64
!
interface GigabitEthernet1.102
 encapsulation dot1Q 102
 vrf forwarding CCIE
 ip address 192.168.34.4 255.255.255.0
 ipv6 address 2100:34::4/64
!
interface Loopback100
 vrf forwarding CCIE
 ip address 100.100.100.4 255.255.255.255
 ipv6 address FC00::4/128


R3
interface Loopback100
 vrf forwarding CCIE
 ip address 100.100.100.3 255.255.255.255
 ipv6 address FC00::3/128
!
interface GigabitEthernet1.102
 encapsulation dot1Q 102
 vrf forwarding CCIE
 ip address 192.168.34.3 255.255.255.0
 ipv6 address 2100:34::3/64


Ok, so now that we have all of the interfaces in VRF CCIE, we can now go ahead and configure RIPv2 for IPv4 on the above routers and RIPng on R3 and R4, XRv 5.3 doesn't appear to support IPv6 RIP. 

R3
router rip
 no auto-summary
 !
 address-family ipv4 vrf CCIE
  network 100.0.0.0
  network 192.168.34.0
  no auto-summary
  version 2
 exit-address-family

R4
router rip
 no auto-summary
 !
 address-family ipv4 vrf CCIE
  network 100.0.0.0
  network 192.168.34.0
  network 192.168.45.0
  no auto-summary
  version 2
 exit-address-family

XR5
router rip
 vrf CCIE
  interface Loopback100
  !
  interface GigabitEthernet0/0/0/0.100
  !
  interface GigabitEthernet0/0/0/0.101

R1
router rip
 no auto-summary
 !
 address-family ipv4 vrf CCIE
  network 100.0.0.0
  network 192.168.15.0
  network 192.168.34.0
  no auto-summary
  version 2
 exit-address-family


Now we'll configure the IPv6 variant on R3 and R4.

R3
ipv6 rip vrf-mode enable
interface GigabitEthernet1.102
 ipv6 rip CCIE enable
!
interface Loopback100
 ipv6 rip CCIE enable


R4
ipv6 rip vrf-mode enable
interface GigabitEthernet1.102
 ipv6 rip CCIE enable
!
interface Loopback100
 ipv6 rip CCIE enable

So let's go ahead and verify the base VRF configuration.

R1#sh vrf CCIE
  Name                             Default RD            Protocols   Interfaces
  CCIE                             50693:100             ipv4,ipv6   Gi1.100
                                                                     Lo100

R1#sh ip route vrf CCIE

Routing Table: CCIE
Gateway of last resort is not set

      100.0.0.0/32 is subnetted, 4 subnets
C        100.100.100.1 is directly connected, Loopback100
R        100.100.100.3
           [120/3] via 192.168.15.15, 00:00:03, GigabitEthernet1.100
R        100.100.100.4
           [120/2] via 192.168.15.15, 00:00:03, GigabitEthernet1.100
R        100.100.100.15
           [120/1] via 192.168.15.15, 00:00:03, GigabitEthernet1.100
      192.168.15.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.15.0/24 is directly connected, GigabitEthernet1.100
L        192.168.15.1/32 is directly connected, GigabitEthernet1.100
R     192.168.34.0/24
           [120/2] via 192.168.15.15, 00:00:03, GigabitEthernet1.100
R     192.168.45.0/24
           [120/1] via 192.168.15.15, 00:00:03, GigabitEthernet1.100


RP/0/0/CPU0:XR5#sh vrf CCIE
Tue Jan  3 19:33:14.350 UTC
VRF                  RD                  RT                         AFI   SAFI
CCIE                 50693:100

RP/0/0/CPU0:XR5#sh route vrf CCIE
Tue Jan  3 19:36:17.128 UTC

Gateway of last resort is not set

R    100.100.100.1/32 [120/1] via 192.168.15.1, 19:52:44, GigabitEthernet0/0/0/0.100
R    100.100.100.3/32 [120/2] via 192.168.45.4, 19:53:06, GigabitEthernet0/0/0/0.101
R    100.100.100.4/32 [120/1] via 192.168.45.4, 19:53:06, GigabitEthernet0/0/0/0.101
L    100.100.100.15/32 is directly connected, 20:11:37, Loopback100
C    192.168.15.0/24 is directly connected, 20:11:37, GigabitEthernet0/0/0/0.100
L    192.168.15.15/32 is directly connected, 20:11:37, GigabitEthernet0/0/0/0.100
R    192.168.34.0/24 [120/1] via 192.168.45.4, 19:53:06, GigabitEthernet0/0/0/0.101
C    192.168.45.0/24 is directly connected, 20:11:37, GigabitEthernet0/0/0/0.101
L    192.168.45.15/32 is directly connected, 20:11:37, GigabitEthernet0/0/0/0.101


As you can see, pretty basic verification.


Now let's take a look at verifying the RIPv2 specific VRF.

R1#sh ip rip database vrf CCIE
100.0.0.0/8    auto-summary
100.100.100.1/32    directly connected, Loopback100
100.100.100.3/32
    [3] via 192.168.15.15, 00:00:03, GigabitEthernet1.100
100.100.100.4/32
    [2] via 192.168.15.15, 00:00:03, GigabitEthernet1.100
100.100.100.15/32
    [1] via 192.168.15.15, 00:00:03, GigabitEthernet1.100
192.168.15.0/24    auto-summary
192.168.15.0/24    directly connected, GigabitEthernet1.100
192.168.34.0/24    auto-summary
192.168.34.0/24
    [2] via 192.168.15.15, 00:00:03, GigabitEthernet1.100
192.168.45.0/24    auto-summary
192.168.45.0/24
    [1] via 192.168.15.15, 00:00:03, GigabitEthernet1.100


R3#sh ipv6 route vrf CCIE
IPv6 Routing Table - CCIE - 5 entries

C   2100:34::/64 [0/0]
     via GigabitEthernet1.102, directly connected
L   2100:34::3/128 [0/0]
     via GigabitEthernet1.102, receive
LC  FC00::3/128 [0/0]
     via Loopback100, receive
R   FC00::4/128 [120/2]
     via FE80::20C:29FF:FE88:6F18, GigabitEthernet1.102
L   FF00::/8 [0/0]
     via Null0, receive


RP/0/0/CPU0:XR5#sh rip vrf CCIE
Tue Jan  3 19:43:37.558 UTC

RIP config:
Active:                    Yes
Added to socket:           Yes
Out-of-memory state:        Normal
Version:                    2
Default metric:             Not set
Maximum paths:              4
Auto summarize:            No
Broadcast for V2:          No
Packet source validation:  Yes
NSF:                        Disabled
Timers: Update:             30 seconds (8 seconds until next update)
        Invalid:            180 seconds
        Holddown:           180 seconds
        Flush:              240 seconds

I don't want to focus on RIPv2, I want to be specific to VRF outputs. I'm limited on the verification because RIPv2 and RIPng have very few verification commands. 

As you can see overall, VRF Lite in general is relatively easy to configure. 

Monday, January 2, 2017

CCIE SPv4 - IP Encapsulated - L2TPv3 - L2VPN Protocol CLI w/ Redundancy and Authentication

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post, we'll take a look the more scalable and flexible L2VPN Protocol CLI variant. We'll configure a new PW between R1 and R5, we'll also migrate the PW from the "xconnect" to the L2VPN Protocol CLI to leverage "redundancy" moving forward. Keep in mind, these are 2 separate tunnels and each can have individually different configurations. 

R1
interface GigabitEthernet2.20

 encapsulation dot1Q 20
!

template type pseudowire CCIE

 encapsulation l2tpv3
 ip local interface Loopback0
!
interface pseudowire20
  source template type pseudowire CCIE
 encapsulation l2tpv3
 neighbor 192.168.1.5 20
!
l2vpn xconnect context L2TP
 member pseudowire20
 member GigabitEthernet2.20


R5
interface GigabitEthernet3.20
 encapsulation dot1Q 20
!
template type pseudowire CCIE
 encapsulation l2tpv3
 ip local interface Loopback0
!
interface pseudowire20
  source template type pseudowire CCIE
 encapsulation l2tpv3
 neighbor 192.168.1.1 20
!
l2vpn xconnect context L2TP
 member pseudowire20
 member GigabitEthernet3.20


Verification of the initial configuration:
R5# sh l2tp tunnel

L2TP Tunnel Information Total tunnels 1 sessions 1

LocTunID   RemTunID   Remote Name   State  Remote Address  Sessn  L2TP Class/
                                                                                                         Count  VPDN Group
2355360215 3142881823 R1                    est      192.168.1.1         1          l2tp_default_class

The tunnel between R1 and R5 is up and operational. 

R5#sh l2vpn service xconnect interface pseudowire 20
Legend: St=State    XC St=State in the L2VPN Service      Prio=Priority
        UP=Up       DN=Down            AD=Admin Down      IA=Inactive
        SB=Standby  HS=Hot Standby     RV=Recovering      NH=No Hardware
        m=manually selected

  Interface          Group       Encapsulation                   Prio  St  XC St
  ---------          -----       -------------                   ----  --  -----
VPWS name: L2TP, State: UP
  pw20                           192.168.1.1:20(L2TP)            0     UP  UP
  Gi3.20                         Gi3.20:20(Eth VLAN)             0     UP  UP

I migrated the configuration on R1 and R6 from the "xconnect" syntax to the L2VPN Protocol CLI with the "l2vpn xconnect context" variant. This will give R1 the ability to have peerings to R5 and R6, with one of them being in SB or standby mode. 

R1
template type pseudowire CCIE
 encapsulation l2tpv3
 ip local interface Loopback0
!
interface pseudowire10
  source template type pseudowire CCIE
 encapsulation l2tpv3
 neighbor 192.168.1.6 10
!
l2vpn xconnect context L2TP
 member pseudowire20 group RED priority 5
 member pseudowire10 group RED priority 6
 member GigabitEthernet2.20

R1#sh l2tp tunnel

L2TP Tunnel Information Total tunnels 2 sessions 2

LocTunID   RemTunID   Remote Name   State  Remote Address  Sessn L2TP Class/
                                                           Count VPDN Group
2702183390 2981560783 R6            est    192.168.1.6     1     l2tp_default_class
3142881823 2355360215 R5            est    192.168.1.5     1     l2tp_default_class

R1 from an L2TPv3 perspective has both tunnels configured and established, which is a good sign but is also deceiving since it uses the "pseudowire" configuration option, you can't have 2 paths to the same device when advertising MACs over both peers, you'll end up in a "flip-flop" design. 

R1#sh l2vpn service xconnect name L2TP
Legend: St=State    XC St=State in the L2VPN Service      Prio=Priority
        UP=Up       DN=Down            AD=Admin Down      IA=Inactive
        SB=Standby  HS=Hot Standby     RV=Recovering      NH=No Hardware
        m=manually selected

  Interface          Group       Encapsulation                   Prio  St  XC St
  ---------          -----       -------------                   ----  --  -----
VPWS name: L2TP, State: UP
  pw20               RED         192.168.1.5:20(L2TP)            5     UP  UP
  pw10               RED         192.168.1.6:10(L2TP)            6     SB  IA
  Gi2.20                         Gi2.20:20(Eth VLAN)             0     UP  UP

To solve that issue, the L2VPN service automatically places the PW with a higher priority into SB or standby mode and the XC is inactive until, based on the redundancy group configuration, the PW with the lower priority fails, the backup PW will take over. 

So there is your "redundancy" just like we same in MPLS L2 VPN.


The authentication piece is a bit different, each PW will receive it's authentication, the older and the newer styles will be used leveraging the "l2tp-class" feature, which is specific to L2TPv3 for apply "templates" to configuration items. There are 2 authentication methods, L2TP control-channel authentication and L2TPv3 control message hashing. R1 and R6 will use the older variant, and R1 and R5 will use the newer variant. 

R1
l2tp-class AUTH
 authentication
 password CCIE_AUTH
!
interface pseudowire10
  source template type pseudowire CCIE
 encapsulation l2tpv3
 neighbor 192.168.1.6 10
 signaling protocol l2tpv3 AUTH
!
!
l2tp-class HASH
 digest secret 0 CCIE_HASH hash SHA1
!
interface pseudowire20
  source template type pseudowire CCIE
 encapsulation l2tpv3
 neighbor 192.168.1.1 20
 signaling protocol l2tpv3 HASH


R5
l2tp-class HASH
 digest secret 0 CCIE_HASH hash SHA1
!
interface pseudowire20
  source template type pseudowire CCIE
 encapsulation l2tpv3
 neighbor 192.168.1.1 20
 signaling protocol l2tpv3 HASH


R6
l2tp-class AUTH
 authentication
 password CCIE_AUTH
!
interface pseudowire10
  source template type pseudowire CCIE
 encapsulation l2tpv3
 neighbor 192.168.1.1 10
 signaling protocol l2tpv3 AUTH


R1
R1#sh l2tp class
class [AUTH]
  is a statically configured class
  configuration:
    l2tp-class AUTH
     authentication
     digest check
     hello 60
     password CCIE_AUTH
     receive-window 1024
     retransmit retries 15
     retransmit timeout max 8
     retransmit timeout min 1
     retransmit initial retries 2
     retransmit initial timeout max 8
     retransmit initial timeout min 1
     timeout setup 300
    !

class [HASH]
  is a statically configured class
  configuration:
    l2tp-class HASH
     digest secret 0 CCIE_HASH hash SHA1
     digest check
     hello 60
     receive-window 1024
     retransmit retries 15
     retransmit timeout max 8
     retransmit timeout min 1
     retransmit initial retries 2
     retransmit initial timeout max 8
     retransmit initial timeout min 1
     timeout setup 300


As you can see, pretty simple overall configuration wise. There are some handy debugs that will tell you there is an issue if the password is wrong. My method for making sure I don't misconfigure the authentication is to copy and paste the configuration between the peers. There is no tunnel specific output that states the tunnel is authenticated by a certain method, it does however state an L2TP class and it's associated name.

R1#sh l2tp tunnel all id 806532845 | in HASH
  L2TP class for tunnel is HASH
R1#sh l2tp tunnel all id 4291111902 | in AUTH
  L2TP class for tunnel is AUTH


Last but not least, we need to verify that the customers peering is up and running.

R10#sh ip eigrp nei
EIGRP-IPv4 Neighbors for AS(1)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   172.16.20.13            Gi2.20                   10 00:44:06   52   312  0  623

All is well!

Thanks for stopping by!
Rob Riker, CCIE #50693