Background
I`m running 4 olive instances, each one having 3 interfaces (fxp0,fxp1,fxp2). I interconnect them using ”’tap”’ interfaces and put each interface in separate vlans:
So : fxp0 from each olive in BR0
fxp1 from R1 and R2 in BR1
fxp2 from R2 and R3 in BR2
fxp1 from R3 and R4 in BR3

Set interfaces
For R1:
[rancid@box ~]$ jlogin -c "show configuration interfaces|display set" 10.0.1.1
rancid@R1>
rancid@R1> show configuration interfaces|display set
set interfaces fxp0 unit 0 family inet address 10.0.1.1/24
set interfaces fxp1 vlan-tagging
set interfaces fxp1 unit 0 vlan-id 2
set interfaces fxp1 unit 0 family inet address 192.168.5.1/24
For R2:
[rancid@box ~]$ jlogin -c "show configuration interfaces|display set" 10.0.1.2
rancid@R2> show configuration interfaces|display set
set interfaces fxp0 unit 0 family inet address 10.0.1.2/24
set interfaces fxp1 vlan-tagging
set interfaces fxp1 unit 0 vlan-id 2
set interfaces fxp1 unit 0 family inet address 192.168.5.2/24
set interfaces fxp2 vlan-tagging
set interfaces fxp2 unit 0 vlan-id 3
set interfaces fxp2 unit 0 family inet address 192.168.6.1/24
For R3:
[rancid@box ~]$ jlogin -c "show configuration interfaces|display set" 10.0.1.3
rancid@R3> show configuration interfaces|display set
set interfaces fxp0 unit 0 family inet address 10.0.1.3/24
set interfaces fxp1 vlan-tagging
set interfaces fxp1 unit 0 vlan-id 4
set interfaces fxp1 unit 0 family inet address 192.168.7.1/24
set interfaces fxp2 vlan-tagging
set interfaces fxp2 unit 0 vlan-id 3
set interfaces fxp2 unit 0 family inet address 192.168.6.2/24
For R4:
[rancid@box ~]$ jlogin -c "show configuration interfaces|display set" 10.0.1.4
rancid@R4> show configuration interfaces|display set
set interfaces fxp0 unit 0 family inet address 10.0.1.4/24
set interfaces fxp1 vlan-tagging
set interfaces fxp1 unit 0 vlan-id 4
set interfaces fxp1 unit 0 family inet address 192.168.7.2/24
After all this there is no conectivity between R1 and R4.
Configure rip
To configure RIP you must first set a group that contains the interfaces interfaces on which RIP will be enabled.
R1:
set protocols rip group BR neighbor fxp1.0
R2:
set protocols rip group BR neighbor fxp1.0
set protocols rip group BR neighbor fxp2.0
R3:
set protocols rip group BR neighbor fxp1.0
set protocols rip group BR neighbor fxp2.0
R4:
set protocols rip group BR neighbor fxp1.0
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.
Add this to all 4 olives:
rip_routes
set protocols rip group BR export advertise-routes-via-rip
set policy-options policy-statement advertise-routes-via-rip term 1 from protocol direct
set policy-options policy-statement advertise-routes-via-rip term 1 from protocol rip
set policy-options policy-statement advertise-routes-via-rip term 1 then accept
To do it faster I use jlogin from the rancid suite smth like:
jlogin -x rip_routes 10.0.1.1
Debug
rancid@R4> show route protocol rip
10.0.1.0/24 [RIP/100] 06:09:41, metric 2, tag 0
> to 192.168.7.1 via fxp1.0
'''192.168.5.0/24 *[RIP/100] 06:09:41, metric 3, tag 0
> to 192.168.7.1 via fxp1.0
192.168.6.0/24 *[RIP/100] 06:09:41, metric 2, tag 0
> to 192.168.7.1 via fxp1.0'''
224.0.0.9/32 *[RIP/100] 05:12:52, metric 1
rancid@R4> show rip statistics
RIPv2 info: port 520; holddown 120s.
rts learned rts held down rqsts dropped resps dropped
3 0 0 0
fxp1.0: 3 routes learned; 1 routes advertised; timeout 180s; update interval 30s
Counter Total Last 5 min Last minute
------- ----------- ----------- -----------
Updates Sent 780 10 2
Triggered Updates Sent 1 0 0
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 773 10 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
Tracing RIP traffic:
set protocols rip traceoptions file rip
set protocols rip traceoptions flag update
and to view the file:
rancid@R1> show log rip
Jan 29 13:24:44 trace_on: Tracing to "/var/log/rip" started
Jan 29 13:25:04.547811 received response: sender 192.168.5.2, command 2, version 2, mbz: 0; 3 routes.
Jan 29 13:25:05.504315 Preparing to send RIPv2 updates on nbr fxp1.0, group: BR.
Jan 29 13:25:05.508892 Update job: sending 20 msgs; nbr: fxp1.0; group: BR; msgp: 0x8995a00.
Jan 29 13:25:05.509008 nbr fxp1.0; msgp 0x8995a00.
Jan 29 13:25:05.509089 sending msg 0x8995a04, 1 rtes
Jan 29 13:25:05.524983 Update job done for nbr fxp1.0 group: BR
Jan 29 13:25:34.416932 received response: sender 192.168.5.2, command 2, version 2, mbz: 0; 3 routes.
To clear the file :
rancid@R1> clear log rip
To deactivate:
deactivate protocols rip traceoptions