Routing
Highlighted
Routing

donot advertise connected networks

‎01-04-2017 10:58 PM

 

this is a basic RIP configuration sample taken from https://www.juniper.net/documentation/en_US/junos12.3/topics/topic-map/rip-basic.html

 

 

set interfaces fe-1/2/0 unit 2 family inet address 10.0.0.2/30
set interfaces fe-1/2/1 unit 5 family inet address 10.0.0.5/30
set interfaces lo0 unit 2 family inet address 192.168.2.2/32
set interfaces lo0 unit 2 family inet address 172.16.2.2/32
set protocols rip group rip-group export advertise-routes-through-rip
set protocols rip group rip-group neighbor fe-1/2/0.2
set protocols rip group rip-group neighbor fe-1/2/1.5
set policy-options policy-statement advertise-routes-through-rip term 1 from protocol direct
set policy-options policy-statement advertise-routes-through-rip term 1 from protocol rip
set policy-options policy-statement advertise-routes-through-rip term 1 then accept

My question is , we end up advertising all directly connected networks to other neighbors , which is not the desired behavior for me . I only want to advertise interfaces (networks) for which i have enabled RIP . in the above configuration IF i only intend to advertise networks on interface fe-1/2/0.2 and fe-1/2/1.5 but not the directly connected lo0 networks.  how do i do it ?  This way i want to avoid some of my local connected networks to be advertised. I am looking for a generic policy statement which is not specific for a particular topology.

this is equivalent of default cisco routing protocol behavior i.e RIP on cisco router only advertises networks for interfaces on which RIP is enabled.

 

2 REPLIES 2
Highlighted
Routing

Re: donot advertise connected networks

‎01-05-2017 02:37 AM

Hello,

The following line should solve Your problem:

set policy-options policy-statement advertise-routes-through-rip term 1 from interface [ fe-1/2/0.2 fe-1/2/1.5 ]

Please test and report back.

HTH

Thx

Alex

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Highlighted
Routing

Re: donot advertise connected networks

‎01-06-2017 03:47 AM

In Juniper Direct routes is the equivalent of connected routes so you should reject those routes if you do not want to advertise them:

set policy-options policy-statement advertise-routes-through-rip term 0 from protocol direct
set policy-options policy-statement advertise-routes-through-rip term 0 then reject
set policy-options policy-statement advertise-routes-through-rip term 1 from interface [ fe-1/2/0.2 fe-1/2/1.5 ]
set policy-options policy-statement advertise-routes-through-rip term 1 from interface [ fe-1/2/0.2 fe-1/2/1.5 ]
=============================================================================
if you do not want to advertise connected routes from a specific interface like the lo0 then:

set policy-options policy-statement advertise-routes-through-rip term 0 from interface lo0.0
set policy-options policy-statement advertise-routes-through-rip term 0 from protocol direct
set policy-options policy-statement advertise-routes-through-rip term 0 then reject
set policy-options policy-statement advertise-routes-through-rip term 1 from interface [ fe-1/2/0.2 fe-1/2/1.5 ]
set policy-options policy-statement advertise-routes-through-rip term 1 from interface [ fe-1/2/0.2 fe-1/2/1.5 ]

[KUDOS PLEASE! If you think I earned it!
If this solution worked for you please flag my post as an "Accepted Solution" so others can benefit..]