**
拓扑图搭建
**
**
实验二 静态路由协议配置
**
一、实验目的
⑴ 掌握路由器在网络中的作用、组成以及路由器设备选型;
⑵ 掌握PacketTrace 仿真软件的使用方法;
⑶ 掌握路由器的静态路由配置命令。
二、实验条件
Cisco2621 Router、PacketTrace仿真软件、具备Windows操作系统的PC机
三、实验原理及相关知识
掌握PacketTrace路由仿真软件的使用、静态路由配置方法
四、实验步骤
1. 按要求对路由器接口进行配置(仅配置接口信息,不做任何路由设置)
⑴ 配置路由协议之前路由器R0的路由信息
Router>en
Router#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
C 192.172.1.0/24 is directly connected, FastEthernet0/0
192.172.101.0/30 is subnetted, 1 subnets
C 192.172.101.0 is directly connected,
⑵ 配置路由协议之前路由器R4的路由信息
Router>en
Router#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
192.172.101.0/30 is subnetted, 4 subnets
C 192.172.101.0 is directly connected, Serial0/0
C 192.172.101.4 is directly connected, Serial0/1
C 192.172.101.8 is directly connected, Serial0/2
C 192.172.101.12 is directly connected, Serial0/3
2.配置路由器静态路由
⑴ 配置路由器R0路由
Router>en
Router#config
Router(config)#hostname R0
R0(config)#ip route 0.0.0.0 0.0.0.0 192.172.101.2
⑵ 配置路由器R1路由
Router>en
Router#config
Router(config)#hostname R1
R1(config)#ip route 0.0.0.0 0.0.0.0 192.172.101.6
⑶ 配置路由器R2路由
Router>en
Router#config
Router(config)#hostname R2
R2(config)#ip route 0.0.0.0 0.0.0.0 192.172.101.10
⑷ 配置路由器R3路由
Router>en
Router#config
Router(config)#hostname R3
R3(config)#ip route 0.0.0.0 0.0.0.0 192.172.101.14
⑸ 配置路由器R4路由
Router>en
Router#config
Router(config)#hostname R4
R4(config)#ip route 192.172.1.0 255.255.255.0 192.172.101.1
R4(config)#ip route 192.172.2.0 255.255.255.0 192.172.101.5
R4(config)#ip route 192.172.3.0 255.255.255.0 192.172.101.9
R4(config)#ip route 192.172.4.0 255.255.255.0 192.172.101.13
⑹ 配置之后路由器R0的路由信息
R0>en
R0#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.172.101.2 to network 0.0.0.0
C 192.172.1.0/24 is directly connected, FastEthernet0/0
192.172.101.0/30 is subnetted, 1 subnets
C 192.172.101.0 is directly connected, Serial0/0
S* 0.0.0.0/0 [1/0] via 192.172.101.2
⑺ 配置之后路由器R1的路由信息
R1>en
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 192.172.101.6 to network 0.0.0.0
C 192.172.2.0/24 is directly connected, FastEthernet0/0
192.172.101.0/30 is subnetted, 1 subnets
C 192.172.101.4 is directly connected, Serial0/1
S* 0.0.0.0/0 [1/0] via 192.172.101.6
⑻ 配置之后路由器R2的路由信息
R2>en
R2#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.172.101.10 to network 0.0.0.0
C 192.172.3.0/24 is directly connected, FastEthernet0/0
192.172.101.0/30 is subnetted, 1 subnets
C 192.172.101.8 is directly connected, Serial0/2
S* 0.0.0.0/0 [1/0] via 192.172.101.10
⑼ 配置之后路由器R3的路由信息
R3>en
R3#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.172.101.14 to network 0.0.0.0
C 192.172.4.0/24 is directly connected, FastEthernet0/0
192.172.101.0/30 is subnetted, 1 subnets
C 192.172.101.12 is directly connected, Serial0/3
S* 0.0.0.0/0 [1/0] via 192.172.101.14
⑽ 配置之后路由器R4的路由信息
R4>en
R4#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
S 192.172.1.0/24 [1/0] via 192.172.101.1
S 192.172.2.0/24 [1/0] via 192.172.101.5
S 192.172.3.0/24 [1/0] via 192.172.101.9
S 192.172.4.0/24 [1/0] via 192.172.101.13
192.172.101.0/30 is subnetted, 4 subnets
C 192.172.101.0 is directly connected, Serial0/0
C 192.172.101.4 is directly connected, Serial0/1
C 192.172.101.8 is directly connected, Serial0/2
C 192.172.101.12 is directly connected, Serial0/3
3. 测试连通性
⑴ 路由器R0 ping路由器R2
⑵ 在各主机间使用ping命令,测试主机间的连通性。
PC0-PC1:可以ping通
PC1-PC2:可以ping通
PC2-PC3:可以ping通
PC3-PC0:可以ping通
五、常用路由器状态查询命令(在特权模式下输入命令)
Show version //查看IOS版本号,已启动时间,flash中的IOS的文件名,router里面共有什么的端口,寄存器的值等等。
show protocol //显示与IP 有关的路由协议信息。各个端口的情况。
show flash //查看flash中的内容,IOS的长度,文件名,剩余空间,总空间。
show running-config //查看路由器当前的配置信息。
show startup-config //查看nvram 中的路由器配置信息。
show ip route //查看路由器的路由配置情况
show hosts //查看IP host 表
show interface //查看路由器上的各个端口的状态信息。(很多重要信息)
show controller //查看接口控制器的状态,可看到连接的是DTE还是DCE
show history //查看history buffer 里面的命令列表
六、思考题及其它
⑴ 查看路由器的路由协议信息,用什么命令?
答:show protocol