BGP routes not getting redistributed in OSPF VRF in MPLS VPN environment

HI,

I have a secnario where CE1 - PE1  - VPNV4 cloud  - PE2 - CE2

CE1 has vrf A ospf process id 102  and vrf B process id 201.

CE2 has vrf A ospf process id 102  and vrf B process id 401.

 

I can see that PE1 has CE2 routes in the vrf A table and Pe2 has CE 1 routes in the respective VRF tables and in the genral vpnv4 table. Therefore I can conclude that OSPF to bgp redistribution configured in respective vrfs are working but bgp to ospf redistrbution is not.

I may be missing something . Any help is appreciated.

I have pasted  the configurations and out put for reference.

 

Regards

Kaustav

hostname PE1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
ip vrf A
 rd 10:10
 route-target export 10:10
 route-target import 14:14
!
ip vrf B
 rd 11:11
 route-target export 11:11
 route-target import 15:15

!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Loopback102
 ip vrf forwarding A
 ip address 102.102.102.102 255.255.255.255
!
interface Loopback103
 ip vrf forwarding B
 ip address 103.103.103.103 255.255.255.255
!
interface Loopback200
 ip vrf forwarding A
 ip address 200.200.200.200 255.255.255.255
!
interface Loopback201
 ip vrf forwarding B
 ip address 201.201.201.201 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.1
 encapsulation dot1Q 1 native
 ip vrf forwarding A
 ip address 150.2.1.2 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0.2
 encapsulation dot1Q 2
 ip vrf forwarding B
 ip address 160.2.1.2 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 150.2.3.2 255.255.255.0
 serial restart-delay 0
!
interface Serial1/1
 ip address 150.2.4.2 255.255.255.0
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router ospf 102 vrf A
 router-id 102.102.102.102
 domain-id 200.200.200.200
 log-adjacency-changes
 redistribute bgp 64908 metric 20 subnets
 network 150.2.1.2 0.0.0.0 area 0
!
router ospf 201 vrf B
 router-id 201.201.201.201
 log-adjacency-changes
 redistribute bgp 64908 metric 20 subnets
 network 160.2.1.2 0.0.0.0 area 0
!
router ospf 100
 mpls ldp autoconfig
 router-id 2.2.2.2
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
router bgp 64908
 bgp router-id 2.2.2.2
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 4.4.4.4 remote-as 64908
 neighbor 4.4.4.4 update-source Loopback0
 !
 address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community both
  neighbor 4.4.4.4 next-hop-self
 exit-address-family
 !
 address-family ipv4 vrf B
  redistribute ospf 201 vrf B match internal external 1 external 2 nssa-external 1 nssa-external 2
  no synchronization
 exit-address-family
 !
 address-family ipv4 vrf A
  redistribute ospf 102 vrf A match internal external 1 external 2 nssa-external 1 nssa-external 2
  no synchronization
 exit-address-family
!
no ip http server
ip forward-protocol nd
!
!
!PE1#sh ip route vrf A

Routing Table: A
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

     102.0.0.0/32 is subnetted, 1 subnets
C       102.102.102.102 is directly connected, Loopback102
     200.200.200.0/32 is subnetted, 1 subnets
C       200.200.200.200 is directly connected, Loopback200
     155.155.0.0/32 is subnetted, 1 subnets
B       155.155.155.155 [200/2] via 4.4.4.4, 00:17:07
     111.0.0.0/32 is subnetted, 1 subnets
O       111.111.111.111 [110/2] via 150.2.1.1, 00:17:39, FastEthernet0/0.1
     150.2.0.0/24 is subnetted, 1 subnets
C       150.2.1.0 is directly connected, FastEthernet0/0.1
     150.4.0.0/24 is subnetted, 1 subnets
B       150.4.5.0 [200/0] via 4.4.4.4, 00:17:11
PE1#

R2#sh ip bgp vpnv4 all
BGP table version is 39, local router ID is 2.2.2.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: 10:10 (default for vrf A)
*> 111.111.111.111/32
                    150.2.1.1                2         32768 ?
*> 150.2.1.0/24     0.0.0.0                  0         32768 ?
*>i150.4.5.0/24     4.4.4.4                  0    100      0 ?
*>i155.155.155.155/32
                    4.4.4.4                  2    100      0 ?
Route Distinguisher: 11:11 (default for vrf B)
*> 122.122.122.122/32
                    160.2.1.1                2         32768 ?
*>i152.152.152.152/32
                    4.4.4.4                  2    100      0 ?
*> 160.2.1.0/24     0.0.0.0                  0         32768 ?
*>i160.4.5.0/24     4.4.4.4                  0    100      0 ?
Route Distinguisher: 14:14
*>i150.4.5.0/24     4.4.4.4                  0    100      0 ?
*>i155.155.155.155/32
   Network          Next Hop            Metric LocPrf Weight Path
                    4.4.4.4                  2    100      0 ?
Route Distinguisher: 15:15
*>i152.152.152.152/32
                    4.4.4.4                  2    100      0 ?
*>i160.4.5.0/24     4.4.4.4                  0    100      0 ?
PE1#

**********************************************************************************************************************

hostname PE2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
ip vrf A
 rd 14:14
 route-target export 14:14
 route-target import 10:10
!
ip vrf B
 rd 15:15
 route-target export 15:15
 route-target import 11:11
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Loopback104
 ip vrf forwarding A
 ip address 104.104.104.104 255.255.255.255
!
interface Loopback105
 ip vrf forwarding B
 ip address 105.105.105.105 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.1
 encapsulation dot1Q 1 native
 ip vrf forwarding A
 ip address 150.4.5.4 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0.2
 encapsulation dot1Q 2
 ip vrf forwarding B
 ip address 160.4.5.4 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 description keep it shut
 ip address 150.2.4.4 255.255.255.0
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 ip address 150.3.4.4 255.255.255.0
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router ospf 102 vrf A
 domain-id 200.200.200.200
 log-adjacency-changes
 redistribute bgp 64908 metric 20 subnets
 network 150.4.5.4 0.0.0.0 area 0
!
router ospf 401 vrf B
 router-id 105.105.105.105
 log-adjacency-changes
 redistribute bgp 64908 metric 20 subnets
 network 160.4.5.4 0.0.0.0 area 0
!
router ospf 100
 mpls ldp autoconfig
 router-id 4.4.4.4
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
router bgp 64908
 bgp router-id 4.4.4.4
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 64908
 neighbor 2.2.2.2 update-source Loopback0
 !
 address-family vpnv4
  neighbor 2.2.2.2 activate
  neighbor 2.2.2.2 send-community extended
  neighbor 2.2.2.2 next-hop-self
 exit-address-family
 !
 address-family ipv4 vrf B
  redistribute ospf 401 vrf B match internal external 1 external 2 nssa-external 1 nssa-external 2
  no synchronization
 exit-address-family
 !
 address-family ipv4 vrf A
  redistribute ospf 102 vrf A match internal external 1 external 2 nssa-external 1 nssa-external 2
  no synchronization
 exit-address-family
!
no ip http server
ip forward-protocol nd
!
!
!
!
!
!
PE2#sh ip bgp vpnv4 all
BGP table version is 39, local router ID is 4.4.4.4
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: 10:10
*>i111.111.111.111/32
                    2.2.2.2                  2    100      0 ?
*>i150.2.1.0/24     2.2.2.2                  0    100      0 ?
Route Distinguisher: 11:11
*>i122.122.122.122/32
                    2.2.2.2                  2    100      0 ?
*>i160.2.1.0/24     2.2.2.2                  0    100      0 ?
Route Distinguisher: 14:14 (default for vrf A)
*>i111.111.111.111/32
                    2.2.2.2                  2    100      0 ?
*>i150.2.1.0/24     2.2.2.2                  0    100      0 ?
*> 150.4.5.0/24     0.0.0.0                  0         32768 ?
*> 155.155.155.155/32
                    150.4.5.5                2         32768 ?
Route Distinguisher: 15:15 (default for vrf B)
*>i122.122.122.122/32
   Network          Next Hop            Metric LocPrf Weight Path
                    2.2.2.2                  2    100      0 ?
*> 152.152.152.152/32
                    160.4.5.5                2         32768 ?
*>i160.2.1.0/24     2.2.2.2                  0    100      0 ?
*> 160.4.5.0/24     0.0.0.0                  0         32768 ?
PE2#

***************************************************************************************************************

Comments

  • Aren't the OSPF processes ID suposed to match on each of PE routers?  if they do not you need to set a common domain ID otherwise I thinks OSPF routes seen as external.  Also can you display the routing tables on the respective CE routers.  Clearly you not going to redistributed routes on the PE.

     

    HTH

  • if you have multiple vrfs configured on the CEs, have you configured vrf lite capability?

  • if you have multiple vrfs configured on the CEs, have you configured vrf lite capability?

    Yes you are right! Also having different domain ids as some platforms do not support this feature - the following thread has some good coverage - http://ieoc.com/forums/p/7425/29015.aspx

    I guess another solution would be not to run vrf lite on the CE - as the CE is dropping the routes as it acts as PE thus discarding all routes with the down bit set.

     

     

Sign In or Register to comment.