Showing posts with label RIP. Show all posts
Showing posts with label RIP. Show all posts

Monday, December 26, 2011

Cisco RIP Offset-list Configuration example

Cisco RIP Offset-list Configuration example:

The RIP Offset-list is used for adding metrics for inbound or outbound RIP updates.

Here is the topology for RIP Offset-list configuration example:



We will configure outbound  RIP Offset-list on R2 for route 100.100.100.0/22.This outbound RIP Offset-list is attached for link to R1:

access-list 1 permit 100.100.100.0

router rip
 version 2
 offset-list 1 out 5 FastEthernet0/0
 network 192.168.0.0
 network 192.168.12.0
 network 192.168.24.0
 no auto-summary

R1`s routing table before this configuration:

R1#show ip route rip
     100.0.0.0/22 is subnetted, 1 subnets
R       100.100.100.0 [120/4] via 192.168.13.3, 00:00:25, FastEthernet0/1
                                  [120/4] via 192.168.12.2, 00:00:13, FastEthernet0/0
R    192.168.24.0/24 [120/1] via 192.168.12.2, 00:00:13, FastEthernet0/0
R    192.168.34.0/24 [120/1] via 192.168.13.3, 00:00:25, FastEthernet0/1
     192.168.0.0/32 is subnetted, 4 subnets
R       192.168.0.2 [120/1] via 192.168.12.2, 00:00:13, FastEthernet0/0
R       192.168.0.3 [120/1] via 192.168.13.3, 00:00:25, FastEthernet0/1
R       192.168.0.4 [120/2] via 192.168.13.3, 00:00:25, FastEthernet0/1
                    [120/2] via 192.168.12.2, 00:00:13, FastEthernet0/0


After the configuration:

R1#debug ip rip
RIP protocol debugging is on
*Mar  1 01:28:52.991: RIP: received packet with MD5 authentication
*Mar  1 01:28:52.995: RIP: received v2 update from 192.168.12.2 on FastEthernet0/0
*Mar  1 01:28:52.995:      100.100.100.0/22 via 0.0.0.0 in 9 hops
*Mar  1 01:28:52.995:      192.168.0.2/32 via 0.0.0.0 in 1 hops
*Mar  1 01:28:52.999:      192.168.0.4/32 via 0.0.0.0 in 2 hops
*Mar  1 01:28:52.999:      192.168.24.0/24 via 0.0.0.0 in 1 hops
*Mar  1 01:28:52.999:      192.168.34.0/24 via 0.0.0.0 in 2 hops

R1`s routing table after RIP Offset-list configuration on R2:

R1#show ip route rip
     100.0.0.0/22 is subnetted, 1 subnets
R       100.100.100.0 [120/4] via 192.168.13.3, 00:00:23, FastEthernet0/1
R    192.168.24.0/24 [120/1] via 192.168.12.2, 00:00:12, FastEthernet0/0
R    192.168.34.0/24 [120/1] via 192.168.13.3, 00:00:23, FastEthernet0/1
     192.168.0.0/32 is subnetted, 4 subnets
R       192.168.0.2 [120/1] via 192.168.12.2, 00:00:12, FastEthernet0/0
R       192.168.0.3 [120/1] via 192.168.13.3, 00:00:23, FastEthernet0/1
R       192.168.0.4 [120/2] via 192.168.13.3, 00:00:23, FastEthernet0/1
                    [120/2] via 192.168.12.2, 00:00:12, FastEthernet0/0

If we dont use access-list and use offset-list 0 command it influences all routes:

On R2:

router rip
 version 2
 offset-list 0 out 6 FastEthernet0/0
 network 192.168.0.0
 network 192.168.12.0
 network 192.168.24.0
 no auto-summary

R1#debug ip rip
*Mar  1 01:38:29.923: RIP: received packet with MD5 authentication
*Mar  1 01:38:29.923: RIP: received v2 update from 192.168.12.2 on FastEthernet0/0
*Mar  1 01:38:29.927:      100.100.100.0/22 via 0.0.0.0 in 10 hops
*Mar  1 01:38:29.927:      192.168.0.2/32 via 0.0.0.0 in 7 hops
*Mar  1 01:38:29.931:      192.168.0.4/32 via 0.0.0.0 in 8 hops
*Mar  1 01:38:29.931:      192.168.24.0/24 via 0.0.0.0 in 7 hops
*Mar  1 01:38:29.935:      192.168.34.0/24 via 0.0.0.0 in 8 hops

Cisco RIP Summarization Configuration Example

RIP Summarization Configuration Example

We will configure RIP Summarization by using ip summary-address rip command.

Here is the topology for this example:



In this example we will create four connected interfaces on R4.We will redistribute them into RIP with metric of 3.Then we will do RIP summarization on R2 and R3 by using ip summary-address rip command.

Configurtion of R4:

interface Loopback0
 ip address 192.168.0.4 255.255.255.255
!
interface Loopback100
 ip address 100.100.100.1 255.255.255.0
!
interface Loopback101
 ip address 100.100.101.1 255.255.255.0
!
interface Loopback102
 ip address 100.100.102.1 255.255.255.0
!
interface Loopback103
 ip address 100.100.103.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.24.4 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.34.4 255.255.255.0
!
router rip
 version 2
 redistribute connected metric 3
 network 192.168.0.0
 network 192.168.24.0
 network 192.168.34.0
 no auto-summary


Then we see that R2 and R3 gets these connected routes:

R3#show ip route rip
R    192.168.12.0/24 [120/1] via 192.168.13.1, 00:00:08, FastEthernet0/0
     100.0.0.0/24 is subnetted, 4 subnets
R       100.100.100.0 [120/3] via 192.168.34.4, 00:00:17, FastEthernet0/1
R       100.100.101.0 [120/3] via 192.168.34.4, 00:00:17, FastEthernet0/1
R       100.100.102.0 [120/3] via 192.168.34.4, 00:00:17, FastEthernet0/1
R       100.100.103.0 [120/3] via 192.168.34.4, 00:00:17, FastEthernet0/1
R    192.168.24.0/24 [120/1] via 192.168.34.4, 00:00:17, FastEthernet0/1
     192.168.0.0/32 is subnetted, 4 subnets
R       192.168.0.1 [120/1] via 192.168.13.1, 00:00:08, FastEthernet0/0
R       192.168.0.2 [120/2] via 192.168.34.4, 00:00:17, FastEthernet0/1
                    [120/2] via 192.168.13.1, 00:00:08, FastEthernet0/0
R       192.168.0.4 [120/1] via 192.168.34.4, 00:00:17, FastEthernet0/1
On R2 and R3 we will configure RIP summarization by using ip summary-address rip
Command:

interface FastEthernet0/0
ip summary-address rip 100.100.100.0 255.255.252.0

R1 gets the summary, not the more specific routes:

R1#show ip route rip
     100.0.0.0/22 is subnetted, 1 subnets
R       100.100.100.0 [120/4] via 192.168.13.3, 00:00:24, FastEthernet0/1
                                  [120/4] via 192.168.12.2, 00:00:26, FastEthernet0/0
R    192.168.24.0/24 [120/1] via 192.168.12.2, 00:00:26, FastEthernet0/0
R    192.168.34.0/24 [120/1] via 192.168.13.3, 00:00:24, FastEthernet0/1
     192.168.0.0/32 is subnetted, 4 subnets
R       192.168.0.2 [120/1] via 192.168.12.2, 00:00:26, FastEthernet0/0
R       192.168.0.3 [120/1] via 192.168.13.3, 00:00:24, FastEthernet0/1
R       192.168.0.4 [120/2] via 192.168.13.3, 00:00:24, FastEthernet0/1
                    [120/2] via 192.168.12.2, 00:00:26, FastEthernet0/0

Lets check the reachability:

R1#ping 100.100.100.1 source 192.168.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/55/88 ms

R1#ping 100.100.101.1 source 192.168.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.101.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/64/92 ms

R1#ping 100.100.102.1 source 192.168.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.102.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/68/88 ms

R1#ping 100.100.103.1 source 192.168.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.103.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/80/96 ms

Cisco RIP Authentication Configuration Example


Cisco RIP Authentication Configuration Example

We will configure RIP Authentication on Cisco routers.We will use RIP Version 2, because RIP version 1 does not support authentication.

Here is the topology for RIP Authentication configuration example:



Firstly we will configure R1 as below:

key chain AUTHENTICATION
 key 10
   key-string CISCO
!
interface Loopback0
 ip address 192.168.0.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.12.1 255.255.255.0
 ip rip authentication mode md5
 ip rip authentication key-chain AUTHENTICATION
!        
interface FastEthernet0/1
 ip address 192.168.13.1 255.255.255.0
 !
router rip
 version 2
 network 192.168.0.0
 network 192.168.12.0
 network 192.168.13.0
 no auto-summary

We see that R1 ignores the updates that come from R2, because we did not configure RIP authentication on R2 yet:

R1#debug ip rip
RIP protocol debugging is on
*Mar  1 00:47:47.191: RIP: received v2 update from 192.168.13.3 on FastEthernet0/1
*Mar  1 00:47:47.195:      192.168.0.3/32 via 0.0.0.0 in 1 hops
*Mar  1 00:47:47.195:      192.168.0.4/32 via 0.0.0.0 in 2 hops
*Mar  1 00:47:47.195:      192.168.24.0/24 via 0.0.0.0 in 2 hops
*Mar  1 00:47:47.199:      192.168.34.0/24 via 0.0.0.0 in 1 hops
*Mar  1 00:47:54.951: RIP: ignored v2 packet from 192.168.12.2 (invalid authentication)

After we have done same RIP authentication on R2, then R1 accepts the RIP updates that come from R2:

R1#debug ip rip
RIP protocol debugging is on
*Mar  1 00:56:11.927: RIP: received packet with MD5 authentication
*Mar  1 00:56:11.927: RIP: received v2 update from 192.168.12.2 on FastEthernet0/0
*Mar  1 00:56:11.927:      192.168.0.2/32 via 0.0.0.0 in 1 hops
*Mar  1 00:56:11.931:      192.168.0.4/32 via 0.0.0.0 in 2 hops
*Mar  1 00:56:11.931:      192.168.24.0/24 via 0.0.0.0 in 1 hops
*Mar  1 00:56:11.935:      192.168.34.0/24 via 0.0.0.0 in 2 hops

In RIP Authentication Key chain names may be different on neighboring routers, but key-id and key-string must match.

Basic Cisco RIP Version 2 Configuration Example

Basic Cisco RIP Version 2 Configuration Example:

Here is the configuration example topology for RIP version 2:




Configurations of routers for RIP version 2:

R1
!
interface Loopback0
 ip address 192.168.0.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.12.1 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.13.1 255.255.255.0
!
router rip
 version 2
 network 192.168.0.0
 network 192.168.12.0
 network 192.168.13.0
 no auto-summary


R2
!
interface Loopback0
 ip address 192.168.0.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.12.2 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.24.2 255.255.255.0
!
router rip
 version 2
 network 192.168.0.0
 network 192.168.12.0
 network 192.168.24.0
 no auto-summary

R3
!
interface Loopback0
 ip address 192.168.0.3 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.13.3 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.34.3 255.255.255.0
!
router rip
 version 2
 network 192.168.0.0
 network 192.168.13.0
 network 192.168.34.0
 no auto-summary

R4
!
interface Loopback0
 ip address 192.168.0.4 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.24.4 255.255.255.0
!
interface FastEthernet0/1
 ip address 192.168.34.4 255.255.255.0
!
router rip
 version 2
 network 192.168.0.0
 network 192.168.24.0
 network 192.168.34.0
 no auto-summary

Lets check the routing table of R1 for RIP version 2 routes:

R1#show ip route rip
R    192.168.24.0/24 [120/1] via 192.168.12.2, 00:00:14, FastEthernet0/0
R    192.168.34.0/24 [120/1] via 192.168.13.3, 00:00:03, FastEthernet0/1
     192.168.0.0/32 is subnetted, 4 subnets
R       192.168.0.2 [120/1] via 192.168.12.2, 00:00:14, FastEthernet0/0
R       192.168.0.3 [120/1] via 192.168.13.3, 00:00:03, FastEthernet0/1
R       192.168.0.4 [120/2] via 192.168.13.3, 00:00:03, FastEthernet0/1
                    [120/2] via 192.168.12.2, 00:00:14, FastEthernet0/0

Since we have configured basic RIP version 2 with no additional features, all timer, filters etc are stay as default:

R1#show ip protocols
Routing Protocol is "rip"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Sending updates every 30 seconds, next due in 27 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Redistributing: rip
  Default version control: send version 2, receive version 2
    Interface             Send  Recv  Triggered RIP  Key-chain
    FastEthernet0/0       2     2                                    
    FastEthernet0/1       2     2                                   
    Loopback0             2     2                                   
  Automatic network summarization is not in effect
  Maximum path: 4
  Routing for Networks:
    192.168.0.0
    192.168.12.0
    192.168.13.0
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.13.3         120      00:00:14
    192.168.12.2         120      00:00:27
  Distance: (default is 120)

Lets debug the RIP version 2 packets:

R1#debug ip rip
RIP protocol debugging is on

*Mar  1 00:36:03.275: RIP: sending v2 update to 224.0.0.9 via FastEthernet0/0 (192.168.12.1)
*Mar  1 00:36:03.275: RIP: build update entries
*Mar  1 00:36:03.275:   192.168.0.1/32 via 0.0.0.0, metric 1, tag 0
*Mar  1 00:36:03.279:   192.168.0.3/32 via 0.0.0.0, metric 2, tag 0
*Mar  1 00:36:03.279:   192.168.13.0/24 via 0.0.0.0, metric 1, tag 0
*Mar  1 00:36:03.279:   192.168.34.0/24 via 0.0.0.0, metric 2, tag 0
*Mar  1 00:36:10.055: RIP: sending v2 update to 224.0.0.9 via FastEthernet0/1 (192.168.13.1)
*Mar  1 00:36:10.055: RIP: build update entries
*Mar  1 00:36:10.055:   192.168.0.1/32 via 0.0.0.0, metric 1, tag 0
*Mar  1 00:36:10.059:   192.168.0.2/32 via 0.0.0.0, metric 2, tag 0
*Mar  1 00:36:10.059:   192.168.12.0/24 via 0.0.0.0, metric 1, tag 0
*Mar  1 00:36:10.059:   192.168.24.0/24 via 0.0.0.0, metric 2, tag 0
*Mar  1 00:36:10.999: RIP: received v2 update from 192.168.13.3 on FastEthernet0/1
*Mar  1 00:36:10.999:      192.168.0.3/32 via 0.0.0.0 in 1 hops
*Mar  1 00:36:11.003:      192.168.0.4/32 via 0.0.0.0 in 2 hops
R1#
*Mar  1 00:36:11.003:      192.168.24.0/24 via 0.0.0.0 in 2 hops
*Mar  1 00:36:11.007:      192.168.34.0/24 via 0.0.0.0 in 1 hops
                                                                                                         
Lets test the reachability:

R1#ping 192.168.0.4 source 192.168.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.4, timeout is 2 seconds:
Packet sent with a source address of 192.168.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/72/92 ms