My Countingdown

Friday, December 16, 2011

Lab 7. MPLS – PE – CE OSPF Routing



Now we want to establish connection between PE and CE using OSPF.
Let’s take example BCA. We have new customer BCA want to connect to our MPLS backbone using OSPF to PE. For this lab we don’t activate yet connection using serial from BCA1 to BCA2!

To do this lab, you need to do Lab-1 http://pursuingmydestiny.blogspot.com/2011/12/lab-1-mpls-backbone.html for establishing MPLS backbone and Lab-2 first http://pursuingmydestiny.blogspot.com/2011/12/lab-2-mpls-vpn.html for establishing MP-BGP only.

PE1#
ip vrf BCA_1
 rd 65000:2
 route-target export 65000:2
 route-target import 65000:2
!
interface FastEthernet1/0
 description ###Link to BCA1###
 ip vrf forwarding BCA_1
 ip address 192.168.0.1 255.255.255.252
!
router ospf 100 vrf BCA_1
 redistribute bgp 65000 subnets
 network 192.168.0.1 0.0.0.0 area 0
!
router bgp 65000
 address-family ipv4 vrf BCA_1
  redistribute ospf 100 vrf BCA_1 match internal external 1 external 2

PE2#
ip vrf BCA_2
 rd 65000:2
 route-target export 65000:2
 route-target import 65000:2
!
interface FastEthernet1/0
 description ###Link to BCA2###
 ip vrf forwarding BCA_2
 ip address 192.168.0.5 255.255.255.252
!
router ospf 100 vrf BCA_2
 redistribute bgp 65000 subnets
 network 192.168.0.5 0.0.0.0 area 0
!
router bgp 65000
 address-family ipv4 vrf BCA_2 
  redistribute ospf 100 vrf BCA_2 match internal external 1 external 2

BCA1#
interface Loopback0
 ip address 10.0.0.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.0.2 255.255.255.252
!
router ospf 1
 router-id 10.0.0.1
 network 45.45.45.4 0.0.0.0 area 0
 network 0.0.0.0 255.255.255.255 area 0

BCA2#
interface Loopback0
 ip address 10.0.0.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.0.6 255.255.255.252
!
router ospf 1
 router-id 10.0.0.2
 network 45.45.45.5 0.0.0.0 area 0
 network 0.0.0.0 255.255.255.255 area 0

Let’s check vpn BCA_2

PE2#sh ip bgp vpnv4 vrf BCA_2
BGP table version is 23, local router ID is 10.10.10.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 65000:2 (default for vrf BCA_2)
* i10.0.0.1/32      10.10.10.1               2    100      0 ?
*>                  192.168.0.6             66         32768 ?
* i10.0.0.2/32      10.10.10.1              66    100      0 ?
*>                  192.168.0.6              2         32768 ?
* i45.45.45.0/24    10.10.10.1              65    100      0 ?
*>                  192.168.0.6             65         32768 ?
* i192.168.0.0/30   10.10.10.1               0    100      0 ?
*>                  192.168.0.6             66         32768 ?
* i192.168.0.4/30   10.10.10.1              66    100      0 ?
*>                  0.0.0.0                  0         32768 ?

Let’s check routing table in PE2 and CE2 (BCA2)

PE2#sh ip rou vrf BCA_2

Routing Table: BCA_2
Codes: 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

Gateway of last resort is not set

     222.222.222.0/32 is subnetted, 1 subnets
C       222.222.222.222 is directly connected, Loopback22
     10.0.0.0/32 is subnetted, 2 subnets
O       10.0.0.2 [110/2] via 192.168.0.6, 00:15:11, FastEthernet1/0
B       10.0.0.1 [200/2] via 10.10.10.1, 00:00:01
     192.168.0.0/30 is subnetted, 2 subnets
B       192.168.0.0 [200/0] via 10.10.10.1, 00:00:01
C       192.168.0.4 is directly connected, FastEthernet1/0

BCA2#SH IP ROU
Codes: 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

Gateway of last resort is not set

     10.0.0.0/32 is subnetted, 2 subnets
C       10.0.0.2 is directly connected, Loopback0
O IA    10.0.0.1 [110/3] via 192.168.0.5, 00:01:29, FastEthernet0/0
     192.168.0.0/30 is subnetted, 2 subnets
O IA    192.168.0.0 [110/2] via 192.168.0.5, 00:01:29, FastEthernet0/0
C       192.168.0.4 is directly connected, FastEthernet0/0

Let’s check ping and do trace route

BCA2#ping 10.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 112/148/184 ms

BCA2#trac 10.0.0.1
Type escape sequence to abort.
Tracing the route to 10.0.0.1
  1 192.168.0.5 52 msec 16 msec 4 msec
  2 192.168.20.1 [MPLS: Labels 17/26 Exp 0] 184 msec 164 msec 96 msec
  3 192.168.0.1 [MPLS: Label 26 Exp 0] 92 msec 132 msec 80 msec
  4 192.168.0.2 136 msec *  152 msec

No comments:

Post a Comment