1 2 Previous Next 24 Replies Latest reply: Sep 4, 2013 12:37 AM by Naren Go to original post RSS
      • 15. Re: OSPF External Routes Selection (E1 vs N1)
        Mohit Kansal  CCIE RS

        untitled11.bmp

         

        Hi Guys,

         

        To confirm all the points, i configured a lab with 5 routers R1,R2, R7, R8 and R9 as in the above topology.

         

        Step 1:

         

        On R8, i redstributed Loopback 0 interface in the OSPF by using "redstibute connected" command with metric-type 1. As, R2 and R9 both are acting as ABR for area 6, the type 7 to type 5 LSA translation will be performed by the router which has higher router id. In this case router 9 has router-id 9.9.9.9 and R2 has 2.2.2.2. So, translation is done by R9 and will advertise the route as E1 in area 0. Now R2 which is acting as ABR has 2 routes for network 81.0.0.0, one as N1 route advertised by R8 and other as E1 route translated by R9. Both have same metric. When i checked routing table on R2, it gave preference to E1 over N1 and put E1 route in the routing table as below:

         

         

        R2#sh ip ospf database external 81.0.0.0

                    OSPF Router with ID (2.2.2.2) (Process ID 10)

                        Type-5 AS External Link States

          Routing Bit Set on this LSA
          LS age: 353
          Options: (No TOS-capability, DC)
          LS Type: AS External Link
          Link State ID: 81.0.0.0 (External Network Number )
          Advertising Router: 9.9.9.9
          LS Seq Number: 80000001
          Checksum: 0x51EC
          Length: 36
          Network Mask: /8
                Metric Type: 1 (Comparable directly to link state metric)
                TOS: 0
               Metric: 20
               
        Forward Address: 172.30.156.6
                External Route Tag: 0

         

        R2#sh ip ospf database nssa-external 81.0.0.0

                    OSPF Router with ID (2.2.2.2) (Process ID 10)

                        Type-7 AS External Link States (Area 6)

          LS age: 1804
          Options: (No TOS-capability, Type 7/5 translation, DC)
          LS Type: AS External Link
          Link State ID: 81.0.0.0 (External Network Number )
          Advertising Router: 8.8.8.8
          LS Seq Number: 80000001
          Checksum: 0xDA5D
          Length: 36
          Network Mask: /8
                Metric Type: 1 (Comparable directly to link state metric)
                TOS: 0
                Metric: 20
                Forward Address: 172.30.156.6
                External Route Tag: 0

         

        O E1 81.0.0.0/8 [110/148] via 172.30.156.10, 00:05:39, Serial0/0.208

         

        We can see the metric and forwarding address is same for nssa-external and external and preference has been given to the E1 as expected.

         

        Step 2:

         

        Then I configured the same network 81.0.0.0 as loopback 0 on router 7 also and redstributed that in OSPF. Then i activated the link b/w R2 and R7 as shown in blue in the topology and put that also in area 6 and i stopped R9 from doing translation from R7 to R5 by using not-advertise command. Now, R2 has 2 routes to network 81.0.0.0, both are N1, one advertised by R8 and other by R7 and got output as expected:

         

        O N1 81.0.0.0/8 [110/148] via 172.30.156.14, 00:00:07, Serial0/0.207
                        [110/148] via 172.30.156.10, 00:00:07, Serial0/0.208

         

        R2 load balanced the link and used both the routes.

         

         

        So, what could i undersatnd from all this is:

         

        Final Summary:

         

        1) N1 and E1 will be prefered over N2 and E2

        2) When N1 & E1 have the same route to the destination, The one that have lower cost / Metric will win and get into the route table

        3) If both N1 & E1 have the same cost, E1 will be prefered over N1 whatever the value of P is?

        4) If both routes are N1, the route with p=1 will be prefered over p=0

        5) If value of P is also same , then routes will be load balanced and both will be used.

         

        Point 4, i have marked in red because i could not confirm this and not sure about it. Whenever we redstribute a network in NSSA, value of P is set to 1 automatically. I tried but did not find any command to change the value to 0. Could you please tell me the command to change value of P.

        • 16. Re: OSPF External Routes Selection (E1 vs N1)
          Krzysztof Przybylski

          Hi,

           

          Very nice investigation & topology!

           

          I've made quite similar "N1-E1 lab", but with ASBRs

           

          I think that point 4 is wrong, because p-bit =1 informs the NSSA_ABR router that packet needs to be translated into area 0 as LSA 5.

          So every N route has got p-bit = 1

          So, in my opinion there is no posiblity to experince N route with p-bit = 0, because p-bit=1 means N route - its the same ----> if p-bit = 0 then we have E route.

           

          Below our magic p-bit from my topo:

          krzysztof przybylski - ospf N route.jpg

           

          Regards

          Pozdrawiam

           

          Krzysztof

          • 17. Re: OSPF External Routes Selection (E1 vs N1)
            Mohit Kansal  CCIE RS

            Hi Krzysztof,

             

            You are right. I also have same understanding about P bit. As much i know, it is used to decide whether the route should be translated to type-5 or not. But yesterday i went through an RFC and i found the same as mentioned by Scott and Cliff that it is going to be tie breaker when both the routes are N1 or N2 and have same metric.

             

            But, i could not verify this because i don't know the command to change the value of P.

            • 18. Re: OSPF External Routes Selection (E1 vs N1)
              Cliff Lo

              Thanks for taking my question seriously and put it into such detail investigation. Base on your investigation, I would think that Cisco router / IOS are still using RFC1587 as their guilde when performing the NSSA & External route selection.

               

              best regards,

              Cliff Lo

              • 19. Re: OSPF External Routes Selection (E1 vs N1)
                Eugene Khabarov

                Hi All! Sorry for bringing up old topic, but this theme made me worry.

                I've performed some testing with sample topology to prove RFC3101 operation on IOS and spotted some strange behavior. I hope somebody can explain this.

                Here is my topology:

                And here is configuration:

                 

                R1:

                 

                interface Loopback0

                ip address 1.1.1.1 255.255.255.255

                ip ospf 1 area 1

                !

                interface FastEthernet0/0

                ip address 10.10.31.1 255.255.255.0

                ip ospf 1 area 1

                duplex auto

                speed auto

                !

                interface FastEthernet0/1

                ip address 10.10.14.1 255.255.255.0

                ip ospf 1 area 0

                duplex auto

                speed auto

                !

                router ospf 1

                log-adjacency-changes

                no auto-cost

                area 1 nssa

                maximum-paths 3

                !

                 

                R2:

                 

                interface Loopback0

                ip address 2.2.2.2 255.255.255.255

                ip ospf 1 area 1

                !

                interface FastEthernet0/0

                ip address 10.10.32.2 255.255.255.0

                ip ospf 1 area 1

                duplex auto

                speed auto

                !

                interface FastEthernet0/1

                ip address 10.10.24.2 255.255.255.0

                ip ospf 1 area 0

                duplex auto

                speed auto

                !

                router ospf 1

                log-adjacency-changes

                no auto-cost

                area 1 nssa

                maximum-paths 3

                !

                 

                R3:

                 

                interface Loopback0

                ip address 3.3.3.3 255.255.255.255

                !

                interface FastEthernet0/0

                ip address 10.10.31.3 255.255.255.0

                ip ospf 1 area 1

                duplex auto

                speed auto

                !

                interface FastEthernet0/1

                ip address 10.10.32.3 255.255.255.0

                ip ospf 1 area 1

                duplex auto

                speed auto

                !

                router ospf 1

                log-adjacency-changes

                no auto-cost

                area 1 nssa

                redistribute connected metric 10 metric-type 1 subnets

                !

                 

                R4:

                 

                interface Loopback0

                ip address 4.4.4.4 255.255.255.255

                ip ospf 1 area 0

                !

                interface FastEthernet0/0

                ip address 10.10.14.4 255.255.255.0

                ip ospf 1 area 0

                duplex auto

                speed auto

                !

                interface FastEthernet0/1

                ip address 10.10.24.4 255.255.255.0

                ip ospf 1 area 0

                duplex auto

                speed auto

                !

                router ospf 1

                log-adjacency-changes

                no auto-cost

                maximum-paths 2

                !

                 

                And here is interesting output:

                 

                R1#sh ip ospf database external

                 

                            OSPF Router with ID (1.1.1.1) (Process ID 1)

                 

                                Type-5 AS External Link States

                 

                  Routing Bit Set on this LSA

                  LS age: 22

                  Options: (No TOS-capability, DC)

                  LS Type: AS External Link

                  Link State ID: 3.3.3.3 (External Network Number )

                  Advertising Router: 2.2.2.2

                  LS Seq Number: 80000001

                  Checksum: 0xEBF3

                  Length: 36

                  Network Mask: /32

                        Metric Type: 1 (Comparable directly to link state metric)

                        TOS: 0

                        Metric: 10

                        Forward Address: 10.10.32.3

                        External Route Tag: 0

                 

                R1#sh ip ospf database nss

                R1#sh ip ospf database nssa-external

                 

                            OSPF Router with ID (1.1.1.1) (Process ID 1)

                 

                                Type-7 AS External Link States (Area 1)

                 

                  LS age: 82

                  Options: (No TOS-capability, Type 7/5 translation, DC)

                  LS Type: AS External Link

                  Link State ID: 3.3.3.3 (External Network Number )

                  Advertising Router: 3.3.3.3

                  LS Seq Number: 80000001

                  Checksum: 0x3998

                  Length: 36

                  Network Mask: /32

                        Metric Type: 1 (Comparable directly to link state metric)

                        TOS: 0

                        Metric: 10

                        Forward Address: 10.10.32.3

                        External Route Tag: 0

                 

                R1#sh ip ro

                R1#sh ip route 3.3.3.3

                Routing entry for 3.3.3.3/32

                  Known via "ospf 1", distance 110, metric 30, type extern 1

                  Last update from 10.10.31.3 on FastEthernet0/0, 00:01:22 ago

                  Routing Descriptor Blocks:

                  * 10.10.31.3, from 2.2.2.2, 00:01:22 ago, via FastEthernet0/0

                      Route metric is 30, traffic share count is 1

                 

                R1#

                 

                 

                ----------------

                 

                R2#sh ip ospf database external

                 

                            OSPF Router with ID (2.2.2.2) (Process ID 1)

                 

                                Type-5 AS External Link States

                 

                  Delete flag is set for this LSA

                  LS age: MAXAGE(3605)

                  Options: (No TOS-capability, DC)

                  LS Type: AS External Link

                  Link State ID: 3.3.3.3 (External Network Number )

                  Advertising Router: 1.1.1.1

                  LS Seq Number: 80000002

                  Checksum: 0xA349

                  Length: 36

                  Network Mask: /32

                        Metric Type: 1 (Comparable directly to link state metric)

                        TOS: 0

                        Metric: 16777215

                        Forward Address: 10.10.32.3

                        External Route Tag: 0

                 

                  LS age: 3

                  Options: (No TOS-capability, DC)

                  LS Type: AS External Link

                  Link State ID: 3.3.3.3 (External Network Number )

                  Advertising Router: 2.2.2.2

                  LS Seq Number: 80000001

                  Checksum: 0xEBF3

                  Length: 36

                  Network Mask: /32

                        Metric Type: 1 (Comparable directly to link state metric)

                        TOS: 0

                        Metric: 10

                        Forward Address: 10.10.32.3

                        External Route Tag: 0

                 

                R2#sh ip ospf database nss

                R2#sh ip ospf database nssa-external

                 

                            OSPF Router with ID (2.2.2.2) (Process ID 1)

                 

                                Type-7 AS External Link States (Area 1)

                 

                  Routing Bit Set on this LSA

                  LS age: 89

                  Options: (No TOS-capability, Type 7/5 translation, DC)

                  LS Type: AS External Link

                  Link State ID: 3.3.3.3 (External Network Number )

                  Advertising Router: 3.3.3.3

                  LS Seq Number: 80000001

                  Checksum: 0x3998

                  Length: 36

                  Network Mask: /32

                        Metric Type: 1 (Comparable directly to link state metric)

                        TOS: 0

                        Metric: 10

                        Forward Address: 10.10.32.3

                        External Route Tag: 0

                 

                R2#sh ip ro

                R2#sh ip route 3.3.3.3

                Routing entry for 3.3.3.3/32

                  Known via "ospf 1", distance 110, metric 20, type NSSA extern 1

                  Last update from 10.10.32.3 on FastEthernet0/0, 00:01:18 ago

                  Routing Descriptor Blocks:

                  * 10.10.32.3, from 3.3.3.3, 00:01:18 ago, via FastEthernet0/0

                      Route metric is 20, traffic share count is 1

                 

                R2#

                 

                 

                -------------

                 

                 

                R4#sh ip ospf database external

                 

                            OSPF Router with ID (4.4.4.4) (Process ID 1)

                 

                                Type-5 AS External Link States

                 

                  Routing Bit Set on this LSA

                  LS age: 142

                  Options: (No TOS-capability, DC)

                  LS Type: AS External Link

                  Link State ID: 3.3.3.3 (External Network Number )

                  Advertising Router: 2.2.2.2

                  LS Seq Number: 80000001

                  Checksum: 0xEBF3

                  Length: 36

                  Network Mask: /32

                        Metric Type: 1 (Comparable directly to link state metric)

                        TOS: 0

                        Metric: 10

                        Forward Address: 10.10.32.3

                        External Route Tag: 0

                 

                R4#sh ip ro

                R4#sh ip route 3.3.3.3

                Routing entry for 3.3.3.3/32

                  Known via "ospf 1", distance 110, metric 30, type extern 1

                  Last update from 10.10.24.2 on FastEthernet0/1, 00:02:26 ago

                  Routing Descriptor Blocks:

                  * 10.10.24.2, from 2.2.2.2, 00:02:26 ago, via FastEthernet0/1

                      Route metric is 30, traffic share count is 1

                 

                R4#

                 

                ------

                 

                 

                So the question is why R1 installs E1 into routing table and R2 installs N1 into routing table? According to my understanding of the RFC3101 both will install N1 routes and than R4 will receive two type 5 LSAs and install two routes into routing table!


                 

                 

                R4#sh ip ospf database external

                 

                            OSPF Router with ID (4.4.4.4) (Process ID 1)

                 

                                Type-5 AS External Link States

                 

                  Routing Bit Set on this LSA
                  LS age: 142
                  Options: (No TOS-capability, DC)
                  LS Type: AS External Link
                  Link State ID: 3.3.3.3 (External Network Number )
                  Advertising Router: 2.2.2.2
                  LS Seq Number: 80000001
                  Checksum: 0xEBF3
                  Length: 36
                  Network Mask: /32
                        Metric Type: 1 (Comparable directly to link state metric)
                        TOS: 0
                        Metric: 10
                        Forward Address: 10.10.32.3
                        External Route Tag: 0

                 

                R4#sh ip ro
                R4#sh ip route 3.3.3.3
                Routing entry for 3.3.3.3/32
                  Known via "ospf 1", distance 110, metric 30, type extern 1
                  Last update from 10.10.24.2 on FastEthernet0/1, 00:02:26 ago
                  Routing Descriptor Blocks:
                  * 10.10.24.2, from 2.2.2.2, 00:02:26 ago, via FastEthernet0/1
                      Route metric is 30, traffic share count is 1

                 

                R4#

                 

                • 20. Re: OSPF External Routes Selection (E1 vs N1)
                  Uma

                  HI,

                   

                  How to see P bit value ?

                  • 21. Re: OSPF External Routes Selection (E1 vs N1)
                    Sey

                    How to see P bit value ?

                    Look at Options of a Type-7 LSA. If there is "No Type 7/5 translation", then P bit is 0. Otherwise it's 1.

                     

                    http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094a88.shtml#topic1

                    • 22. Re: OSPF External Routes Selection (E1 vs N1)
                      Sey

                      Hi All! Sorry for bringing up old topic, but this theme made me worry.

                      Hi Eugene, sorry for replying so late

                      So the question is why R1 installs E1 into routing table and R2 installs N1 into routing table?

                      R4#sh ip ospf database external

                       

                                  OSPF Router with ID (4.4.4.4) (Process ID 1)

                       

                                      Type-5 AS External Link States

                       

                        Routing Bit Set on this LSA
                        LS age: 142
                        Options: (No TOS-capability, DC)
                        LS Type: AS External Link
                        Link State ID: 3.3.3.3 (External Network Number )
                        Advertising Router: 2.2.2.2
                        LS Seq Number: 80000001
                        Checksum: 0xEBF3
                        Length: 36
                        Network Mask: /32
                              Metric Type: 1 (Comparable directly to link state metric)
                              TOS: 0
                              Metric: 10
                              Forward Address: 10.10.32.3
                              External Route Tag: 0

                       

                      R4#sh ip ro
                      R4#sh ip route 3.3.3.3
                      Routing entry for 3.3.3.3/32
                        Known via "ospf 1", distance 110, metric 30, type extern 1
                        Last update from 10.10.24.2 on FastEthernet0/1, 00:02:26 ago
                        Routing Descriptor Blocks:
                        * 10.10.24.2, from 2.2.2.2, 00:02:26 ago, via FastEthernet0/1
                            Route metric is 30, traffic share count is 1

                       

                      R4#

                       

                      R1 and R2 have to decide who is going to translate Type 7 LSA into Type 5. R2 has a higher RID so it wins. R2 floods a type 5 LSA for 3.3.3.3 into area 0. R1 receives the E1 and prefers it over N1 that it has directly towards R3 because E1>N1.

                       

                      Now R2 installs N1 into its routing table because it has a Type 7 LSA and the only Type 5 LSA for that prefix is generated by R2 itself.

                       

                      R4 prefers route via R2 because there is no other path to 3.3.3.3 (remember R1 is not translating Type 7 to Type 5).

                       

                      According to my understanding of the RFC3101 both will install N1 routes and than R4 will receive two type 5 LSAs and install two routes into routing table!

                      3.1 Type-7 Translator Election
                      
                         It is not recommended that multiple NSSA border routers perform
                         Type-7 to Type-5 translation unless it is required to route packets
                         efficiently through Area 0 to an NSSA partitioned by Type-7 address
                         ranges.  It is normally sufficient to have only one NSSA border
                         router perform the translation.  Excessive numbers of Type-7
                         translators unnecessarily increase the size of the OSPF link state
                         data base.
                      • 23. Re: OSPF External Routes Selection (E1 vs N1)
                        Uma

                        Thanks,,

                        • 24. Re: OSPF External Routes Selection (E1 vs N1)
                          Naren

                          Is it possible to have same prefix learned as E1 & N1 in same Router ? N1 are seen in NSSA where E1 are not allowed.

                           

                          You might see an E1 in the ABR (due to N1 to E1 conversion). So which router actually uses the election process mentioned in your question. I do not see a potential point where any router would have to choose between a N1 and E1.

                           

                          Please help to understand.

                          1 2 Previous Next