您的位置:首页 > 其它

思科RIP协议基础配置

2020-07-18 04:35 393 查看

步骤一:
如图拓扑
验证有路由条目及server1 ping通server0

步骤二:
1)server1配置
IP:192.168.1.8/24
网关:192.168.1.252

2)三层设备ms1配置
ms1(config)#int vlan 1
ms1(config-if)#ip add 192.168.1.252 255.255.255.0
ms1(config-if)#int f0/5
ms1(config-if)#no switchport
ms1(config-if)#ip add 192.168.2.1 255.255.255.0
ms1(config-if)#no shutdown
ms1(config-if)#exit
ms1(config)#ip routing //开启路由条目

3)路由器r1配置
r1(config)#int f0/0
r1(config-if)#ip add 192.168.2.2 255.255.255.0
r1(config-if)#no shutdown
r1(config-if)#int f0/1
r1(config-if)#ip add 61.159.62.129 255.255.255.248
r1(config-if)#no shutdown
r1(config-if)#exit
r1(config)#access-list 1 permit 192.168.1.0 0.0.0.255
r1(config)#ip nat inside source list 1 interface f0/1 overload
r1(config)#int f0/1 //对外接口
r1(config-if)#ip nat outside
r1(config-if)#int f0/0 //对内接口
r1(config-if)#ip nat inside
r1(config-if)#ip nat inside source static tcp 192.168.1.8 80 61.159.62.129 80

4)server0配置
IP:61.159.62.134
掩码:255.255.255.248

步骤三:
1)配置r1 RIP协议配置 验证路由条目

r1(config)#ip route 0.0.0.0 0.0.0.0 f0/1  //配置连接外网的默认路由
r1(config)#router rip                     //配置rip协议
r1(config-router)#version 2               //版本2rip协议
r1(config-router)#no auto-summary         //取消自动汇总
r1(config-router)#network 192.168.2.0     //宣告路由条目
r1(config-router)#default-information originate   //引入默认路由
r1(config-router)#exit
r1(config)#exit
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 0.0.0.0 to network 0.0.0.0

61.0.0.0/29 is subnetted, 1 subnets
C       61.159.62.128 is directly connected, FastEthernet0/1
R    192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:06, FastEthernet0/0
C    192.168.2.0/24 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 is directly connected, FastEthernet0/1

2)配置ms1 RIP协议配置 验证路由条目

ms1(config)#router rip
ms1(config-router)#version 2
ms1(config-router)#no auto-summary
ms1(config-router)#network 192.168.2.0
ms1(config-router)#network 192.168.1.0
ms1(config-router)#exit
ms1(config)#exit
ms1#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 192.168.2.2 to network 0.0.0.0

C    192.168.1.0/24 is directly connected, Vlan1
C    192.168.2.0/24 is directly connected, FastEthernet0/5
R*   0.0.0.0/0 [120/1] via 192.168.2.2, 00:00:19, FastEthernet0/5

3)server1 ping通server0,如图

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: