CCNA之三:RIP协议
?
環境:兩臺2500系列路由器由串口相連。
要求:如下圖所示,在R1和R2上運行RIPv1,讓兩端能夠學習到對端的路由以達到通信的目的。
步驟一、基本配置
Router>
Router>enable
Router#config terminal
Router(config)#hostname R1
R1(config)#no ip domain-lookup à關閉域名查找
R1(config)#line console 0
R1(config-line)# logging synchronous à命令輸入達到同步
R1(config-line)#exec-timeout 0 0 à設置永不超時
R1(config-line)#exit
步驟二、接口IP配置
R1的配置:
R1(config)#interface s0
R1(config-if)#ip address 30.1.1.1 255.255.255.0
R1(config-if)#clock rate 64000 à注意時鐘速率端
R1(config-if)#no shutdown
R1(config-if)#interface loopback 0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#
R2的配置:
Router(config)#hostname R2
R2(config)#interface s1
R2(config-if)#ip address 30.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface loopback 0
R2(config-if)#ip address 20.1.1.1 255.255.255.0
R2(config-if)#exit
R2(config)#
步驟三、啟用RIP路由選擇協議
R1的配置:
R1(config)#router rip à啟用RIP
R1(config-router)#network 30.0.0.0 à發布直連網段
R1(config-router)#network 10.0.0.0
R1(config-router)#exit
R1(config)#
R2的配置:
R2(config)#router rip à啟用RIP
R2(config-router)#network 20.0.0.0 à發布直連網段
R2(config-router)#network 30.0.0.0
R2(config-router)#exit
R2(config)#end
步驟四、顯示路由表,查看路由條目
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, 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
R 20.0.0.0/8 [120/1] via 30.1.1.2, 00:00:03, Serial0 à學習來的路由條目
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Loopback0
30.0.0.0/24 is subnetted, 1 subnets
C 30.1.1.0 is directly connected, Serial0
步驟五、用擴展ping命令測試連通性
R2#ping
Protocol [ip]:
Target IP address: 10.1.1.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 20.1.1.1
!!!!!
步驟六、顯示你當前路由協議
R2#show ip protocols à顯示你當前路由協議配置情況和運行狀態
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 24 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Loopback0 1 1 2
Serial1 1 1 2
Automatic network summarization is in effect
Routing for Networks:
10.0.0.0
20.0.0.0
Routing Information Sources:
Gateway Distance Last Update
30.1.1.1 120 00:14:05
Distance: (default is 120)
步驟七、顯示當前配置
r1的當前配置:
r1#show running-config
!
hostname R1
!
no ip domain-lookup
!
interface Loopback0
ip address 10.1.1.1 255.255.255.0
!
interface Serial0
ip address 30.1.1.1 255.255.255.0
clockrate 64000
!
router rip
network 30.0.0.0
network 10.0.0.0
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
end
r2的當前配置:
R2#sh run
!
hostname R2
!
no ip domain-lookup
!
interface Loopback0
ip address 20.1.1.1 255.255.255.0
!
interface Serial1
ip address 30.1.1.2 255.255.255.0
!
router rip
network 30.0.0.0
network 20.0.0.0
!
line con 0
exec-timeout 0 0
logging synchronous
!
end
偶不總結了~知道v1和v2就好了~!
轉載于:https://blog.51cto.com/c1813/578437
總結
以上是生活随笔為你收集整理的CCNA之三:RIP协议的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 组策略系列之四:《精典放送:组策略管理2
- 下一篇: 当遇到用\来分隔字符串