MPLS VPN: Different OSPF Domain ID

Posted by
Facebooktwitterredditpinterestlinkedintumblr

As I mentioned in this post MPLS VPN: Same OSPF Domain ID, OSPF domain ID is the same with OSPF process ID by default. By altering the domain ID or process ID, it also alters the behaviour of the OSPF routes. So the rule is if the domain IDs are different on the PE routers for sites in same VPN, OSPF routes are seen as OSPF external routes (Type 5 OSPF LSA). The disadvantage of this is not able 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:
different ospf domain id
Note: OSPF domain ID is different on both PE-1 and PE-2.

Notice what happens on the external routes on CE-1 and CE-2 when the OSPF domain ID was changed on PE-2. All routes are changed to OSPF External type 2 (O E2).

CE-3#
CE-3#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:05:30, 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
     10.0.0.0/30 is subnetted, 2 subnets
O E2    10.20.20.0 [110/1] via 10.10.10.1, 00:02:15, 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

CE-4#   
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:01:18, Serial1/0
     192.168.10.0/32 is subnetted, 1 subnets
O E2    192.168.10.1 [110/2] via 10.20.20.1, 00:01:18, 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:01:18, 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 E2    10.10.10.0 [110/1] via 10.20.20.1, 00:01:18, Serial1/0
     11.0.0.0/32 is subnetted, 1 subnets
O E2    11.11.11.1 [110/21] via 10.20.20.1, 00:01:18, Serial1/0

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

Leave a Reply

Your email address will not be published. Required fields are marked *

*