Configure RIP on Juniper and Cisco Routers

In this simple lab will show how to configure RIP routing protocol on Juniper and Cisco routers.

rjlogs, lab, RIP, cisco, juniper, gns3

R1 is a Cisco router, J1 and J2 are Juniper routers.

Let’s starting from J1 :

Assign IP address to each interfaces: IP 172.28.1.3/24 on interface  ge-0/0/0 that connected to R1, 172.28.2.3/24 on interface ge-0/0/1, and 1.1.1.1/32 for IP loopback interface.

[edit]
root@J1# set interfaces ge-0/0/0 unit 0 family inet address 172.28.1.3/24

[edit]
root@J1# set interfaces ge-0/0/1 unit 0 family inet address 172.28.2.3/24

[edit]
root@J1# set interfaces lo0 unit 0 family inet address 1.1.1.1/32

Now tell the router what interfaces will participate in RIP, and we have to give the process an identifier, here we call it RIP-LAB.

[edit]
root@J1# edit protocols rip

[edit protocols rip]
root@J1# set group RIP-LAB neighbor ge-0/0/0.0

[edit protocols rip]
root@J1# set group RIP-LAB neighbor ge-0/0/1.0

Junos requires the use of policy-statements to advertise routes. The default for RIP is to accept all learn routes from neighbors, but reject exporting them to neighbors unless there is a policy that permits it.

Now we will create a policy called RIP-POLICY and allow routes from the RIP protocol to be passed.

[edit]
root@J1# set policy-options policy-statement RIP-POLICY term 1 from protocol rip

And also direct attached network (loopback interface) be passed.

[edit]
root@J1# set policy-options policy-statement RIP-POLICY term 1 from protocol direct

Finally here’s the term that means that they can pass.

[edit]
root@J1# set policy-options policy-statement RIP-POLICY term 1 then accept

Now we have a policy-statement, we now need to apply that to the protocol RIP and to RIP group RIP-LAB.

[edit]
root@J1# edit protocols rip

[edit protocols rip]
root@J1# set group RIP-LAB export RIP-POLICY

Now move to J2.

We configure J2 with the same steps :

[edit]
root@J2# set interfaces ge-0/0/0 unit 0 family inet address 172.28.2.2/24

[edit]
root@J2# set interfaces lo0 unit 0 family inet address 2.2.2.2/32

[edit]
root@J2# commit

[edit]
root@J2# edit protocols rip

[edit protocols rip]
root@J2# set group RIP-LAB neighbor ge0/0/0.0

[edit]
root@J2# set policy-options policy-statement RIP-POLICY term 1 from protocol rip

[edit]
root@J2# set policy-options policy-statement RIP-POLICY term 1 from protocol direct

[edit]
root@J2# set policy-options policy-statement RIP-POLICY term 1 then accept

[edit protocols rip]
root@J2# set group RIP-LAB export RIP-POLICY

Don’t forget “commit” after finishing the configuration.

The last, let’s move to R1 the Cisco router.

R1(config)#interface e0/0
R1(config-if)#ip address 172.28.1.2 255.255.255.0
R1(config-if)#no shut

R1(config)#interface loopback 0
R1(config-if)#ip address 3.3.3.3 255.255.255.255
R1(config-if)#no shut

R1(config)#router rip
R1(config-router)#ver 2
R1(config-router)#network 172.28.1.0
R1(config-router)#network 3.3.3.3
R1(config-router)#passive-interface loopback 0
R1(config-router)#no auto-summary

Now let’s check the routing table from R1.

R1#sh ip route rip
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, H – NHRP, l – LISP
a – application route
+ – replicated route, % – next hop override

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 172.28.1.3, 00:00:00, Ethernet0/0
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/2] via 172.28.1.3, 00:00:00, Ethernet0/0
172.28.0.0/16 is variably subnetted, 3 subnets, 2 masks
R 172.28.2.0/24 [120/1] via 172.28.1.3, 00:00:00, Ethernet0/0

We can see loopback of J1 (1.1.1.1) and J2 (2.2.2.2) advertised by RIP.
Now try to  ping 2.2.2.2.

R1#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 213/446/1009 ms

Great! Ping to 2.2.2.2 is OK.

Now let’s take a look from J2.

[edit]
root@J2# run show route table inet.0

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

1.1.1.1/32             *[RIP/100] 00:07:46, metric 2, tag 0
                              > to 172.28.2.3 via ge-0/0/0.0
2.2.2.2/32            *[Direct/0] 00:25:40
> via lo0.0
3.3.3.3/32            *[RIP/100] 00:00:14, metric 3, tag 0
                               > to 172.28.2.3 via ge-0/0/0.0
172.28.1.0/24      *[RIP/100] 00:07:46, metric 2, tag 0
> to 172.28.2.3 via ge-0/0/0.0
172.28.2.0/24     *[Direct/0] 00:25:40
> via ge-0/0/0.0
172.28.2.2/32      *[Local/0] 00:25:40
Local via ge-0/0/0.0
224.0.0.9/32       *[RIP/100] 00:10:55, metric 1
MultiRecv

[edit]
root@J2# run ping 3.3.3.3 rapid
PING 3.3.3.3 (3.3.3.3): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
— 3.3.3.3 ping statistics —
5 packets transmitted, 5 packets received, +210 duplicates, 0% packet loss
round-trip min/avg/max/stddev = 273.255/1312.453/2069.859/456.302 ms

J2 can see R1’s loopback (3.3.3.3) and ping result is OK.

 

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s