Routing

last person joined: 3 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Why OSPF external type 2 preferred over external type 1?

    Posted 04-15-2009 11:21

    I thought the OSPF external type 1 should be preferred than type 2 but the router is choosing the type 2 even with higher metric:

     

    >>> OSPF database right after I clear the neighbor:

     

    admin@Tokyo> show ospf database external extensive   
        OSPF AS SCOPE link state database
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Extern   0.0.0.0          10.14.10.1       0x80000001     9  0x22 0x709e  36
      mask 0.0.0.0
      Topology default (ID 0)
        Type: 1, Metric: 1, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
      Aging timer 00:59:50
      Installed 00:00:08 ago, expires in 00:59:51, sent 00:00:03 ago
      Last changed 00:00:08 ago, Change count: 1
    Extern   0.0.0.0          10.14.14.1       0x80000007     3  0x22 0xad73  36
      mask 0.0.0.0
      Topology default (ID 0)
        Type: 2, Metric: 100, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
      Aging timer 00:59:56
      Installed 00:00:02 ago, expires in 00:59:57, sent 00:00:02 ago
      Last changed 00:00:02 ago, Change count: 11

    admin@Tokyo> 

     

     

    >>> After few seconds:

     

    admin@Tokyo> show ospf database external extensive   
        OSPF AS SCOPE link state database
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Extern   0.0.0.0          10.14.14.1       0x80000007    15  0x22 0xad73  36
      mask 0.0.0.0
      Topology default (ID 0)
        Type: 2, Metric: 100, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
      Aging timer 00:59:44
      Installed 00:00:14 ago, expires in 00:59:45, sent 00:00:14 ago
      Last changed 00:00:14 ago, Change count: 11

    admin@Tokyo>

     



  • 2.  RE: Why OSPF external type 2 preferred over external type 1?

     
    Posted 04-15-2009 12:37

    Hi,

     

    I'm neither very familiar with OSPF nor with the JUNOS implementation, but I think that choosing a route and what's contained in the database is not more connected as to "it can only be choosen what's in the database". In your second output the T1 route isn't shown anymore, therefore I assume it has been removed. Can you please enable traceoptions for database and lsa's or packets to verify that there is or isn't an external reason for this?

     

    Best Regards

     

    Ulf



  • 3.  RE: Why OSPF external type 2 preferred over external type 1?

    Posted 04-15-2009 13:40
    I see that the prefix (default route) is being advertised by 2 different routers. One thing to look for is how the routers are being exported into OSPF. Keep inmind that normally only active routes are exported into OSPF by JUNOS. Also as you are looking at the OSPF database, this is actually before the SPF calculations are done. So no LSA type prefernces have actually been applied yet. My best guess is that the source routers are for some reason not advertising the default router. So have a look at the two routers and check what their routing tables says.


  • 4.  RE: Why OSPF external type 2 preferred over external type 1?
    Best Answer

    Posted 04-16-2009 06:30

    Thanks for the reply... You are right on the spot...

     

    The Tokyo's neighbors are learning the 0/0 from BGP then redistributed into OSPF, the neighbor which has type 1 configured has activated 0/0 in OSPF table so is not using the BGP 0/0 and not sending to Tokyo...

     

    Now, Tokyo has both type 1 and type 2 0/0 in OSPF database and using the type 1 after I added the OSPF import filter for its neighbors.

     

    Thanks for the help!



  • 5.  RE: Why OSPF external type 2 preferred over external type 1?

    Posted 07-01-2009 00:40
    I have problem same as, but i don't know how to create import filter into ospf . Can you help please


  • 6.  RE: Why OSPF external type 2 preferred over external type 1?

    Posted 07-01-2009 00:55

    i have created filter import OSPF :

    term 1 {
        from {
            external {
                type 1;
            }
        }
        then reject;
    }

     

    and it's working now

     

    Thank you so much for your advisor