RIP实验笔记

RIP 实验学习笔记
2009.6.5―6.10
一.实验目的
二.拓扑和要求
  三.实验过程
3.1 连通性配置
遇到的问题:
3.2 基本 rip 配置
R1(config)#router rip
R1(config-router)#?
Router configuration commands:
  address-family          Enter Address Family command mode
  auto-summary            Enable automatic network number summarization
  default                 Set a command to its defaults
  default-information     Control distribution of default information
  default-metric          Set metric of redistributed routes
  distance                Define an administrative distance
  distribute-list         Filter networks in routing updates
  exit                    Exit from routing protocol configuration mode
  flash-update-threshold  Specify flash update threshold in second
  input-queue             Specify input queue depth
  maximum-paths           Forward packets over multiple paths
  neighbor                Specify a neighbor router
  network                 Enable routing on an IP network
  no                      Negate a command or set its defaults
  offset-list             Add or subtract offset from IGRP or RIP metrics
  output-delay            Interpacket delay for RIP updates
  passive-interface       Suppress routing updates on an interface
  redistribute            Redistribute information from another routing protocol
  timers                 Adjust routing timers
  traffic-share           How to compute traffic share over alternate paths
 validate-update-source  Perform sanity checks against source address of routing updates
  version                 Set routing protocol version
network 命令注解
The RIP network command only allows for a classful network as a parameter, which in turn enables RIP on all of that router’s interfaces that are part of that network. Enabling RIP on an interface makes the router begin sending RIP updates, listening for RIP updates (UDP port 520), and advertising that interface’s connected subnet.Because the RIP network command has no way to simply match one interface at a time, a RIP configuration may enable these three functions on an interface but some or all of these functions are not required. The three RIP functions can be ndividually disabled on an interface with some effort
RIP Function
How to Disable
Sending RIP updates  
Make the interface passive: configure router rip, followed by passiveinterface type number
Listening f or RIP updates
Filter all incoming routes using a distribute list
Advertising the connected subnet
Filter outbound advertisements on other interfaces using distribute lists, filtering an interface’s connected subnet;
using neighbor subcommand to advertise rip updates to that neighbor;
 
 
问题 1.Ping 172.31.25.1(R5 的物理串口地址 ) 问题
1 R6 ping 通, R6 路由表为:
R6>sh ip route
     172.31.0.0/16 is variably subnetted, 2 subnets, 2 masks
C       172.31.16.0/24 is directly connected, Serial0/0.601
R       172.31.0.0/16 [120/1] vi a 10.1.26 .2, 00:00:14, Serial0/0.602
     10.0.0 .0/8 is variably subnetted, 3 subnets, 2 masks
R       10.0.0 .0/8 [120/3] vi a 10.1.26 .2, 00:00:14, Serial0/0.602
C       10.1.26 .0/24 is directly connected, Serial0/0.602
C       10.1.106.0/24 is directly connected, Loopback1
2 R5 自己 ping 不通 25.1 ,能 ping 172.31.25.2
3 R4 ping R5
(4R3ping不通172.31.25.1,也ping不通172.31.25.2;(R3ping自己反应很慢,ping其他都ping不通,R1ping R3103.3正常,但ping不通R313.2),
R3#ping 172.31.23.1
Sending 5, 100-byte ICMP Echos to 172.31.23.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1612/1685/1752 ms
R3#ping 172.31.23.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.31.23.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R3 路由表为:
     172.31.0.0/16 is variably subnetted, 18 subnets, 2 masks
R       172.31.211.0/24 [120/6] via 172.31.23.2, 00:00:11, Serial0/0.302
R       172.31.223.0/24 [120/2] via 172.31.23.2, 00:00:11, Serial0/0.302
                        [120/2] via 172.31.13.1, 00:00:17, Serial0/0.301
R       172.31.16.0/24 [120/1] via 172.31.13.1, 00:00:17, Serial0/0.301
R       172.31.23.0/30 [120/2] via 172.31.13.1, 00:00:17, Serial0/0.301
C       172.31.23.0/24 is directly connected, Serial0/0.302
R       172.31.25.0/30 [120/1] via 172.31.23.2, 00:00:13, Serial0/0.302
R       172.31.24.0/30 [120/1] via 172.31.23.2, 00:00:13, Serial0/0.302
?问题 2 :从 R2 PING172.31.13.1 R1 接口)和 172.31.13.2 R3 接口),
如何解决???
R2#sh ip route
R  172.31.13.0/24 [120/1] via 172.31.23.1, 00:00:17, Serial1/0.203
R  172.31.13.0/30 [120/1] via 172.31.11.1, 00:00:09, FastEthernet0/0
R2#sh ip route 172.31.13.0
Routing entry for 172.31.13.0/30
  Known via "rip", distance 120, metric 1
  Redistributing via rip
  Last update from 172.31.11.1 on FastEthernet0/0, 00:00:27 ago
  Routing Descriptor Blocks:
  * 172.31.11.1, from 172.31.11.1, 00:00:27 ago, via FastEthernet0/0
      Route metric is 1, traffic share count is 1
R2#sh ip route 172.31.13.0 255.255.255.0
Routing entry for 172.31.13.0/24
  Known via "rip", distance 120, metric 1
  Redistributing via rip
  Last update from 172.31.23.1 on Serial1/0.203, 00:00:19 ago
  Routing Descriptor Blocks:
  * 172.31.23.1, from 172.31.23.1, 00:00:19 ago, via Serial1/0.203
      Route metric is 1, traffic share count is 1
3.3 认证配置
配置 R1,R2 LAN MD5 认证
R1: 定义密钥链
R2 :定义密钥链
启用 RIP 认证: ip rip authentication mode md5 à ip rip authentication key-chain lankey;
配置 R1 R4 明文认证
R1
R4(config)#key chain withR2
R4(config-keychain)#KEY 1
R4(config-keychain-key)#key-string plaintext
R4(config-keychain-key)#exit
R4(config-keychain)#exit
R4(config)#int s0/0.401
R4(config-subif)#ip rip authentication key-chain withR2
  3.4 水平分割和下一跳
水平分割缺省在每个接口上是 ON 的,除了配置了 IP 地址的 FR 封装的物理串口上(本例中的 R5 串口 S0/0
R5#sh ip int s0/0
Serial0/0 is up, line protocol is up
  Split horizon is disabled
  ICMP redirects are always sent
 
下一跳( next-hop )属性 允许路由器对通告的路由下一跳指向其他路由器,而不是自己;本例中 S2 运行 OSPF R2 S2 连接的网络通过重发布通告给其他路由器,由于 R2/S2/R1 连接在同一个 LAN 上,因此 R2 在向 R1 通告 S2 的路由的时候将下一条指向 S2 而不是 R2 自己
配置:
S2:router ospf 10 à network 172.31. 0.0 .0 .0.255.255 area 0
R2:router ospf 20 à network 172.31.0.0 0.0.255.255 area 0 ,network 10.1.26 .0 0.0.0.255 area 0
   Router rip- à redistribute ospf 20 metric 2
R1 路由如下:
R1#show ip route 172.31.221.202
Routing entry for 172.31.221.202/32
  Known via "rip", distance 120, metric 2
  Redistributing via rip
  Last update from 172.31.11.202 on FastEthernet0/0, 00:00:02 ago
  Routing Descriptor Blocks:
  * 172.31.11.202, from 172.31.11.2, 00:00:02 ago, via FastEthernet0/0
      Route metric is 2, traffic share count is 1
R1#sh ip route
Gateway of last resort is not set
       172.31.0.0/16 is variably subnetted, 14 subnets, 3 masks
C       172.31.16.0/24 is directly connected, Serial1/0.106
R       172.31.221.202/32 [120/2] via 172.31.11.202, 00:00:24, FastEthernet0/0
R       172.31.222.202/32 [120/2] via 172.31.11.202, 00:00:24, FastEthernet0/0
  3.5 路由控制
Offset lists--- 改变 metric 值,对于匹配 ACL 的路由,接口通告的和接口接收到的;
R1 offset list 配置
R1(config)#router rip
R1(config-router)#offset-list 10 out 8 s1/0.103
R1(config-router)#offset-list 10 out 8 s1/0.104
R1(config-router)#offset-list 10 out 8 s1/0.106
R1(config-router)#exit
R1(config)#access-list 10 permit 172.31.208.0 0.0.7 .255 (匹配的地址范围???)
R2 offset list 配置:
R2(config)#router rip
R2(config-router)#offset-list 12 in 4 fa0/0
R2(config-router)#exit
R2(config)#access-list 12 permit 172.31.208.0 0.0.7 .255
R2(config)#
使用 Distribute list 过滤路由
匹配 ACL prefix list deny 的子网将被过滤
distribute-list {access-list-number | name} {in | out} [interface-type interface-number]
distribute-list {prefix list-name} {in | out } [interface-type interface-number]
四.实验总结
         RIP 路由协议复杂的是,在路由失效拓扑收敛时为防止环路所使用的方法。
  五. RIP 基础知识 复习
 

你可能感兴趣的:(休闲,水平分割,rip,自动汇总,路由控制)