Tuesday, April 9, 2013

VPLS IOS XR




Elements

       In this example we will configure VPLS on our PE routers (XR1 and XR2); the clients will be R1 and R2 which will run EIGRP between them
       ISIS is the IGP used inside the backbone; we will list the configuration from XR1 and XR2 side only

Configuration


XR1

interface Loopback0
 ipv4 address 1.1.1.1 255.255.255.255

interface GigabitEthernet0/1/0/0.13
 ipv4 address 192.1.13.1 255.255.255.0
 dot1q vlan 13
router isis 1
 is-type level-2-only
 net 49.0001.0000.0000.0001.00
 address-family ipv4 unicast
  mpls traffic-eng level-2-only
 !
 interface Loopback0
  address-family ipv4 unicast
  !
interface GigabitEthernet0/1/0/0.13
  address-family ipv4 unicast

interface POS0/6/0/0
  address-family ipv4 unicast

mpls ldp
 router-id 1.1.1.1
interface GigabitEthernet0/1/0/0.13

interface POS0/6/0/0

interface GigabitEthernet0/1/0/0.12 l2transport
dot1q vlan 12

l2vpn
 pw-class MSSK
  encapsulation mpls
   transport-mode Ethernet
!
 bridge group GRP
  bridge-domain DOMAIN
   interface GigabitEthernet0/1/0/0.12
   !
   vfi 12
    neighbor 2.2.2.2 pw-id 12
     pw-class MSSK


XR2

interface Loopback0
 ipv4 address 2.2.2.2 255.255.255.255

interface GigabitEthernet0/4/0/0.23
 ipv4 address 192.1.23.2 255.255.255.0
 dot1q vlan 23
!
router isis 1
 is-type level-2-only
 net 49.0001.0000.0000.0002.00
 address-family ipv4 unicast
  mpls traffic-eng level-2-only
 !
 interface Loopback0
  address-family ipv4 unicast
  !
interface GigabitEthernet0/4/0/0.23
  address-family ipv4 unicast

interface POS0/7/0
  address-family ipv4 unicast

! mpls ldp
 router-id 2.2.2.2
interface GigabitEthernet0/4/0/0.23

interface POS0/7/0/0


interface GigabitEthernet0/4/0/1.12 l2transport
dot1q vlan 12

l2vpn
 pw-class MSSK
  encapsulation mpls
   transport-mode ethernet
  !
 !
 bridge group GRP
  bridge-domain DOMAIN
   interface GigabitEthernet0/4/0/1.12
   !
   vfi 12
    neighbor 1.1.1.1 pw-id 12
     pw-class MSSK

R2

R2#sh run int f0/0
interface FastEthernet0/0
 ip address 192.1.12.2 255.255.255.0
 duplex full
 speed 100

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

router eigrp 100
network 2.2.2.2 0.0.0.0
network 192.1.12.1 0.0.0.0

R1

R1#sh run int f0/0
interface FastEthernet0/0
 ip address 192.1.12.2 255.255.255.0
 duplex full
 speed 100

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

router eigrp 100
network 1.1.1.1 0.0.0.0
network 192.1.12.1 0.0.0.0

Verification

RP/0/0/CPU0:XR1#show l2vpn forwarding bridge-domain mac-address location 0/1/C$
Wed Apr  3 15:42:36.134 UTC
Mac Address    Type    Learned from/Filtered on    LC learned Age                Mapped to    
--------------------------------------------------------------------------------
0009.e98e.c800 dynamic Gi0/1/0/0.12                0/1/CPU0   0d 0h 1m 13s       N/A          
000d.2817.9b1a dynamic (2.2.2.2, 12)               0/1/CPU0   0d 0h 1m 1s        N/A          
0011.20e3.901c dynamic (2.2.2.2, 12)               0/1/CPU0   0d 0h 1m 8s        N/A 

RP/0/0/CPU0:XR1#show l2vpn bridge-domain brief
Wed Apr  3 15:41:11.342 UTC
Bridge Group/Bridge-Domain Name  ID    State      Num ACs/up     Num PWs/up
-------------------------------- ----- ---------- -------------- --------------
GRP/DOMAIN                       2     up         1/1            1/1        

RP/0/0/CPU0:XR1#show l2vpn bridge-domain summary
Wed Apr  3 15:59:59.181 UTC
Number of groups: 1, bridge-domains: 1, Up: 1, Shutdown: 0
Default: 1, pbb-edge: 0, pbb-core: 0
Number of ACs: 1 Up: 1, Down: 0
Number of PWs: 1 Up: 1, Down:

RP/0/3/CPU0:XR2#show l2vpn forwarding bridge-domain mac-address location 0/3/CPU0
Wed Apr  3 16:00:34.058 UTC
Mac Address    Type    Learned from/Filtered on    LC learned Age                Mapped to    
--------------------------------------------------------------------------------
0009.e98e.c800 dynamic (1.1.1.1, 12)               0/4/CPU0   Remotely Aged      N/A          
000d.2817.9b1a dynamic Gi0/4/0/1.12                0/4/CPU0   Remotely Aged      N/A          
0011.20e3.901c dynamic Gi0/4/0/1.12                0/4/CPU0   Remotely Aged      N/A

RP/0/3/CPU0:XR2#show l2vpn bridge-domain brief       
Wed Apr  3 16:01:01.485 UTC
Bridge Group/Bridge-Domain Name  ID    State      Num ACs/up     Num PWs/up
-------------------------------- ----- ---------- -------------- --------------
GRP/DOMAIN                       1     up         1/1            1/1          
RP/0/3/CPU0:XR2#show l2vpn bridge-domain summary
Wed Apr  3 16:01:05.328 UTC
Number of groups: 1, bridge-domains: 1, Up: 1, Shutdown: 0
Default: 1, pbb-edge: 0, pbb-core: 0
Number of ACs: 1 Up: 1, Down: 0
Number of PWs: 1 Up: 1, Down: 0

R1#sh ip route eigrp
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

      22.0.0.0/32 is subnetted, 1 subnets
D        22.22.22.22 [90/156160] via 192.1.100.2, 00:00:12, FastEthernet0/0

R2#sh ip route eigrp
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

      11.0.0.0/32 is subnetted, 1 subnets
D        11.11.11.11 [90/156160] via 192.1.100.1, 00:04:07, FastEthernet1/0

R2#ping 11.11.11.11 source lo0

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

R1#ping 22.22.22.22 source lo0

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

One note to mention is that I have XR1 G0/1/0/0 interface to SW1 G0/1 interface , XR2 G0/4/0/1 connected to SW2 G0/2 interface , F0/20 – 21 bundled as etherchannel on both switches and configured as trunk as the previous mentioned interfaces (SW1 G0/1 , SW2 G0/2)

I faced a problem in the mac-address flapping so I removed the vlan 12 (VPLS vlan in function) from both trunks on both switches

SW1
interface G0/1
switchport trunk allowed vlan remove 12

SW2
interface G0/2
switchport trunk allowed vlan remove 12

Monday, April 1, 2013

MPLS L3VPN IOS XR





Elements


       In this example PE routers are IOS XR based and the rest of the devices are IOS based router, ISIS will be the IGP inside the MPLS backbone and OSPF is the PE-CE routing protocol.

R7 and R8 will be our CE routers and R3 will act as the P router

Configuration


R7

R7#sh run int f0/0
interface FastEthernet0/0
 ip address 192.1.17.7 255.255.255.0
 duplex full
 speed 100

R7#sh run int lo0
interface Loopback0
 ip address 7.7.7.7 255.255.255.255

router ospf 100
router-id 7.7.7.7
network 7.7.7.7 0.0.0.0 area 0
network 192.1.17.7 0.0.0.0 area 0

XR1

vrf MSSK
 address-family ipv4 unicast
  import route-target
   100:1
  !
  export route-target
   100:1
  !
 !
interface Loopback0
 ipv4 address 1.1.1.1 255.255.255.255

interface GigabitEthernet0/1/0/0.13
 ipv4 address 192.1.13.1 255.255.255.0
 dot1q vlan 13

interface GigabitEthernet0/1/0/0.17
 vrf MSSK
 ipv4 address 192.1.17.1 255.255.255.0
 dot1q vlan 17

router isis 1 à You have to configure ID
 is-type level-2-only
 net 49.0001.0000.0000.0001.00
 address-family ipv4 unicast
  mpls traffic-eng level-2-only
 !
 interface Loopback0
  address-family ipv4 unicast
  !
interface GigabitEthernet0/1/0/0.13
  address-family ipv4 unicast

router ospf 100
 vrf MSSK
  redistribute bgp 100
  area 0
   interface GigabitEthernet0/1/0/0.17

router bgp 100
 address-family vpnv4 unicast
 !
 neighbor 3.3.3.3
  remote-as 100
  update-source Loopback0
  address-family vpnv4 unicast
  !
 !
 vrf MSSK
  rd 100:1
  address-family ipv4 unicast
   redistribute ospf 100

mpls ldp
 router-id 1.1.1.1
interface GigabitEthernet0/1/0/0.13
!

R3

R3#sh run int f0/0
interface FastEthernet0/0
ip address 192.1.13.3 255.255.255.0
duplex full
speed 100
mpls ip

R3#sh run int f0/1
interface FastEthernet0/1
ip address 192.1.23.3 255.255.255.0
duplex full
speed 100
mpls ip

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

router isis
net 49.0001.0000.0000.0003.00
passive-interface loopback0
is-type level-2

router bgp 100
no bgp default ipv4-unicast
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source lo0
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source lo0

address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community both
neighbor 1.1.1.1 route-refelctor-client
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community both
neighbor 2.2.2.2 route-refelctor-client

XR2

vrf MSSK
 address-family ipv4 unicast
  import route-target
   100:1
  !
  export route-target
   100:1
  !
 !

interface Loopback0
 ipv4 address 2.2.2.2 255.255.255.255

interface GigabitEthernet0/4/0/0.23
 ipv4 address 192.1.23.2 255.255.255.0
 dot1q vlan 23
!
interface GigabitEthernet0/4/0/0.28
 vrf MSSK
 ipv4 address 192.1.28.2 255.255.255.0
 dot1q vlan 28

router isis 1
 is-type level-2-only
 net 49.0001.0000.0000.0002.00
 address-family ipv4 unicast
  mpls traffic-eng level-2-only
 !
 interface Loopback0
  address-family ipv4 unicast
  !
interface GigabitEthernet0/4/0/0.23
  address-family ipv4 unicast
  !
router ospf 100
 vrf MSSK
  redistribute bgp 100
  area 0
   interface GigabitEthernet0/4/0/0.28
   !
 router bgp 100
 address-family vpnv4 unicast
 !
 neighbor 3.3.3.3
  remote-as 100
  update-source Loopback0
  address-family vpnv4 unicast
  !
 !
 vrf MSSK
  rd 100:1
  address-family ipv4 unicast
   redistribute ospf 100
  !
 ! mpls ldp
 router-id 2.2.2.2
interface GigabitEthernet0/4/0/0.23

R8

R8#sh run int f0/0
interface FastEthernet0/0
 ip address 192.1.28.8 255.255.255.0
 duplex full
 speed 100

R8#sh run int lo0
interface Loopback0
 ip address 8.8.8.8 255.255.255.255

router ospf 100
router-id 8.8.8.8
network 8.8.8.8 0.0.0.0 area 0
network 192.1.28.8 0.0.0.0 area 0