Problem
You want your RIP-enabled router to share routes with its neighbors and learn routes from them.
Solution
To have RIP advertise RIP routes to its neighbors, you need to configure a routing policy that accepts all RIP packets:
[edit policy-options] aviva@RouterA# set policy-statement advertise-rip-routes term 1 from protocol direct aviva@RouterA# set policy-statement advertise-rip-routes term 1 from protocol rip aviva@RouterA# set policy-statement advertise-rip-routes term 1 then accept user@router1# show policy-options { policy-statement advertise-rip-routes { term 1 { from protocol [ direct rip ]; then accept; } } }
Then you apply the policy to all updates sent by RIP:
[edit protocols rip] aviva@RouterA# set group alpha-rip-group export advertise-rip-routes
Discussion
When you simply enable RIP, the default JUNOS behavior is to only receive RIP traffic but not learn any of the routes or send any RIP routes. To have RIP send routing information to its neighbors, you need to configure a routing policy that has RIP export routes to its neighbors. An easy way to do this is to have RIP send both the direct and the RIP routes it knows about. Sending the RIP routes is obvious, but why do you need to send the direct routes? Direct routes, which are routes directly to a subnet, are automatically created when you configure the subnet on an interface address. Because RIP does not exchange routes by default, when you first configure RIP on your network, your routers might not have learned any RIP routes. You use the direct routes to catalyze the route-learning process. Once the RIP routers have exchanged direct routes, they can start to exchange their RIP routes.
The routing policy you set up is a simple one. It has one term, which accepts all direct routes and all RIP routes. You apply the policy on the entire group of RIP neighbors, using an export statement to apply the policy to all outgoing RIP traffic. You can apply a RIP export policy only on an entire group of neighbors, so when you are designing your network and have decided which neighbors to place in which group, you need to consider that you have to apply the same routing policies to the entire group.
You see that RIP is now advertising routes to its neighbors. The fe-0/0/1 interface has sent two updates and has advertised four routes:
[edit protocols rip] aviva@RouterA# run show rip statistics RIPv2 info: port 520; update interval 30s; holddown 180s; timeout 120s. rts learned rts held down rqsts dropped resps dropped 6 0 0 0 fe-0/0/1.0: 4 routes learned; 4 routes advertised Counter Total Last 5 min Last minute ------- ----------- ----------- ----------- Updates Sent 2 1 1 Triggered Updates Sent 1 1 1 Responses Sent 0 0 0 Bad Messages 0 0 0 RIPv1 Updates Received 0 0 0 RIPv1 Bad Route Entries 0 0 0 RIPv1 Updates Ignored 0 0 0 RIPv2 Updates Received 16 11 2 RIPv2 Bad Route Entries 0 0 0 RIPv2 Updates Ignored 0 0 0 Authentication Failures 0 0 0 RIP Requests Received 0 0 0 RIP Requests Ignored 0 0 0
For RIP to work properly on your network, you need to configure this same routing policy on all the RIP neighbors.
See Also
Recipe 9.1
Router Configuration and File Management
Basic Router Security and Access Control
IPSec
SNMP
Logging
NTP
Router Interfaces
IP Routing
Routing Policy and Firewall Filters
RIP
IS-IS
OSPF
BGP
MPLS
VPNs
IP Multicast