配置RIP版本、汇总、定时器


Target:

   通过本实验更深入了解RIP路由协议。

实验设备:

路由器 3台

预备知识:

路由器基本配置知识、IP路由知识、RIP路由协议。

实验原理:

主要在路由器上配置版本、验证、汇总等功能,实现路由信息安全传递。

实验拓扑图:

154521749.png


Step:


步骤1 在路由器上配置IP路由选择和IP地址。

RA#config t

RA(config)# interface FastEthernet 0/0

RA(config-if)#ip address 172.16.1.5 255.255.255.252

RA(config)# interface FastEthernet 0/0


RA(config-if)#ip address 192.168.20.1 255.255.255.0

RA(config)# interface Loopback 0

RA(config-if)#ip address 192.168.10.1 255.255.255.0

RA(config)#interface Loopback 1

RA(config-if)#ip address 172.16.1.1 255.255.255.0

RA(config)#interface Loopback 2

RA(config-if)#ip address 172.16.2.1 255.255.255.0

RA(config)#interface Loopback 3

RA(config-if)#ip address 172.16.3.1 255.255.255.0

RA(config)#interface Loopback 4

RA(config-if)#ip address 172.16.4.1 255.255.255.0

RA(config)#interface Loopback 5

RA(config-if)#ip address 172.16.5.1 255.255.255.0

RA(config)#interface Loopback 6

RA(config-if)#ip address 172.16.6.1 255.255.255.0

RA(config)#interface Loopback 7

RA(config-if)#ip address 172.16.7.1 255.255.255.0

RA(config-if)#ip address 192.168.1.1 255.255.255.252

RA(config)#interface Loopback 1

RA(config-if)#ip address 192.168.2.1 255.255.255.0

RB(config)# interface FastEthernet 0/0

RB(config-if)#ip address 192.168.20.2 255.255.255.0

RB(config)#interface FastEthernet 0/1

RB(config-if)#ip address 192.168.30.1 255.255.255.0

RC(config)# interface FastEthernet 0/0

RC(config-if)#ip address 192.168.30.2 255.255.255.0

RC(config)# interface Loopback 0

RC(config-if)#ip address 192.168.40.2 255.255.255.0

步骤2 配置RIP版本。

RA(config)# router rip

RA(config-router)#version 2

RA(config-router)#network 172.16.0.0

RA(config-router)#network 192.168.10.0

RA(config-router)#network 192.168.20.0

RA(config-router)#no auto-summary

RB(config)# router rip

RB(config-router)#version 2

RB(config-router)#network 192.168.20.0

RB(config-router)#network 192.168.30.0

RB(config-router)#no auto-summary

RC(config)# router rip

RC(config-router)#version 2

RC(config-router)#network 192.168.30.0

RC(config-router)#network 192.168.40.0

步骤3 配置汇总。

RA(config)# interface FastEthernet 0/0


RA(config-if)#ip summary-address rip 172.16.0.0 255.255.248.0

步骤4 配置定时器。

RA(config)# router rip

RA(config-router)# timers basic 20 120 20

RB(config)# router rip

RB(config-router)# timers basic 20 120 80

RC(config)# router rip

RC(config-router)#timers basic 20 120 80

步骤6 验证测试。

用show ip rip 验证版本配置。

RB# Routing Protocol is "rip"

Sending updates every 20 seconds, next due in 7 seconds

Invalid after 90 seconds, flushed after 160 seconds

Outgoing update filter list for all interface is: not set

Incoming update filter list for all interface is: not set

Default redistribution metric is 1

Redistributing:

Default version control: send version 2, receive version 2

Interface Send Recv Key-chain

FastEthernet 0/0 2 2

FastEthernet 0/1 2 2

Routing for Networks:

192.168.20.0

192.168.30.0

Distance: (default is 120)

用show ip route验证路由汇总。

RB# show ip route

Codes: C - connected, S - static, R - RIP B - BGP

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, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default

Gateway of last resort is no set

R 172.16.0.0/21 [120/1] via 192.168.20.1, 00:00:00, FastEthernet 0/0

R 192.168.10.0/24 [120/1] via 192.168.20.1, 00:00:00, FastEthernet 0/0

C 192.168.20.0/24 is directly connected, FastEthernet 0/0

C 192.168.20.2/32 is local host.

C 192.168.30.0/24 is directly connected, FastEthernet 0/1

C 192.168.30.1/32 is local host.

R 192.168.40.0/24 [120/1] via 192.168.30.2, 00:00:06, FastEthernet 0/1

用show ip rip和debug ip rip 测试验证配置。

RB#show ip rip

Routing Protocol is "rip"

Sending updates every 20 seconds, next due in 9 seconds


Invalid after 90 seconds, flushed after 160 seconds

Outgoing update filter list for all interface is: not set

Incoming update filter list for all interface is: not set

Default redistribution metric is 1

Redistributing:

Default version control: send version 2, receive version 2

Interface Send Recv Key-chain

FastEthernet 0/0 2 2

FastEthernet 0/1 2 2

Routing for Networks:

192.168.20.0

192.168.30.0

Distance: (default is 120)

RB#debug ip rip

Nov 3 21:33:37 RB %7: [RIP] RIP recveived packet, sock=2125 src=192.168.20.1 len=84

Nov 3 21:33:37 RB %7: [RIP] Cancel peer remove timer

Nov 3 21:33:37 RB %7:[RIP] Peer remove timer shedule...

Nov 3 21:33:37 RB %7:[RIP]: received packet with MD5 authentication

Nov 3 21:33:37 RB %7: [RIP] Ours need md5 authen

Nov 3 21:33:37 RB %7: [RIP] MD5 Auth success

用show ip rip命令测试定时器配置。

RB#show ip rip

Routing Protocol is "rip"

Sending updates every 20 seconds, next due in 12 seconds

Invalid after 120 seconds, flushed after 80 seconds

Outgoing update filter list for all interface is: not set

Incoming update filter list for all interface is: not set

Default redistribution metric is 1

Redistributing:

Default version control: send version 2, receive version 2

Interface Send Recv Key-chain

FastEthernet 0/0 2 2

FastEthernet 0/1 2 2

Routing for Networks:

192.168.20.0

192.168.30.0

Distance: (default is 120)

【参考配置】

RA#show running-config

Building configuration...

Current configuration : 1348 bytes

!

version RGNOS 10.1.00(4), Release(18443)(Tue Jul 17 20:50:30 CST 2007 -ubu1server)


hostname RA

!

enable secret 5 $1$db44$8x67vy78Dz5pq1xD

!

interface FastEthernet 0/0

ip summary-address rip 172.16.0.0 255.255.248.0

ip address 192.168.20.1 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet 0/1

duplex auto

speed auto

!

interface Loopback 0

ip address 192.168.10.1 255.255.255.0

!

interface Loopback 1

ip address 172.16.1.1 255.255.255.0

!

interface Loopback 2

ip address 172.16.2.1 255.255.255.0

!

interface Loopback 3

ip address 172.16.3.1 255.255.255.0

!

interface Loopback 4

ip address 172.16.4.1 255.255.255.0

!

interface Loopback 5

ip address 172.16.5.1 255.255.255.0

!

interface Loopback 6

ip address 172.16.6.1 255.255.255.0

!

interface Loopback 7

ip address 172.16.7.1 255.255.255.0

!

router rip

version 2

network 172.16.0.0

network 192.168.10.0

network 192.168.20.0

no auto-summary

timers basic 20 120 80

!

line con 0


line aux 0

line vty 0 4

login

!

End

RB#show running-config

Building configuration...

Current configuration : 812 bytes

!

version RGNOS 10.1.00(4), Release(18443)(Tue Jul 17 20:50:30 CST 2007 -ubu1server)

hostname RB

!

enable secret 5 $1$db44$8x67vy78Dz5pq1xD

!

interface FastEthernet 0/0

ip address 192.168.20.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet 0/1

ip address 192.168.30.1 255.255.255.0

duplex auto

speed auto

!

router rip

version 2

network 192.168.20.0

network 192.168.30.0

no auto-summary

timers basic 20 120 80

!

line con 0

line aux 0

line vty 0 4

login

!

End

RC#show running-config

Building configuration...

Current configuration : 818 bytes

!

version RGNOS 10.1.00(4), Release(18443)(Tue Jul 17 20:50:30 CST 2007 -ubu1server)

hostname RC

!

enable secret 5 $1$db44$8x67vy78Dz5pq1xD

!

interface FastEthernet 0/0

ip address 192.168.30.2 255.255.255.0

duplex auto


speed auto

!

interface FastEthernet 0/1

duplex auto

speed auto

!

interface Loopback 0

ip address 192.168.40.2 255.255.255.0

!

router rip

version 2

network 192.168.30.0

network 192.168.40.0

timers basic 20 120 80

!

line con 0

line aux 0

line vty 0 4

login

!

en