Routing

Expand all | Collapse all

export rip into ospf and OSPF E2 vs. N2

Jump to Best Answer
  • 1.  export rip into ospf and OSPF E2 vs. N2

    Posted 01-19-2020 16:45

    N2-2.PNG

    R13 and vMX8 have RIP configured. 

    root@vMX8# show policy-options | display set
    set policy-options policy-statement Exp2OSPF term 1 from protocol rip
    set policy-options policy-statement Exp2OSPF term 1 then accept
    set policy-options policy-statement ExpRIP term t1 from protocol rip
    set policy-options policy-statement ExpRIP term t1 then accept
    set policy-options policy-statement ExpRIP term t2 from protocol direct
    set policy-options policy-statement ExpRIP term t2 from route-filter 172.31.20.0/28 exact
    set policy-options policy-statement ExpRIP term t2 then accept
    
    set protocols ospf export Exp2OSPF
    set protocols ospf area 0.0.0.2 nssa
    set protocols ospf area 0.0.0.2 interface lo0.0
    set protocols ospf area 0.0.0.2 interface ge-0/0/0.0
    set protocols ospf area 0.0.0.2 interface ge-0/0/2.0
    
    set protocols rip group rip-group export ExpRIP
    set protocols rip group rip-group neighbor ge-0/0/1.0
    
    

    On vMX5

    root@vMX5# run show ospf route | match 13.13.13.13
    13.13.13.13/32     Ext2  Network    IP            2 ge-0/0/0.0    192.168.20.8
    root@vMX5# run show ospf route | match 172
    
    [edit]
    
    

    172.31.20.0 is not exported to OSPF.  (But when I use cisco  for all the routers, R5 will see 172.31.20.0)

    On cisco

    R5#show ip route | i 13.13.13.13
    O N2 13.13.13.13 [110/20] via 192.168.20.8, 00:41:53, Ethernet0/0

     

    On vMX5
    root@vMX5# run show ospf route | match 13.13.13.13
    13.13.13.13/32 Ext2 Network IP 2 ge-0/0/0.0 192.168.20.8

     

    Does Juniper use N2 ?

     

    thanks in advance !!

     

     

     

     



  • 2.  RE: export rip into ospf and OSPF E2 vs. N2

    Posted 01-20-2020 00:27

    Hello,

     

    First things first - I highly recommend Walter Goralski's book https://www.amazon.com/Juniper-Cisco-Routing-Protocols-Multivendor/dp/0471215929 if You study multivendor routing. Without it, You'd be scratching Your head every time You see something like this and waiting for ages for someone to come to Your rescue.

     

    Moving on:

     


    @gongyayu wrote:

     

    172.31.20.0 is not exported to OSPF.  (But when I use cisco  for all the routers, R5 will see 172.31.20.0)

     

    This is expected, Cisco IOS does consider the subnets covered by "router rip; network BLAH-BLAH" statement as RIP routes, JUNOS does not.

     

     


    @gongyayu wrote:

     

    On vMX5
    root@vMX5# run show ospf route | match 13.13.13.13
    13.13.13.13/32 Ext2 Network IP 2 ge-0/0/0.0 192.168.20.8

     

    Does Juniper use N2 ?

     

     

    Yes it does. Please supply following printouts from vMX5:

     

    show route protocol ospf extensive | no-more
    show ospf database extensive | no-more

    HTH

    Thx

    Alex



  • 3.  RE: export rip into ospf and OSPF E2 vs. N2

    Posted 01-20-2020 07:19

    thanks so much !   The following is the output.

    root@vMX5# run show route protocol ospf extensive | no-more
    
    inet.0: 24 destinations, 24 routes (24 active, 0 holddown, 0 hidden)
    ...............
    13.13.13.13/32 (1 entry, 1 announced)
    TSI:
    KRT in-kernel 13.13.13.13/32 -> {192.168.20.8}
            *OSPF   Preference: 150
                    Next hop type: Router, Next hop index: 565
                    Address: 0x940e380
                    Next-hop reference count: 6
                    Next hop: 192.168.20.8 via ge-0/0/0.0, selected
                    Session Id: 0x4
                    State: <Active Int Ext>
                    Age: 15:18:18   Metric: 2
                    Validation State: unverified
                            Tag: 0
                    Task: OSPF
                    Announcement bits (1): 0-KRT
                    AS path: I
    
    root@vMX5# run show ospf database extensive | no-more | find 13.13.13.13
    NSSA     13.13.13.13      8.8.8.8          0x80000013  1262  0x28 0xc25f  36
      mask 255.255.255.255
      Topology default (ID 0)
        Type: 2, Metric: 2, Fwd addr: 8.8.8.8, Tag: 0.0.0.0
      Aging timer 00:38:58
      Installed 00:20:59 ago, expires in 00:38:58
      Last changed 15:21:07 ago, Change count: 1
        OSPF AS SCOPE link state database
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Extern   0.0.0.0          3.3.3.3          0x80000032  2969  0x22 0x4431  36
    


  • 4.  RE: export rip into ospf and OSPF E2 vs. N2
    Best Answer

    Posted 01-20-2020 07:30

    Hello,

     


    @gongyayu wrote:
    root@vMX5# run show ospf database extensive | no-more | find 13.13.13.13
    NSSA     13.13.13.13      8.8.8.8          0x80000013  1262  0x28 0xc25f  36
      mask 255.255.255.255
      Topology default (ID 0)
        Type: 2, Metric: 2, Fwd addr: 8.8.8.8, Tag: 0.0.0.0
      Aging timer 00:38:58
      Installed 00:20:59 ago, expires in 00:38:58
      Last changed 15:21:07 ago, Change count: 1
        OSPF AS SCOPE link state database
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Extern   0.0.0.0          3.3.3.3          0x80000032  2969  0x22 0x4431  36
    

     

    I guess the above answers Your question.

    NSSA Type 2 is what CSCO calls OSPF N2.

    HTH

    Thx

    Alex

     



  • 5.  RE: export rip into ospf and OSPF E2 vs. N2

    Posted 01-20-2020 08:45

    EX2 and N2 calculates metrics differently, right ?  

    I have not looked into the metrics on this route yet. will do it to see whether any difference between Cisco and Juniper.

    thanks a lot !!



  • 6.  RE: export rip into ospf and OSPF E2 vs. N2

    Posted 01-20-2020 09:14

    Hello,

     


    @gongyayu wrote:

    EX2 and N2 calculates metrics differently, right ?  

     


     

    Wrong. RFC 3101 section 2.3 says https://tools.ietf.org/html/rfc3101 :

     

     

       The metrics and path types of Type-5 LSAs are directly comparable
       with the metrics and path types of Type-7 LSAs.

     

    HTH

    Thx

    Alex



  • 7.  RE: export rip into ospf and OSPF E2 vs. N2

    Posted 01-20-2020 09:34

    thanks so much to correct me !!