掌握目标
一、基本IP地址配置
二、配置RIPV1三、配置RIPV2四、重分布静态路由五、手工汇总路由六、明文与MD5认证拓扑一
实验配置如下:
一、基本配置:
R1:interface Serial1/0/0ip address 10.0.12.1 255.255.255.0interface LoopBack0ip address 10.0.1.1 255.255.255.0R2:
interface Serial1/0/0ip address 10.0.12.2 255.255.255.0interface Serial2/0/0ip address 10.0.23.2 255.255.255.0interface LoopBack0ip address 10.0.2.2 255.255.255.0R3:
interface Serial2/0/0ip address 10.0.23.3 255.255.255.0interface LoopBack0ip address 10.0.3.3 255.255.255.0测试:
[R2]ping 10.0.12.1PING 10.0.12.1: 56 data bytes, press CTRL_C to breakReply from 10.0.12.1: bytes=56 Sequence=1 ttl=255 time=20 msReply from 10.0.12.1: bytes=56 Sequence=2 ttl=255 time=10 msReply from 10.0.12.1: bytes=56 Sequence=3 ttl=255 time=10 ms[R2]ping 10.0.23.3PING 10.0.23.3: 56 data bytes, press CTRL_C to breakReply from 10.0.23.3: bytes=56 Sequence=1 ttl=255 time=20 msReply from 10.0.23.3: bytes=56 Sequence=2 ttl=255 time=20 msReply from 10.0.23.3: bytes=56 Sequence=3 ttl=255 time=10 ms二、配置RIPv1协议
R1:[R1]rip 1 ===启用RIP进程[R1-rip-1]network 10.0.0.0 ===宣告网络到RIP进程R2:
[R2]rip[R2-rip-1]network 10.0.0.0R3:
[R3]rip[R3-rip-1]network 10.0.0.0[R1]display ip routing-table protocol rip ====查看路由表中RIP路由
Route Flags: R – relay, D – download to fib——————————————————————————Public routing table : RIPDestinations : 3 Routes : 3RIP routing table status :Destinations : 3 Routes : 3Destination/Mask Proto Pre Cost Flags NextHop Interface10.0.2.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/010.0.3.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/010.0.23.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0测试:[R1]ping 10.0.23.3PING 10.0.23.3: 56 data bytes, press CTRL_C to breakReply from 10.0.23.3: bytes=56 Sequence=1 ttl=254 time=30 msReply from 10.0.23.3: bytes=56 Sequence=2 ttl=254 time=20 ms[R1]ping 10.0.3.3PING 10.0.3.3: 56 data bytes, press CTRL_C to breakReply from 10.0.3.3: bytes=56 Sequence=1 ttl=254 time=10 msReply from 10.0.3.3: bytes=56 Sequence=2 ttl=254 time=10 msReply from 10.0.3.3: bytes=56 Sequence=3 ttl=254 time=10 msdebugging rip 1 ====开启RIP调试信息,必须在用户视图开启
terminal debuggingterminal monitordisplay debugging rip ====查看开启debug功能RIP Process id: 1Debugs ON: SEND, RECEIVE, PACKET, TIMER, EVENT, BRIEF,JOB, ROUTE-PROCESSING, ERROR,REPLAY-PROTECT, GRMay 14 2014 13:15:09.866.1-05:13 R1 RIP/7/DBG: 6: 13414: RIP 1: Receiving v1 response on Serial1/0/0 from 10.0.12.2 with 3 RTEsMay 14 2014 13:15:09.866.2-05:13 R1 RIP/7/DBG: 6: 13465: RIP 1: Receive response from 10.0.12.2 on Serial1/0/0May 14 2014 13:15:09.866.3-05:13 R1 RIP/7/DBG: 6: 13476: Packet: Version 1, Cmd response, Length 64May 14 2014 13:15:09.866.4-05:13 R1 RIP/7/DBG: 6: 13527: Dest 10.0.2.0, Cost 1undo debug rip 1 ====关闭RIP debug功能
undo debug all ====关闭所有debug功能三、配置RIPv2协议
[R1]rip 1[R1-rip-1]version 2[R2]rip 1
[R2-rip-1]version 2[R3]rip 1
[R3-rip-1]version 2[R1]display ip routing-table protocol rip
Route Flags: R – relay, D – download to fib——————————————————————————Public routing table : RIPDestinations : 3 Routes : 3RIP routing table status :Destinations : 3 Routes : 3Destination/Mask Proto Pre Cost Flags NextHop Interface10.0.2.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/010.0.3.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/010.0.23.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0RIP routing table status :Destinations : 0 Routes : 0测试:
debugging rip 1 eventdebugging rip 1 packetundo debugging allMay 14 2014 13:31:30.266.2-05:13 R1 RIP/7/DBG: 6: 13476: Packet: Version 2, Cmd response, Length 24May 14 2014 13:31:30.266.3-05:13 R1 RIP/7/DBG: 6: 13546: Dest 10.0.1.0/24, Nexthop 0.0.0.0, Cost 1, Tag 0May 14 2014 13:31:42.106.1-05:13 R1 RIP/7/DBG: 6: 13465: RIP 1: Receive response from 10.0.12.2 on Serial1/0/0May 14 2014 13:31:42.106.2-05:13 R1 RIP/7/DBG: 6: 13476: Packet: Version 2, Cmd response, Length 64四、RIP中重分布静态路由
[R3]int lo 1[R3-LoopBack1]ip add 172.16.3.3 24ping -c 3 172.16.3.3
PING 172.16.3.3: 56 data bytes, press CTRL_C to breakRequest time outRequest time outRequest time out[R2]ip route-static 172.16.3.0 24 10.0.23.3[R2]rip 1[R2-rip-1]import-route static ====RIP进程中重分布静态路由R1>display ip routing-table protocol rip | in 172
Route Flags: R – relay, D – download to fib——————————————————————————Public routing table : RIPDestinations : 4 Routes : 4RIP routing table status :Destinations : 4 Routes : 4Destination/Mask Proto Pre Cost Flags NextHop Interface172.16.3.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0拓扑二
一、基本配置
R3:
interface LoopBack1ip address 172.16.0.1 255.255.255.0interface LoopBack2ip address 172.16.1.1 255.255.255.0interface LoopBack3ip address 172.16.2.1 255.255.255.0interface LoopBack4ip address 172.16.3.1 255.255.255.0二、配置RIPv2
R1:
[R1]rip 1[R1-rip-1]version 2[R1-rip-1]network 10.0.0.0R2:
[R2]rip 1[R2-rip-1]version 2[R2-rip-1]network 10.0.0.0R3:
[R3]rip 1[R3-rip-1]version 2[R3-rip-1]net 10.0.0.0[R3-rip-1]net 172.16.0.0R1]display ip routing-table protocol rip
Route Flags: R – relay, D – download to fib——————————————————————————Public routing table : RIPDestinations : 7 Routes : 7RIP routing table status : Destinations : 7 Routes : 7Destination/Mask Proto Pre Cost Flags NextHop Interface10.0.2.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/010.0.3.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/010.0.23.0/24 RIP 100 1 D 10.0.12.2 Serial1/0/0172.16.0.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0172.16.1.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0172.16.2.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0172.16.3.0/24 RIP 100 2 D 10.0.12.2 Serial1/0/0RIP routing table status : Destinations : 0 Routes : 0三、配置手工路由汇总
[R2]int s1/0/0
[R2-Serial1/0/0]rip summary-address 172.16.0.0 255.255.0.0测试
display ip routing-table protocol rip | in 172Route Flags: R – relay, D – download to fib——————————————————————————Public routing table : RIPDestinations : 4 Routes : 4RIP routing table status : Destinations : 4 Routes : 4Destination/Mask Proto Pre Cost Flags NextHop Interface172.16.0.0/16 RIP 100 2 D 10.0.12.2 Serial1/0/0四、配置明文与MD5认证
R1与R2明文认证:
interface Serial1/0/0rip authentication-mode simple ciscointerface Serial1/0/0
rip authentication-mode simple ciscointerface Serial2/0/0rip authentication-mode md5 usual ciscointerface Serial2/0/0
rip authentication-mode md5 usual cisco测试:
[R1]int s1/0/0[R1-Serial1/0/0]rip authentication-mode simple huaweidebugging rip 1terminal monitorInfo: Current terminal monitor is on.terminal debuggingreset ip routing-table statistics protocol rip ====清除RIP路由表信息本文首发于公众号:网络之路博客
精彩评论