We have completed the upgrade of IEOC! All posts, comments and user profiles have been migrated. For security reasons, we have reset all passwords. To set a new password please Click Here. Further updates soon to follow.

redistribute external ospf in L3VPN

Hello,

Scenerio: 

CE is redistributing static to OSPF, then PE-CE router is redistributing ospf internal and external into MP-BGP, on the other site on PE-CE checking routes i see on RT extended communities area 0.0.0.0 while for intar routes i see area of 0.0.0.1? Why?

R6#sh bgp vpnv4 un vrf VPN_A  155.2.0.0

BGP routing table entry for 100:1:155.2.0.0/16, version 86

Paths: (1 available, best #1, table VPN_A)

  Not advertised to any peer

  Refresh Epoch 3

  Local

    150.1.5.5 (metric 3) (via default) from 150.1.4.4 (150.1.4.4)

      Origin incomplete, metric 20, localpref 100, valid, internal, best

      Extended Community: RT:100:1 OSPF DOMAIN ID:0x0005:0x000000050200 

        OSPF RT:0.0.0.0:5:1 OSPF ROUTER ID:172.16.5.5:0

      Originator: 150.1.5.5, Cluster list: 150.1.4.4

      mpls labels in/out nolabel/17

      rx pathid: 0, tx pathid: 0x0

R6#sh bgp vpnv4 un vrf VPN_A  155.1.8.0

BGP routing table entry for 100:1:155.1.8.0/24, version 76

Paths: (1 available, best #1, table VPN_A)

  Not advertised to any peer

  Refresh Epoch 3

  Local

    150.1.5.5 (metric 3) (via default) from 150.1.4.4 (150.1.4.4)

      Origin incomplete, metric 2, localpref 100, valid, internal, best

      Extended Community: RT:100:1 OSPF DOMAIN ID:0x0005:0x000000050200 

        OSPF RT:0.0.0.1:2:0 OSPF ROUTER ID:172.16.5.5:0

      Originator: 150.1.5.5, Cluster list: 150.1.4.4

      mpls labels in/out nolabel/29

      rx pathid: 0, tx pathid: 0x0

 

Configuration:

CE#1

router ospf 1

 summary-address 172.16.0.0 255.255.0.0

 redistribute static subnets

 network 150.1.8.8 0.0.0.0 area 1

 network 155.1.8.8 0.0.0.0 area 1

 network 155.1.58.8 0.0.0.0 area 1

 network 155.1.108.8 0.0.0.0 area 1

 network 0.0.0.0 255.255.255.255 area 1

R8#sh run | s Null

ip route 155.2.0.0 255.255.0.0 Null0

PE-CE#1

R5#sh run vrf VPN_A

Building configuration...

 

Current configuration : 750 bytes

ip vrf VPN_A

 rd 100:1

 export map VPN_A_EXPORT

 route-target export 100:1

 route-target import 100:1

 route-target import 100:66

!

!

interface GigabitEthernet1

 no ip address

 negotiation auto

 cdp enable

!

interface GigabitEthernet1.58

 encapsulation dot1Q 58

 ip vrf forwarding VPN_A

 ip address 155.1.58.5 255.255.255.0

 ipv6 address 2001:155:1:58::5/64

!

interface Loopback101

 ip vrf forwarding VPN_A

 ip address 172.16.5.5 255.255.255.0

!

router bgp 100

 !

 address-family ipv4 vrf VPN_A

  redistribute connected

  redistribute static

  redistribute ospf 100 match internal external 1 external 2

 exit-address-family

!

router ospf 100 vrf VPN_A

 domain-id 0.0.0.5

 redistribute bgp 100 subnets

 network 0.0.0.0 255.255.255.255 area 1

!

!

end

 

router bgp 100

 bgp log-neighbor-changes

 no bgp default ipv4-unicast

 neighbor 150.1.4.4 remote-as 100

 neighbor 150.1.4.4 update-source Loopback0

 !

 address-family ipv4

 exit-address-family

 !

 address-family vpnv4

  neighbor 150.1.4.4 activate

  neighbor 150.1.4.4 send-community extended

 exit-address-family

 !

 address-family ipv4 vrf VPN_A

  redistribute connected

  redistribute static

  redistribute ospf 100 match internal external 1 external 2

 exit-address-family

 !

 address-family ipv4 vrf VPN_B

  redistribute connected

  redistribute static

  redistribute rip

 exit-address-family

 

 

PE-CE#2

R6#sh run vrf VPN_A

Building configuration...

 

Current configuration : 668 bytes

ip vrf VPN_A

 rd 100:1

 route-target export 100:1

 route-target import 100:1

!

!

interface GigabitEthernet1

 no ip address

 negotiation auto

 cdp enable

!

interface GigabitEthernet1.67

 encapsulation dot1Q 67

 ip vrf forwarding VPN_A

 ip address 155.1.67.6 255.255.255.0

 ipv6 address 2001:155:1:67::6/64

!

router ospf 100 vrf VPN_A

 domain-id 0.0.0.6

 summary-address 172.16.0.0 255.255.0.0

 redistribute bgp 100 subnets

 network 0.0.0.0 255.255.255.255 area 100

!

!

router bgp 100

 !

 address-family ipv4 vrf VPN_A

  redistribute connected

  redistribute static

 exit-address-family

!

ip route vrf VPN_A 192.168.7.0 255.255.255.0 GigabitEthernet1.76 155.1.76.7

end

 

R6#sh run | s bgp

 redistribute bgp 100 subnets

  redistribute bgp 100 metric transparent

router bgp 100

 bgp log-neighbor-changes

 no bgp default ipv4-unicast

 neighbor 150.1.4.4 remote-as 100

 neighbor 150.1.4.4 update-source Loopback0

 !

 address-family ipv4

 exit-address-family

 !

 address-family vpnv4

  neighbor 150.1.4.4 activate

  neighbor 150.1.4.4 send-community extended

 exit-address-family

 !

 address-family ipv4 vrf VPN_A

  redistribute connected

  redistribute static

 exit-address-family

 !

 address-family ipv4 vrf VPN_B

  redistribute connected

  redistribute static

  redistribute rip

 exit-address-family

 

Results above? 

Comments

  • Hi,

    according to RFC 4577, the RT for an External Route indicates always area 0.0.0.0 :

    ...Area Number: 4 bytes, encoding a 32-bit area number.
    For AS-external routes, the value is 0.A non-zero value identifies the route as being internal to the OSPF domain and as being within the identified area.
    Area numbers ae relative to a particular OSPF domain...

     

    Does it answer your question?

    Francesco

                            
  • Indeed you right:

     

    "

    - OSPF Route Type Extended Community Attribute. This is encoded as
           follows:

             * Type: 0x8000

             * Area Number: 4 bytes, encoding a 32-bit area number. For AS-
               external routes, the value is 0. A non-zero value identifies
               the route as being internal to the OSPF domain, and as being
               within the identified area. Area numbers are relative to a
               particular OSPF domain.

             * OSPF Route Type: 1 byte, encoded as follows:

                 ** 1 or 2 for intra-area routes (depending on whether the
                    route came from a type 1 or a type 2 LSA -- however this
                    difference is not significant to the procedures
                    specified herein)

                 ** 3 for summary routes

                 ** 5 for external routes (area number must be 0)

                 ** 7 for NSSA routes.

             * Options: 1 byte. Currently this is only used if the route
               type is 5 or 7. Setting the least significant bit in the
               field indicates that the route carries a type 2 metric.
    "
    
    
    Thank you.
Sign In or Register to comment.