3

Hello i have an issue where my Juniper router doesnt advertise BGP 10.255.255.4/32 to a neighbor because in inet.0 it is not issued as the best route

root# run show route table inet.0 

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

10.0.2.0/30        *[IS-IS/15] 2d 22:48:54, metric 20
                    > to 10.0.2.5 via em1.0
10.0.2.4/30        *[Direct/0] 2d 22:49:21
                    > via em1.0
10.0.2.6/32        *[Local/0] 2d 22:49:21
                      Local via em1.0
10.0.3.0/24        *[Direct/0] 2d 22:49:21
                    > via em0.0
10.0.3.1/32        *[Local/0] 2d 22:49:21
                      Local via em0.0
10.255.255.1/32    *[BGP/170] 02:19:00, MED 0, localpref 100, from 10.255.255.2
                      AS path: I, validation-state: unverified
                    > to 10.0.2.5 via em1.0, Push 300
10.255.255.2/32    *[IS-IS/15] 2d 22:48:54, metric 30
                    > to 10.0.2.5 via em1.0
10.255.255.3/32    *[Direct/0] 2d 22:49:21
                    > via lo0.0
10.255.255.4/32    *[OSPF/10] 2d 22:49:06, metric 1
                    > to 10.0.3.2 via em0.0
                    [BGP/170] 00:00:08, localpref 100, from 10.255.255.4
                      AS path: I, validation-state: unverified
                    > to 10.0.3.2 via em0.0
224.0.0.2/32       *[LDP/9] 2d 22:49:21, metric 1
                      MultiRecv
224.0.0.5/32       *[OSPF/10] 2d 22:49:24, metric 1
                      MultiRecv

[edit]
root# 

I am currently searching for a solution that would make the BGP route preferred. I have tried using policy-statements with no luck sadly.

Any ideas? thank you in advance

3

I have been able to solve the issue by following policy-statement:

policy-statement prioritize_BGP {
        from {
            route-filter 10.255.255.4/32 exact;
        }
        then {
            preference 10;
            accept;
       }
}

bgp {
        group ibgp {
            import prioritize_BGP;
        }
    }

This solution only tweaks the exact BGP route to end up better than OSPF

root> show route table inet.0 

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

10.0.2.0/30        *[IS-IS/15] 3d 08:58:47, metric 20
                    > to 10.0.2.5 via em1.0
10.0.2.4/30        *[Direct/0] 3d 08:59:14
                    > via em1.0
10.0.2.6/32        *[Local/0] 3d 08:59:14
                      Local via em1.0
10.0.3.0/24        *[Direct/0] 3d 08:59:14
                    > via em0.0
10.0.3.1/32        *[Local/0] 3d 08:59:14
                      Local via em0.0
10.255.255.1/32    *[BGP/170] 09:53:18, MED 0, localpref 100, from 10.255.255.2
                      AS path: I, validation-state: unverified
                    > to 10.0.2.5 via em1.0, Push 201, Push 300(top)
10.255.255.2/32    *[IS-IS/15] 3d 08:58:47, metric 30
                    > to 10.0.2.5 via em1.0
10.255.255.3/32    *[Direct/0] 3d 08:59:14
                    > via lo0.0
10.255.255.4/32    *[BGP/10] 00:24:52, localpref 100, from 10.255.255.4
                      AS path: I, validation-state: unverified
                    > to 10.0.3.2 via em0.0
                    [OSPF/10] 3d 08:58:59, metric 1
                    > to 10.0.3.2 via em0.0
224.0.0.2/32       *[LDP/9] 3d 08:59:14, metric 1
                      MultiRecv
224.0.0.5/32       *[OSPF/10] 3d 08:59:17, metric 1
                      MultiRecv

root> 
2

Looking at your output, the reason you can't re-advertise the BGP route is because it isn't active/preferred. You could adjust the preference of OSPF so that it is less preferred than BGP eg:

set protocols ospf preference 180

But you need to understand that the BGP route in question is reliant on the underlying OSPF next-hop being available as a recursive next-hop - eg: your IBGP session is terminated on the loopback 10.255.255.4, which you learn via OSPF. If you change the preference of OSPF, your BGP session may get torn down as soon as the route is learnt via BGP instead of OSPF.

Maybe you could describe the problem you are trying to solve?

  • I have the following tolopogy R1---- ISIS----R2----OSPF----R3. I am practising a Seamless MPLS topology and i need R2 to reflect the loopback interface of R3 to R1. Since R1 is not in OSPF, i doesnt know about the loopback via OSPF. So R2 must advertise it. – Radovan Jan 20 at 8:26
  • wouldn't you simply create a BGP adjacency between the loopbacks on R1 and R3? – Benjamin Dale Jan 22 at 6:08
  • possibly, but that is not what i am trying to achieve... this topology will be used for educational purposes and therefore aims to show off how routers behave and communicate – Radovan Jan 24 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.