MPLS VPN: Same OSPF Domain ID

Facebooktwittergoogle_plusredditpinterestlinkedin

On a Layer 3 MPLS VPN using OSPF as an IGP between PE and CE, OSPF domain ID is equivalent to the OSPF process ID by default. Therefore, OSPF routes are seen as OSPF inter-area (Type 3 OSPF LSA). By considering this behaviour, it is easy to distinguish real external routes in the VPN.

In the example built as shown in the figure, two customer routers (CE3 and CE4) are connected to a provider MPLS VPN network. OSPF is used to redistribute customer routes between the CE and PE routers. In CE-3, Loopbacks 1,2 and 3 are advertised by OSPF, RIPv2 and EIGRP respectively (RIPv2 and EIGRP learned routes are considered external). RIPv2 routes are redistributed by OSPF as external type 1. EIGRP routes are redistributed by OSPF as external type 2 . In CE-4, Loopback1 is advertised by OSPF.

Topology:
ospf domain id

Routes verification on CE-3 show that route 192.168.20.1/32 (advertised by CE-4) is received as OSPF inter-area route.

CE-3(config)#do sh ip route
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

     1.0.0.0/32 is subnetted, 1 subnets
O E2    1.1.22.1 [110/1] via 10.10.10.1, 00:02:36, FastEthernet0/0
C    192.168.10.0/24 is directly connected, Loopback1
     22.0.0.0/32 is subnetted, 1 subnets
C       22.22.22.1 is directly connected, Loopback3
     192.168.20.0/32 is subnetted, 1 subnets
O IA    192.168.20.1 [110/75] via 10.10.10.1, 00:02:41, FastEthernet0/0
     10.0.0.0/30 is subnetted, 2 subnets
O IA    10.20.20.0 [110/11] via 10.10.10.1, 00:02:41, FastEthernet0/0
C       10.10.10.0 is directly connected, FastEthernet0/0
     11.0.0.0/32 is subnetted, 1 subnets
C       11.11.11.1 is directly connected, Loopback2

Routes verification on CE-4 show that routes 192.168.10.0/32, 11.11.11.1/32, 22.22.22.1/32 are received as OSPF inter-area, external type 1 and external type 2 routes respectively.

CE-4#sh ip route
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

     1.0.0.0/32 is subnetted, 1 subnets
O E2    1.1.11.1 [110/1] via 10.20.20.1, 00:02:54, Serial1/0
     192.168.10.0/32 is subnetted, 1 subnets
O IA    192.168.10.1 [110/66] via 10.20.20.1, 00:02:59, Serial1/0
     22.0.0.0/32 is subnetted, 1 subnets
O E2    22.22.22.1 [110/20] via 10.20.20.1, 00:02:54, Serial1/0
C    192.168.20.0/24 is directly connected, Loopback1
     10.0.0.0/30 is subnetted, 2 subnets
C       10.20.20.0 is directly connected, Serial1/0
O IA    10.10.10.0 [110/65] via 10.20.20.1, 00:02:59, Serial1/0
     11.0.0.0/32 is subnetted, 1 subnets
O E1    11.11.11.1 [110/85] via 10.20.20.1, 00:02:54, Serial1/0

Inspecting the output of show ip bgp vpnv4 all 192.168.20.1 in PE routers.

PE-1#sh ip bgp vpnv4 all 192.168.20.1
BGP routing table entry for 1:100:192.168.20.1/32, version 48
Paths: (1 available, best #1, table customer-a)
  Not advertised to any peer
  Refresh Epoch 1
  Local
    2.2.2.2 (metric 2) from 2.2.2.2 (2.2.2.2)
      Origin incomplete, metric 65, localpref 100, valid, internal, best
      Extended Community: RT:1:100 OSPF DOMAIN ID:0x0005:0x0000000A0200 
        OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:1.1.22.1:0
      mpls labels in/out nolabel/19

Break down of OSPF RT:0.0.0.0:2:0.
0.0.0.0: Represents OSPF area. 0.0.0.0 means Area 0
2: Represents OSPF LSA type. A value of 2 means LSA type 2
0: Represents OSPF Options used for external routes (Type 5 and 7 LSAs). A value of 1 means its external type 2.

Break down of OSPF DOMAIN ID:0x0005:0x0000000A0200.
0x0005: Represents Type field (2 bytes)
0000000A: Represents OSPF domain ID (4 bytes). Hex value of A in decimal is 10.
02: Represents OSPF LSA type (1 byte). This is a LSA type 2.
00: Represents OSPF Options (1 byte)

PE-2#sh ip bgp vpnv4 all 192.168.10.1
BGP routing table entry for 1:100:192.168.10.1/32, version 66
Paths: (1 available, best #1, table customer-a)
  Not advertised to any peer
  Refresh Epoch 1
  Local
    1.1.1.1 (metric 2) from 1.1.1.1 (1.1.1.1)
      Origin incomplete, metric 2, localpref 100, valid, internal, best
      Extended Community: RT:1:100 OSPF DOMAIN ID:0x0005:0x0000000A0200 
        OSPF RT:0.0.0.0:3:0 OSPF ROUTER ID:1.1.11.1:0
      mpls labels in/out nolabel/21
PE-2#                                
PE-2#
PE-2#
PE-2#sh ip bgp vpnv4 all 11.11.11.1  
BGP routing table entry for 1:100:11.11.11.1/32, version 64
Paths: (1 available, best #1, table customer-a)
  Not advertised to any peer
  Refresh Epoch 1
  Local
    1.1.1.1 (metric 2) from 1.1.1.1 (1.1.1.1)
      Origin incomplete, metric 21, localpref 100, valid, internal, best
      Extended Community: RT:1:100 OSPF DOMAIN ID:0x0005:0x0000000A0200 
        OSPF RT:0.0.0.0:5:0 OSPF ROUTER ID:1.1.11.1:0
      mpls labels in/out nolabel/19
PE-2#
PE-2#
PE-2#sh ip bgp vpnv4 all 22.22.22.1
BGP routing table entry for 1:100:22.22.22.1/32, version 65
Paths: (1 available, best #1, table customer-a)
  Not advertised to any peer
  Refresh Epoch 1
  Local
    1.1.1.1 (metric 2) from 1.1.1.1 (1.1.1.1)
      Origin incomplete, metric 20, localpref 100, valid, internal, best
      Extended Community: RT:1:100 OSPF DOMAIN ID:0x0005:0x0000000A0200 
        OSPF RT:0.0.0.0:5:1 OSPF ROUTER ID:1.1.11.1:0
      mpls labels in/out nolabel/22
PE-2#

Device running configurations only show the necessary lines.

PE-1

ip vrf customer-a
 rd 1:100 
 route-target export 1:100
 route-target import 1:100
!
mpls label protocol ldp
no mpls ip propagate-ttl forwarded
!
interface Loopback1
 ip address 1.1.1.1 255.255.255.255
!
interface Loopback10
 ip vrf forwarding customer-a
 ip address 1.1.11.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.1.1.1 255.255.255.252
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet0/1
 description customer a
 ip vrf forwarding customer-a
 ip address 10.10.10.1 255.255.255.252
 duplex auto
 speed auto
!
router ospf 10 vrf customer-a
 router-id 1.1.11.1
 redistribute bgp 1 subnets
 network 10.10.10.1 0.0.0.0 area 0
!
router ospf 1
 router-id 1.1.1.1
 network 1.1.1.1 0.0.0.0 area 0
 network 10.1.1.1 0.0.0.0 area 0
!
router rip
!
router bgp 1
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 1
 neighbor 2.2.2.2 update-source Loopback1
 !
 address-family vpnv4
  neighbor 2.2.2.2 activate
  neighbor 2.2.2.2 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf customer-a
  redistribute connected
  redistribute ospf 10 match internal external 1 external 2
 exit-address-family
!
mpls ldp router-id Loopback1

PE-2

ip vrf customer-a
 rd 1:100 
 route-target export 1:100
 route-target import 1:100
!
multilink bundle-name authenticated
no mpls ip propagate-ttl forwarded
!
interface Loopback1
 ip address 2.2.2.2 255.255.255.255
!
interface Loopback2
 ip vrf forwarding customer-a
 ip address 1.1.22.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.1.1.2 255.255.255.252
 duplex auto
 speed auto
 mpls ip
!
interface Serial1/0
 description customer a
 ip vrf forwarding customer-a
 ip address 10.20.20.1 255.255.255.252
 serial restart-delay 0
!
router ospf 10 vrf customer-a
 router-id 1.1.22.1
 redistribute bgp 1 subnets
 network 10.20.20.1 0.0.0.0 area 0
!
router ospf 1
 router-id 2.2.2.2
 network 2.2.2.2 0.0.0.0 area 0
 network 10.1.1.2 0.0.0.0 area 0
!
router rip
!
router bgp 1
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 update-source Loopback1
 !
 address-family vpnv4
  neighbor 1.1.1.1 activate
  neighbor 1.1.1.1 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf customer-a
  redistribute connected
  redistribute ospf 10 match internal external 1 external 2
 exit-address-family
!
mpls ldp router-id Loopback1

CE-1

interface Loopback1
 ip address 192.168.10.1 255.255.255.0
!
interface Loopback2
 ip address 11.11.11.1 255.255.255.255
!
interface Loopback3
 ip address 22.22.22.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.10.10.2 255.255.255.252
 duplex auto
 speed auto
!
router eigrp 1
 network 22.22.22.1 0.0.0.0
 no auto-summary
!
router ospf 10
 log-adjacency-changes
 redistribute rip metric-type 1 subnets
 redistribute eigrp 1 subnets
 network 10.10.10.2 0.0.0.0 area 0
 network 192.168.10.1 0.0.0.0 area 1
!
router rip
 version 2
 network 11.0.0.0
 no auto-summary

CE-2

interface Loopback1
 ip address 192.168.20.1 255.255.255.0
!
interface Serial1/0
 ip address 10.20.20.2 255.255.255.252
 serial restart-delay 0
!
router ospf 10
 log-adjacency-changes
 network 10.20.20.2 0.0.0.0 area 0
 network 192.168.20.1 0.0.0.0 area 0

Rejohn Ronald Cuares

He is Network Engineer working in one of the Managed Service Providers in Brisbane, Australia. His role as an engineer spans across multiple technologies like Unified Communications, Security, Wireless and Routing/Switching. He loves learning new things that makes his job fun and interesting.

Latest posts by Rejohn Ronald Cuares (see all)

1 comment to MPLS VPN: Same OSPF Domain ID

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

*