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.  the ospf export issue

    Posted 06-02-2011 02:14

     

    Hi,all,

    I want to redistribute the static route into ospf database,howerver I can not see any thing in my OPSF peer,and the script as:

    set policy-options policy-statement OSPF term 1 from instance VR

    set policy-options policy-statement OSPF term 1 from protocol static

    set policy-options policy-statement OSPF term 1 from route-filter 1.1.1.1/32 exact

    set policy-options policy-statement OSPF term 1 then metric 11

    set policy-options policy-statement OSPF term 1 then external type 1

    set policy-options policy-statement OSPF term 1 then accept

    set policy-options policy-statement OSPF term 2 from instance VR

    set policy-options policy-statement OSPF term 2 from protocol static

    set policy-options policy-statement OSPF term 2 from route-filter 2.2.2.2/32 exact

    set policy-options policy-statement OSPF term 2 then metric 50

    set policy-options policy-statement OSPF term 2 then external type 1

    set policy-options policy-statement OSPF term 2 then accept

    set policy-options policy-statement OSPF term 3 from protocol static

    set policy-options policy-statement OSPF term 3 from route-filter 0.0.0.0/0 exact

    set policy-options policy-statement OSPF term 3 then metric 100

    set policy-options policy-statement OSPF term 3 then accept

    set routing-instances VR protocols ospf export OSPF

     

    however,I change the "policy-options" ,and then I can see the static route in my OSPF peer,as:

    set policy-options policy-statement OSPF term 1 from instance VR

    set policy-options policy-statement OSPF term 1 from protocol static

    set policy-options policy-statement OSPF term 1 from route-filter 1.1.1.1/32 exact

    set policy-options policy-statement OSPF term 1 then metric 11

    set policy-options policy-statement OSPF term 1 then external type 1

    set policy-options policy-statement OSPF term 1 then accept

    set policy-options policy-statement OSPF-2 term 2 from instance VR

    set policy-options policy-statement OSPF-2 term 2 from protocol static

    set policy-options policy-statement OSPF-2 term 2 from route-filter 2.2.2.2/32 exact

    set policy-options policy-statement OSPF-2 term 2 then metric 50

    set policy-options policy-statement OSPF-2 term 2 then external type 1

    set policy-options policy-statement OSPF-2 term 2 then accept

    set policy-options policy-statement OSPF-3 from protocol static

    set policy-options policy-statement OSPF-3 from route-filter 0.0.0.0/0 exact

    set policy-options policy-statement OSPF-3 then metric 100

    set policy-options policy-statement OSPF-3 then accept

    set routing-instances VR protocols ospf export OSPF

    set routing-instances VR protocols ospf export OSPF-2

    set routing-instances VR protocols ospf export OSPF-3

     

    why the first script can not do this?

    thank you.



  • 2.  RE: the ospf export issue

    Posted 06-02-2011 08:03

    Hello,

    Looks fine, but why do you use the "from instance VR" statement? This is usually used to export routes between routing-instances, which is not your case.

    Try to write the same policy but without "from instance VR" statement.



  • 3.  RE: the ospf export issue

    Posted 06-02-2011 18:53

    hi,dpapana,

    thank you fro your response.I try to delete "from instance VR" statement,however,the issue still here.besides,I will be do the more instance on my router.and my router is J-2320,JUNOS 9.5R4.3,you can check my log.the topology is:

    R1(ge-0/0/0)-----------(ge-0/0/0)R2,both the ge-0/0/0 running OSPF,thank you.

    Attachment(s)

    txt
    R2.txt   49 KB 1 version
    txt
    r1.txt   33 KB 1 version


  • 4.  RE: the ospf export issue
    Best Answer

     
    Posted 06-04-2011 03:43

    Hi,

     

    From your logs "R2.txt", it appears you may have missed to apply a explicit "accept" action for "term 2".  And since there is no defaulr route 0/0 in VR.inet.0 table, you don't see this route (matched under "term 3") being advertised to peer router.

     

    Regards

    Surya Prakash

    If you feel I answered your query, please accept it as solution.

    In case you liked this, kudos would be appreciated.

     

     

    This is from your R2.txt file:

     

    [edit]
    juniper@R2# set policy-options policy-statement OSPF term 2 from instance VR

    [edit]
    juniper@R2# set policy-options policy-statement OSPF term 2 from protocol static

    [edit]
    juniper@R2# set policy-options policy-statement OSPF term 2 from route-filter 2.2.2.2/32 exact

    [edit]
    juniper@R2# set policy-options policy-statement OSPF term 2 then metric 50

    [edit]
    juniper@R2# set policy-options policy-statement OSPF term 3 then accept                                  <<<< MAY BE A TYPO SHOULD HAVE BEEN "term 2"

    [edit]
    juniper@R2# set policy-options policy-statement OSPF term 3 from instance VR

    [edit]
    juniper@R2# set policy-options policy-statement OSPF term 3 from protocol static

    [edit]
    juniper@R2# set policy-options policy-statement OSPF term 3 from route-filter 0.0.0.0/0 exact

    [edit]
    juniper@R2# set policy-options policy-statement OSPF term 3 then metric 144

    [edit]
    juniper@R2# set policy-options policy-statement OSPF term 3 then accept

    [edit]
    juniper@R2#

    [edit]
    juniper@R2# show policy-options | display set
    set policy-options policy-statement OSPF term 1 from instance VR
    set policy-options policy-statement OSPF term 1 from protocol static
    set policy-options policy-statement OSPF term 1 from route-filter 1.1.1.1/32 exact
    set policy-options policy-statement OSPF term 1 then metric 11
    set policy-options policy-statement OSPF term 1 then accept
    set policy-options policy-statement OSPF term 2 from instance VR
    set policy-options policy-statement OSPF term 2 from protocol static
    set policy-options policy-statement OSPF term 2 from route-filter 2.2.2.2/32 exact
    set policy-options policy-statement OSPF term 2 then metric 50                             <<<<< NO ACCEPT ACTION DEFINED FOR "term 2"
    set policy-options policy-statement OSPF term 3 from instance VR
    set policy-options policy-statement OSPF term 3 from protocol static
    set policy-options policy-statement OSPF term 3 from route-filter 0.0.0.0/0 exact
    set policy-options policy-statement OSPF term 3 then metric 144
    set policy-options policy-statement OSPF term 3 then accept

    [edit]
    juniper@R2# commit
    commit complete

    [edit]
    juniper@R2#

    [edit]
    juniper@R2# run show ospf database instance VR

        OSPF database, Area 0.0.0.0
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Router   1.1.1.1          1.1.1.1          0x80000005   643  0x22 0x7567  48
    Router   10.1.1.1         10.1.1.1         0x8000000e   542  0x22 0x9c25  48
    Router   10.1.1.2         10.1.1.2         0x8000000c   634  0x22 0xb807  48
    Router   12.1.1.1         12.1.1.1         0x80000012    14  0x22 0x3c8a  48
    Router  *12.1.1.2         12.1.1.2         0x8000001b    13  0x22 0x2495  48
        OSPF AS SCOPE link state database
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
    Extern  *1.1.1.1          12.1.1.2         0x80000001   274  0x22 0xb9d9  36               <<<< AND SINCE 0/0 ROUTE IS NOT AVAILABLE IN VR.inet.0, YOU SEE ONLY 1.1.1.1 being advertised.

    [edit]
    juniper@R2# runs
                ^
    unknown command.
    juniper@R2# runsh



  • 5.  RE: the ospf export issue

    Posted 06-07-2011 00:31

    hi,Surya,

    thank you for your response,I did it.