RIP提供了调整计时器和控制广播及路由的参数:
l router(config-reouter)#timers basic update invalid holddown flush 设置更新、失效、抑制和刷新计时器的值。
l router(config-reouter)#passive-interface interface_name 禁止在某个接口上发送路由更新,只监听并接收更新。
l router(config-reouter)#neighbor ip_address 定义RIP邻居路由器与之进行单播更新信息,和passive-interface配合使用。
l router(config-reouter)#offiset-list [ acess_list_0-99 { in | out } offset [metric_offset_1-16] 增加路由度量值,不能超过16。
以下命令也可以用于其它路由协议:
l router(config-reouter)#distribute-list [ 1-199 ] [ in | out ] [ interface ] 调用标准or扩展ACL进行路由过滤。
l router(config-reouter)#distance [ 1-255 ] adjacent_neighbors_ip adderss wildcatrd_mask [ acess_list_0-99 ] 改变从邻居接收过来的路由的管理距离。
l router(config-reouter)#redistribute [ connected,static,bgp,igrp,eigrp,ospf,isis ] { metric } { route-map } 与别的路由选择协议进行重分布,一般需要双向重分布。
l router(config-reouter)#default-metric [ 1-16 ] 设置分布到RIP的所有路由的默认度量值。只要进行重分布就要分配一个默认度量值。
图4-2 路由器R3和R2之间运行EIGRP,在R2上进行RIP和EIGRP的重分布。如图4-2所示,增加了一台路由器R4和R1之间通过串行链路进行连接,使用单播进行路由更新。
图4-2 路由重分布和单播更新路由

在R4和R1之间配置单播,使用passive-interface命令防止RIP广播信息,再使用neighbor定义路由更新信息要发送到的router。例4-9是R1和R4的RIP配置。
例4-9 RIP单播的配置
hostname R1
!
router rip
passive-interface Serial1/0
network 128.200.0.0
neighbor 128.200.10.2、
―――――――――――――――――――――
hostname R4
!
router rip
passive-interface Serial1/0
network 128.200.0.0
neighbor 128.200.10.1
接下来我们来配置一下R2上的RIP和EIGRP双向重分布,如果网络中有两个重分布点的话则需要进行路由过滤。防止R2的RIP广播发送到R3,在R2上使用passive-interface。例4-10给出了R2上的路由协议配置:
例4-10 R2上的路由协议配置
hostname R2
!
router eigrp 2001
redistribute rip
passive-interface FastEthernet0/0
network 128.200.0.0
default-metric 100000 100 254 1 1500
no auto-summary
no eigrp log-neighbor-changes
!
router rip
redistribute eigrp 2001
passive-interface FastEthernet1/0
network 128.200.0.0
default-metric 2
R2和R1之间的掩码是24位的,因此R2不会从它F0/0接口上发送29位掩码的路由更新信息,要想实现R4和R3之间的完全互通需要在R3上执行一下手动汇总:
R3(config-if)#ip summary-address eigrp 2001 128.200.3.0 255.255.255.0
这时看一下R2上的路由就会发现多出一条128.200.3.0/24的EIGRP路由,这样就可以通过F0/0接口转发了。例4-11显示了在R2上执行show ip route得到的路由信息:
例10-11 在R2上show ip route的信息
R2#sho ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
128.200.0.0/16 is variably subnetted, 6 subnets, 2 masks
R 128.200.10.0/24 [120/1] via 128.200.1.1, 00:00:09, FastEthernet0/0
R 128.200.11.0/24 [120/1] via 128.200.1.1, 00:00:09, FastEthernet0/0
C 128.200.12.0/24 is directly connected, Loopback1
C 128.200.1.0/24 is directly connected, FastEthernet0/0
D 128.200.3.0/24 [90/30720] via 128.200.3.17, 00:02:43, FastEthernet1/0
C 128.200.3.16/29 is directly connected, FastEthernet1/0
D 192.16.3.0/24 [90/156160] via 128.200.3.17, 00:02:43, FastEthernet1/0
在R4上执行show ip route也会看到多出一条128.200.3.0/24的路由,这样R4和R3之间可以完全互通了。
路由选择协议不同默认路由的概念也不同,各路由选择协议都使用特定的方法来定义和宣告默认路由。
配置RIP默认路由:
第1步 定义或者标记一个默认网络:
1) RIP将
2) 把网络标记为默认路由:ip default-network a.b.c.d
第2步 配置ip classless,如果没有ip classless,rotuer 不会将数据转发到网关。
默认路由不需要再详细说了呵!天天用的就是这个,最广泛的应用就是访问internet的时候。相信谁都清楚了呵!
Cisco实现RIPv2的消息报文认证有两种方式:简单口令和MD5认证,还包含在一个“钥匙链”上定义多个“钥匙”or 口令的选项。
认证配置步骤如下:
第1步 定义带名字的钥匙链
第2步 定义在钥匙链上的钥匙
第3步 指定是明文还是MD5认证
第4步 (可选)配置钥匙的管理
在例10-12这个例子中我们配置一个名字叫”ccie”的key,并配置一个钥匙“key 1”,口令是”ccie”。并应用到f0/0接口上。
例10-11 配置MD5认证
R2(config)#key chain ccie
R2(config-keychain)#key 1
R2(config-keychain-key)#key-string ccie
R2(config-keychain-key)#interface f0/0
R2(config-if)#ip rip authentication key-chain ccie
R2(config-if)#ip rip authentication mode md5
如果没有使用ip rip authentication mode md5,接口则缺省使用明文认证。
在认证钥匙迁移的时候就需要用到钥匙管理(Key management)。例10-13就是一个认证迁移的案例。配置了3个钥匙。
例10-12 认证迁移的配置
key chain ccie
key 1
key-string ccie
accept-lifetime 16:30:00 Nov 28 2006 duration 43200
send-lifetime 16:30:00 Nov 28 2006 duration 43200
key 2
key-string ccie1
accept-lifetime 04:00:00 Nov 29 2006 13:00:00 Apr 15 2007
send-lifetime 04:00:00 Nov 29 2006 13:00:00 Apr 15 2007
key 3
key-string ccie2
accept-lifetime 12:30:00 Apr 15 2007 infinite
send-lifetime 12:30:00 Apr 15 2007 infinite
interface FastEthernet0/0
ip address 128.200.1.1 255.255.255.0
ip rip authentication mode md5
ip rip authentication key-chain ccie
duplex auto
speed auto