Junos OS

Expand all | Collapse all

Advertised to OSPF neighbors

Jump to Best Answer
  • 1.  Advertised to OSPF neighbors

    Posted 03-17-2018 18:16

    I'm studying for the JNCIA-102 exam. Can anyone teach me how to answer this question?

    user@router> show route

    inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)

    + = Active Route, - = Last Active, * = Both

    10.10.10.91/32 *[Direct/0] 00:09:40
    >via lo0.0
    10.10.10.92/32 *[OSPF/10] 00:01:50, metric 1
    >to 172.16.1.2 via ge-0/0/2.0
    100.100.1.0/24 *[Static/5] 00:01:50
    Reject
    172.16.1.0/24 *[Direct/0] 00:06:09
    >via ge-0/0/2.0
    172.16.1.1/32 *[Local/0] 00:06:09
    Local via ge-0/0/2.0
    192.168.0.0/16 *[Aggregate/130] 00:00:06
    Reject
    192.168.0.0/17 *[Aggregate/130] 00:00:06
    >to 172.16.1.2 via ge-0/0/2.0
    192.168.50.0/24 *[Static/5] 00:00:06

    >to 172.16.1.2 via ge-0/0/2.0
    192.168.51.0/24 *[Static/5] 00:00:06
    >to 172.16.1.2 via ge-0/0/2.0

    user@router> show configuration policy-options
    policy-statement demo {
    term 1 {
    from {
    protocol static;
    route-filter 192.168.0.0/16 orlonger accept;
    }
    then accept;
    }
    }

    user@router> show configuration protocols ospf
    export demo;
    area 0.0.0.0 {
    interface ge-0/0/2.0;
    }

    Given the configuration and routing table shown in the exhibit, which routes will be
    advertised to OSPF neighbors because of the demo policy?

    A. 192.168.0.0/16 only
    B. 192.168.50.0/24 only
    C. 192.168.50.0/24 and 192.168.51.0/24
    D. 192.168.0.0/17, 192.168.50.0/24, and 192.168.51.0/24

     

     

     



  • 2.  RE: Advertised to OSPF neighbors

     
    Posted 03-17-2018 18:48

    Policy demo term1 from static. Should be C. 

     

     

     

     



  • 3.  RE: Advertised to OSPF neighbors

    Posted 03-17-2018 18:58

    Can you explain?



  • 4.  RE: Advertised to OSPF neighbors

     
    Posted 03-17-2018 19:03

    term1 from protocol static 

     

    policy-statement demo {
    term 1 {
    from {
    protocol static;   

     

    These two are static ones:

     

    192.168.50.0/24 *[Static/5] 00:00:06

    >to 172.16.1.2 via ge-0/0/2.0
    192.168.51.0/24 *[Static/5] 00:00:06
    >to 172.16.1.2 via ge-0/0/2.0

     

    Hence option C.

    What do you think otherwise?

     

     

     



  • 5.  RE: Advertised to OSPF neighbors

    Posted 03-17-2018 19:04

    Hi flamego,

     

    I quickly did a test as well as to confirm the answer. 

    Answer is D.

     

    Explanation:

     

    as per policy it will accept the route 192.168.0.0/16 or longer. So the below routes are applicable to accept

     

    192.168.0.0/16, 192.168.0.0/17, 192.168.50.0/24 and 192.168.51.0/24

     

    So we have 192.168.0.0/17, 192.168.50.0/24 and 192.168.51.0/24 in option D. So this is the answer.

     

    Lab output

    :

    # run show route 192.168.0.0/16

    inet.0: 17 destinations, 17 routes (17 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    192.168.0.0/16 *[Aggregate/130] 00:00:23
    Reject
    192.168.0.0/17 *[Static/5] 00:03:39
    Receive
    192.168.50.0/24 *[Static/5] 00:03:16
    Receive
    192.168.51.0/24 *[Static/5] 00:03:16
    Receive

    [edit]
    labroot@jtac-mx480-r2020#

    labroot@jtac-mx480-r2020# show policy-options policy-statement demo
    term 1 {
    from {
    protocol static;
    route-filter 192.168.0.0/16 orlonger accept;
    }
    then accept;
    }

    [edit]
    labroot@jtac-mx480-r2020#

     

    remote end:

     

    # run show route 192.168.0.0/16

    inet.0: 26 destinations, 31 routes (25 active, 1 holddown, 2 hidden)
    Restart Complete
    + = Active Route, - = Last Active, * = Both

    192.168.0.0/16 [OSPF/150] 00:00:07, metric 0, tag 0
    > to 10.0.0.3 via xe-2/0/0.0
    192.168.0.0/17 *[OSPF/150] 00:02:21, metric 0, tag 0
    > to 10.0.0.3 via xe-2/0/0.0
    192.168.50.0/24 *[OSPF/150] 00:02:21, metric 0, tag 0
    > to 10.0.0.3 via xe-2/0/0.0
    192.168.51.0/24 *[OSPF/150] 00:02:21, metric 0, tag 0
    > to 10.0.0.3 via xe-2/0/0.0

    [edit]
    labroot@piekna11-gw-01#

     

    Hope this helps
    --------------------------------------------------------------------------------------------------------
    If this post was helpful, please mark this post as an "Accepted Solution".
    Kudos are always appreciated!
    --------------------------------------------------------------------------------------------------------



  • 6.  RE: Advertised to OSPF neighbors

     
    Posted 03-17-2018 19:12
    Vadivel,

    Check the “original” question again, it’s going to evaluate protocol static.
    How many static routes do you see? I see only two that matches the route-filter.

    In your test, you have 192.168.0.0/17, 192.168.50.0/24 & 192.168.51.0/24 as static. However that not the case here.
    The answer should be “C”.


  • 7.  RE: Advertised to OSPF neighbors

    Posted 03-17-2018 19:24

    Hi karan,

     

     

     

    OOps i missed that part. you are correct

     

    labroot@piekna11-gw-01# run show route 192.168.0.0/16

    inet.0: 24 destinations, 29 routes (24 active, 0 holddown, 2 hidden)
    Restart Complete
    + = Active Route, - = Last Active, * = Both

    192.168.50.0/24 *[OSPF/150] 00:27:14, metric 0, tag 0
    > to 10.0.0.3 via xe-2/0/0.0
    192.168.51.0/24 *[OSPF/150] 00:27:14, metric 0, tag 0
    > to 10.0.0.3 via xe-2/0/0.0

    [edit]
    labroot@piekna11-gw-01#

     

     



  • 8.  RE: Advertised to OSPF neighbors

    Posted 03-17-2018 20:00

    The answer is because there is no filter at the end?

     

    How "reject"



  • 9.  RE: Advertised to OSPF neighbors
    Best Answer

     
    Posted 03-17-2018 20:42

    Flamengo,

     

    The answer is C becuase. in policy demo, term1 is "protocol static" that evaluates router-filter <prefix> and followed by accept action & then condition accept. Based on the "show route" output referred in your example, its matches the following statics routes:

     

    192.168.50.0/24 *[Static/5] 00:00:06

    >to 172.16.1.2 via ge-0/0/2.0
    192.168.51.0/24 *[Static/5] 00:00:06
    >to 172.16.1.2 via ge-0/0/2.0

     

    Thus the answer to your question is "C"

     

    Now, apart from Answer ("C"), if you wanted to reject anything else other than router-filter prefix accept, you can explicitly reject by adding a term2 then reject action.

     

    If you're still in the learning process, Would suggest you go through following doc:

    https://www.juniper.net/documentation/en_US/junos/topics/usage-guidelines/policy-configuring-route-lists-for-use-in-routing-policy-match-conditions.html