实验 – 配置 IPv4 静态路由和默认路由(教师版)
教师注意事项:红色字体或灰色突显的部分表示仅显示在教师副本上的文本。
拓扑

地址分配表
设备 接口 IP 地址 子网掩码 默认网关
R1 G0/1 192.168.0.1 255.255.255.0 N/A
S0/0/1 10.1.1.1 255.255.255.252 N/A
R3 G0/1 192.168.1.1 255.255.255.0 N/A
S0/0/0 (DCE) 10.1.1.2 255.255.255.252 N/A
Lo0 209.165.200.225 255.255.255.224 N/A
Lo1 198.133.219.1 255.255.255.0 N/A
PC-A NIC 192.168.0.10 255.255.255.0 192.168.0.1
PC-C NIC 192.168.1.10 255.255.255.0 192.168.1.1
目标
第 1 部分:设置拓扑并初始化设备
第 2 部分:配置基本设备设置并检验连接
第 3 部分:配置静态路由
配置递归静态路由。
配置直连静态路由。
配置并删除静态路由。
第 4 部分:配置并检验默认路由
背景/场景
路由器使用路由表来确定将数据包发送到何处。路由表包含一组路由,描述路由器使用哪个网关或接口到达指定网络。最初,路由表只包含直接连接的网络。要与远程网络通信,则必须指定路由并将其添加到路由表中。
在本实验中,您将根据下一跳 IP 地址或送出接口手动配置指向指定远程网络的静态路由。还将配置静态默认路由。默认路由是一种静态路由,指定当路由表不含到达目的网络的路径时应使用的网关。
注意:本实验为配置静态路由所需实际命令提供最少协助。但是所需命令在附录 A 中。尝试在不参考附录的情况下配置设备,测验您的知识掌握程度。
注意:CCNA 动手实验所用的路由器是采用 Cisco IOS Release 15.2(4)M3(universalk9 映像)的 Cisco 1941 集成多业务路由器 (ISR)。所用的交换机是采用 Cisco IOS Release 15.0(2)(lanbasek9 映像)的 Cisco Catalyst 2960 系列。也可使用其他路由器、交换机以及 Cisco IOS 版本。根据型号以及 Cisco IOS 版本不同,可用命令和产生的输出可能与实验显示的不一样。请参考本实验末尾的“路由器接口摘要表”以了解正确的接口标识符。
注意:确保所使用的路由器和交换机的启动配置都已擦除。如果不确定,请联系教师。
教师注意事项:请参阅“教师实验手册”了解初始化和重新加载设备的程序。
所需资源
2 台路由器(支持 Cisco IOS 15.2(4)M3 版通用映像的 Cisco 1941 或同类路由器)
2 台交换机(支持 Cisco IOS 版本 15.0(2) lanbasek9 映像的 Cisco 2960 或同类交换机)
2 台 PC(采用 Windows 7、Vista 或 XP 且支持终端模拟程序,比如 Tera Term)
用于通过控制台电缆配置 Cisco IOS 设备的控制台端口
如拓扑所示的以太网电缆和串行电缆
第 1 部分:设置拓扑并初始化设备
第 1 步:建立如拓扑图所示的网络。
第 2 步:初始化并重新加载路由器和交换机。
第 2 部分:配置基本设备设置并检验连接
在第 2 部分,您将会配置基本设置,例如接口 IP 地址、设备访问和密码。您将检验 LAN 连接并确定 R1 和 R3 的路由表中列出的路由。
第 1 步:配置 PC 接口。
第 2 步:配置路由器的基本设置。
a.如拓扑和地址分配表所示配置设备名称。
b.禁用 DNS 查找。
c.指定 class 作为使能密码,指定 cisco 作为控制台和 vty 密码。
d.将运行配置保存到启动配置文件中。
第 3 步:配置路由器上的 IP 设置。
a.根据地址分配表为 R1 和 R3 接口接口配置 IP 地址。
b.S0/0/0 的连接为 DCE 连接,要求使用 clock rate 命令。R3 S0/0/0 的配置显示如下。
教师注意事项:Cisco 1941 路由器会自动检测 DCE,而且时钟频率自动设置为 2000000,无需进行配置。
R3(config)# interface s0/0/0
R3(config-if)# ip address 10.1.1.2 255.255.255.252
R3(config-if)# clock rate 128000
R3(config-if)# no shutdown
第 4 步:检验 LAN 连接。
a.从每台 PC 对为该主机配置的默认网关执行 ping 操作来测试连接。
在 PC-A 上能否对默认网关执行 ping 操作?可以
在 PC-C 上能否对默认网关执行 ping 操作?可以
b.通过在直接连接的路由器之间执行 ping 操作来测试连接。
从 R1,能否对 R3 的 S0/0/0 接口执行 ping 操作?可以
如果有任何问题的答案是否定的,请对配置进行排除故障并纠正错误。
c.测试未直接连接的设备之间的连通性。
在 PC-A 上是否能对 PC-C 执行 ping 操作?不可以
在 PC-A 上是否能对 Lo0 执行 ping 操作? 不可以
在 PC-A 上是否能对 Lo1 执行 ping 操作?不可以
这些 ping 是否成功?原因是什么?
因为没有配置路由表,所以在到达路由器的时候找不到路由表
注意:PC 之间执行 ping 操作可能需要禁用 PC 防火墙。
第 5 步:收集信息。
a.使用 show ip interface brief 命令检查 R1 的接口状态。
R1# show ip interface brief
Interface IP-Address OK? Method Status Protocol
Embedded-Service-Engine0/0 unassigned YES unset administratively down down
GigabitEthernet0/0 unassigned YES unset administratively down down
GigabitEthernet0/1 192.168.0.1 YES manual up up
Serial0/0/0 unassigned YES unset administratively down down
Serial0/0/1 10.1.1.1 YES manual up up
R1 上激活了多少个接口?2
b.检查 R3 的接口状态。
R3# show ip interface brief
Interface IP-Address OK? Method Status Protocol
Embedded-Service-Engine0/0 unassigned YES unset administratively down down
GigabitEthernet0/0 unassigned YES unset administratively down down
GigabitEthernet0/1 192.168.1.1 YES manual up up
Serial0/0/0 10.1.1.2 YES manual up up
Serial0/0/1 unassigned YES unset administratively down down
Loopback0 209.165.200.225 YES manual up up
Loopback1 198.133.219.1 YES manual up up
R3 上激活了多少个接口?4
c.使用 show ip route 命令查看 R1 的路由表信息。
R1# show ip route
Codes: L - local, C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 10.1.1.0/30 is directly connected, Serial0/0/1
L 10.1.1.1/32 is directly connected, Serial0/0/1
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.0.0/24 is directly connected, GigabitEthernet0/1
L 192.168.0.1/32 is directly connected, GigabitEthernet0/1
哪些网络存在于本实验的地址分配表中,但不在 R1 的路由表中?
C 192.168.0.0/24 is directly connected, GigabitEthernet0/1

d.查看 R3 的路由表信息。
R3# show ip route
Codes: L - local, C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 10.1.1.0/30 is directly connected, Serial0/0/0
L 10.1.1.2/32 is directly connected, Serial0/0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/1
L 192.168.1.1/32 is directly connected, GigabitEthernet0/1
198.133.219.0/24 is variably subnetted, 2 subnets, 2 masks
C 198.133.219.0/24 is directly connected, Loopback1
L 198.133.219.1/32 is directly connected, Loopback1
209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks
C 209.165.200.224/27 is directly connected, Loopback0
L 209.165.200.225/32 is directly connected, Loopback0
哪些网络存在于本实验的地址分配表中,但不在 R3 的路由表中?


为什么并非所有网络都在这些路由器的路由表中?



第 3 部分:配置静态路由
在第 3 部分,您将采用多种方式实施静态和默认路由,确认路由已添加到 R1 和 R3 的路由表中,而且您将根据引入的路由检验连接。
注意:本实验为配置静态路由所需实际命令提供最少协助。但是所需命令在附录 A 中。尝试在不参考附录的情况下配置设备,测验您的知识掌握程度。
第 1 步:配置递归静态路由。
在递归静态路由中,会指定下一跳 IP 地址。由于只指定了下一跳 IP,因此路由器必须在路由表中执行多次查找才能转发数据包。要配置递归静态路由,请使用以下语法:
Router(config)# ip route network-address subnet-mask ip-address
a.在 R1 路由器上,配置通往 192.168.1.0 网络的静态路由(使用 R3 Serial 0/0/0 接口的 IP 地址作为下一跳地址)。在下面空白处写下您使用的命令。


R1(config)# ip route 192.168.1.0 255.255.255.0 10.1.1.2
b.查看路由表,检验新添加的静态路由条目。
R1# show ip route
Codes: L - local, C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 10.1.1.0/30 is directly connected, Serial0/0/1
L 10.1.1.1/32 is directly connected, Serial0/0/1
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.0.0/24 is directly connected, GigabitEthernet0/1
L 192.168.0.1/32 is directly connected, GigabitEthernet0/1
S 192.168.1.0/24 [1/0] via 10.1.1.2
新的路由如何列在路由表中?
C 192.168.0.0/24 is directly connected, GigabitEthernet0/1
在主机 PC-A 上,是否能对主机 PC-C 执行 ping 操作?不能
这些 ping 会失败。如果递归静态路由配置正确,ping 可到达 PC-C。PC-C 将对 PC-A 发回 ping 应答。然而,ping 应答在 R3 上将被丢弃,因为 R3 的路由表中没有通往 192.168.0.0 网络的返回路由。
第 2 步:配置直连静态路由。
使用直连静态路由时,会指定 exit-interface 参数,允许路由器通过一次查找做出转发决策。直连静态路由通常用于点对点串行接口。要使用指定的送出接口配置直连静态路由,请使用以下语法:
Router(config)# ip route network-address subnet-mask exit-intf
a.在 R3 路由器上,使用 S0/0/0 作为送出接口配置通往 192.168.0.0 网络的静态路由。在下面空白处写下您使用的命令。
R3(config)# ip route 192.168.0.0 255.255.255.0 s0/0/0
b.查看路由表,检验新添加的静态路由条目。
R3# show ip route
Codes: L - local, C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 10.1.1.0/30 is directly connected, Serial0/0/0
L 10.1.1.2/32 is directly connected, Serial0/0/0
S 192.168.0.0/24 is directly connected, Serial0/0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/1
L 192.168.1.1/32 is directly connected, GigabitEthernet0/1
198.133.219.0/24 is variably subnetted, 2 subnets, 2 masks
C 198.133.219.0/24 is directly connected, Loopback1
L 198.133.219.1/32 is directly connected, Loopback1
209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks
C 209.165.200.224/27 is directly connected, Loopback0
L 209.165.200.225/32 is directly connected, Loopback0
新的路由如何列在路由表中?
S 192.168.0.0/24 is directly connected, Serial0/0/0
c.在主机 PC-A 上,是否能对主机 PC-C 执行 ping 操作?可以
注意:PC 之间执行 ping 操作可能需要禁用 PC 防火墙。
第 3 步:配置静态路由。
a.在 R1 路由器上,使用上述步骤中的静态路由配置选项之一配置通往 198.133.219.0 网络的静态路由。在下面空白处写下您使用的命令。
R1(config)# ip route 198.133.219.0 255.255.255.0 S0/0/1
b.在 R1 路由器上,使用上述步骤中的另一个静态路由配置选项配置通往 R3 上的 209.165.200.224 网络的静态路由。在下面空白处写下您使用的命令。
R1(config)# ip route 209.165.200.224 255.255.255.224 S0/0/1
or
R1(config)# ip route 209.165.200.224 255.255.255.224 10.1.1.2
c.查看路由表,检验新添加的静态路由条目。
注意:根据已配置的静态路由类型,学生可能会得出不同的路由表输出。
R1# show ip route
Codes: L - local, C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 10.1.1.0/30 is directly connected, Serial0/0/1
L 10.1.1.1/32 is directly connected, Serial0/0/1
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.0.0/24 is directly connected, GigabitEthernet0/1
L 192.168.0.1/32 is directly connected, GigabitEthernet0/1
S 192.168.1.0/24 [1/0] via 10.1.1.2
S 198.133.219.0/24 is directly connected, Serial0/0/1
209.165.200.0/27 is subnetted, 1 subnets
S 209.165.200.224 [1/0] via 10.1.1.2
新的路由如何列在路由表中?
S 198.133.219.0/24 is directly connected, Serial0/0/1
d.从主机 PC-A,能否对 R1 地址 198.133.219.1 执行 ping 操作?可以
第 4 步:删除环回地址的静态路由。
a.在 R1 上,使用 no 命令删除路由表中两个环回地址的静态路由。在下面空白处写下您使用的命令。


R1(config)# no ip route 209.165.200.224 255.255.255.224 10.1.1.2
R1(config)# no ip route 198.133.219.0 255.255.255.0 S0/0/1
注意:如下所示,可使用 no 命令删除静态路由,无需指定送出接口或下一跳 IP 地址。
R1(config)# no ip route 209.165.200.224 255.255.255.224
R1(config)# no ip route 198.133.219.0 255.255.255.0
b.查看路由表以检验路由是否已删除。
R1# show ip route
Codes: L - local, C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 10.1.1.0/30 is directly connected, Serial0/0/1
L 10.1.1.1/32 is directly connected, Serial0/0/1
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.0.0/24 is directly connected, GigabitEthernet0/1
L 192.168.0.1/32 is directly connected, GigabitEthernet0/1
S 192.168.1.0/24 [1/0] via 10.1.1.2
R1 的路由表中列出了多少条网络路由?三条
是否设置了最后选用网关?否
第 4 部分:配置并检验默认路由
在第 4 部分,您将实施默认路由,确认路由已添加到路由表中,并根据引入的路由检验连接。
在没有获取的路由或静态路由的情况下,默认路由用于确定发送所有 IP 数据包的网关。默认静态路由是将 0.0.0.0 作为目的 IP 地址和子网掩码的静态路由。通常将其称为“全零”路由。
在默认路由中,可以指定下一跳 IP 地址或送出接口。要配置默认静态路由,请使用以下语法:
Router(config)# ip route 0.0.0.0 0.0.0.0 {ip-address or exit-intf}
a.使用送出接口 S0/0/1 为 R1 路由器配置默认路由。在下面空白处写下您使用的命令。


R1(config)# ip route 0.0.0.0 0.0.0.0 s0/0/1
b.查看路由表,检验新添加的静态路由条目。
R1#show ip route
Codes: L - local, C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

S* 0.0.0.0/0 is directly connected, Serial0/0/1
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/30 is directly connected, Serial0/0/1
L 10.1.1.1/32 is directly connected, Serial0/0/1
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.0.0/24 is directly connected, GigabitEthernet0/1
L 192.168.0.1/32 is directly connected, GigabitEthernet0/1
S 192.168.1.0/24 [1/0] via 10.1.1.2
新的路由如何列在路由表中?
S* 0.0.0.0/0 is directly connected, Serial0/0/1
最后选用网关是什么?
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
c.从主机 PC-A 能否对 209.165.200.225 执行 ping 操作?可以
d.从主机 PC-A 能否对 198.133.219.1 执行 ping 操作?可以

思考
1.一个新网络 192.168.3.0/24 连接到 R1 上的接口 G0/0。可以使用什么命令配置从 R3 指向该网络的静态路由?
R3(config)# ip route 192.168.3.0 255.255.255.0 g0/0/0
2.配置直连静态路由而非递归静态路由有什么优点?
快,不需要多次递归,但是如果中间存在其他网络静态网络就不适用了
3.为什么在路由器上配置默认路由很重要?
因为如果没有默认路由 包的目的地址与路由表总没有匹配表象将会被丢弃
路由器接口摘要表
路由器接口摘要
路由器型号 Ethernet Interface #1 Ethernet Interface #2 Serial Interface #1 Serial Interface #2
1800 Fast Ethernet 0/0 (F0/0) Fast Ethernet 0/1 (F0/1) Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
1900 Gigabit Ethernet 0/0 (G0/0) Gigabit Ethernet 0/1 (G0/1) Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
2801 Fast Ethernet 0/0 (F0/0) Fast Ethernet 0/1 (F0/1) Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)
2811 Fast Ethernet 0/0 (F0/0) Fast Ethernet 0/1 (F0/1) Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
2900 Gigabit Ethernet 0/0 (G0/0) Gigabit Ethernet 0/1 (G0/1) Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
注意:若要了解如何配置路由器,请查看接口来确定路由器类型以及路由器拥有的接口数量。我们无法为每类路由器列出所有的配置组合。下表列出了设备中以太网和串行接口组合的标识符。此表中未包含任何其他类型的接口,但实际的路由器可能会含有其他接口。例如 ISDN BRI 接口。括号中的字符串是约定缩写,可在 Cisco IOS 命令中用来代表接口。
附录 A:第 2、第 3 和第 4 部分所需的配置命令
附录 A 中列出的命令仅供参考。此附录并不包含完成本实验所需的所有特定命令。
设备的基本设置
配置路由器上的 IP 设置。
R3(config)# interface s0/0/0
R3(config-if)# ip address 10.1.1.2 255.255.255.252
R3(config-if)# clock rate 128000
R3(config-if)# no shutdown
静态路由配置
配置递归静态路由。
R1(config)# ip route 192.168.1.0 255.255.255.0 10.1.1.2
配置直连静态路由。
R3(config)# ip route 192.168.0.0 255.255.255.0 s0/0/0
删除静态路由。
R1(config)# no ip route 209.165.200.224 255.255.255.224 serial0/0/1

R1(config)# no ip route 209.165.200.224 255.255.255.224 10.1.1.2

R1(config)# no ip route 209.165.200.224 255.255.255.224
默认路由配置
R1(config)# ip route 0.0.0.0 0.0.0.0 s0/0/1
设备配置 - R1 和 R3
路由器 R1(第 4 部分之后)
R1#show run
Building configuration…

Current configuration : 1547 bytes
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
enable secret 4 06YFDUHH61wAE/kLkDq9BGho1QM5EnRtoyr8cHAUg.2
!
no aaa new-model
!
!
!
!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
redundancy
!
!
!
!
!
! interface Embedded-Service-Engine0/0
no ip address
shutdown
!
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.0.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0/0
no ip address
shutdown
clock rate 2000000
!
interface Serial0/0/1
ip address 10.1.1.1 255.255.255.252
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 Serial0/0/1
ip route 192.168.1.0 255.255.255.0 10.1.1.2
!
!
!
!
control-plane
!
!
banner motd ^CUnauthorized access prohibited!^C
!
line con 0
password 7 01100F175804
logging synchronous
login
line aux 0
line 2
no activation-character
no exec
transport preferred none
transport input all
transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
stopbits 1
line vty 0 4
password 7 01100F175804
logging synchronous
login
transport input all
!
scheduler allocate 20000 1000
!
end
路由器 R3
R3#show run
Building configuration…

Current configuration : 1700 bytes
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
enable secret 4 06YFDUHH61wAE/kLkDq9BGho1QM5EnRtoyr8cHAUg.2
!
no aaa new-model
memory-size iomem 15
!
!
!
!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
vtp domain TSHOOT
vtp mode transparent
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 209.165.200.225 255.255.255.224
!
interface Loopback1
ip address 198.133.219.1 255.255.255.0
!
interface Embedded-Service-Engine0/0
no ip address
shutdown
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0/0
ip address 10.1.1.2 255.255.255.252
clock rate 256000
!
interface Serial0/0/1
no ip address
shutdown
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 192.168.0.0 255.255.255.0 Serial0/0/0
!
!
!
!
control-plane
!
!
banner motd ^CUnauthorized access prohibited!^C
!
line con 0
password 7 110A1016141D
logging synchronous
login
line aux 0
line 2
no activation-character
no exec
transport preferred none
transport input all
transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
stopbits 1
line vty 0 4
password 7 00071A150754
logging synchronous
login
transport input all
!
scheduler allocate 20000 1000
!
End

附录 A:初始化并重新加载路由器和交换机
第 2 步:初始化并重新加载路由器。
a.通过控制台连接到路由器并启用特权 EXEC 模式。
Router> enable
Router#
b.键入 erase startup-config 命令从 NVRAM 中删除启动配置。
Router# erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
Router#
c.发出 reload 命令,删除内存中的旧配置。当提示是否 Proceed with reload 时,按 Enter 确认重新加载。(按其他任意键中止重新加载。)
Router# reload
Proceed with reload? [confirm]
*Nov 29 18:28:09.923: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.
注意:系统可能会提示您在重新加载路由器之前保存运行配置。键入 no 并按 Enter 键。
System configuration has been modified. Save? [yes/no]: no
d.重新加载路由器后,系统会提示您进入初始配置对话框。输入 no 并按 Enter 键。
Would you like to enter the initial configuration dialog? [yes/no]: no
e.系统将提示您终止自动安装。键入 yes,然后按 Enter 键。
Would you like to terminate autoinstall? [yes]: yes
第 3 步:初始化并重新加载交换机。
a.登录交换机控制台并进入特权 EXEC 模式。
Switch> enable
Switch#
b.使用 show flash 命令来确定交换机上是否创建了 VLAN。
Switch# show flash
Directory of flash:/

2  -rwx        1919   Mar 1 1993 00:06:33 +00:00  private-config.text
3  -rwx        1632   Mar 1 1993 00:06:33 +00:00  config.text
4  -rwx       13336   Mar 1 1993 00:06:33 +00:00  multiple-fs
5  -rwx    11607161   Mar 1 1993 02:37:06 +00:00  c2960-lanbasek9-mz.150-2.SE.bin
6  -rwx         616   Mar 1 1993 00:07:13 +00:00  vlan.dat

32514048 bytes total (20886528 bytes free)
Switch#
c.如果在闪存中发现 vlan.dat 文件,请将其删除。
Switch# delete vlan.dat
Delete filename [vlan.dat]?
d.系统将提示您检验文件名。此时您可以更改文件名,或者如果文件名输入正确,直接按 Enter 键。
e.系统将提示您确认删除此文件。按 Enter 键确认删除。(按其他任意键中止删除。)
Delete flash:/vlan.dat? [confirm]
Switch#
f.使用 erase startup-config 命令从 NVRAM 中删除启动配置文件。系统会提示您确认删除配置文件。按 Enter 键确认清除此文件。(按其他任意键中止此操作。)
Switch# erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
Switch#
g.重新加载交换机以删除内存中所有的旧配置信息。系统将提示您确认重新加载交换机。按 Enter 键继续重新加载。(按其他任意键中止重新加载。)
Switch# reload
Proceed with reload? [confirm]
注意:系统可能会提示您在重新加载交换机之前保存运行配置。键入 no 并按 Enter 键。
System configuration has been modified. Save? [yes/no]: no
h.交换机重新加载后,系统应该会提示您进入初始配置对话。键入 no 并按 Enter 键。
Would you like to enter the initial configuration dialog? [yes/no]: no
Switch>
设备配置
路由器 R1
R1#show run
Building configuration…

Current configuration : 1742 bytes
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
security passwords min-length 10
enable secret 4 3mxoP2KRPf3sFHYl6Vm6.ssJJi9tOJqqb6DMG/YH5No
!
no aaa new-model
!
!
!
!
!
!
!
no ip domain lookup
ip domain name CCNA-lab.com
ip cef
ipv6 unicast-routing
ipv6 cef
multilink bundle-name authenticated
!
!
!
license udi pid CISCO1941/K9 sn FTX1636848Z
license accept end user agreement
!
!
username admin privilege 15 password 7 1304131F0202142B383779
!
!
!
!
!
!
interface Embedded-Service-Engine0/0
no ip address
shutdown
!
interface GigabitEthernet0/0
description Connection to PC-B
ip address 192.168.0.1 255.255.255.0
duplex auto
speed auto
ipv6 address FE80::1 link-local
ipv6 address 2001:DB8:ACAD:A::1/64
!
interface GigabitEthernet0/1
description Connection to S1
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0/0
no ip address
shutdown
clock rate 2000000
!
interface Serial0/0/1
no ip address
shutdown
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
!
!
!
!
control-plane
!
!
banner motd ^CUnauthorized access prohibited!^C
!
line con 0
exec-timeout 5 0
password 7 03075218050022434019181604
logging synchronous
login
line aux 0
line 2
no activation-character
no exec
transport preferred none
transport input all
transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
stopbits 1
line vty 0 4
exec-timeout 5 0
password 7 14141B180F0B3C3F3D38322631
logging synchronous
login local
transport input ssh
!
scheduler allocate 20000 1000
!
end
实验六 步骤图
第一步:拓扑截图

第二步 左击router2,关闭开关

第三步 插入串口hwic-2t后打开开关

第四步,对router3 重复这一操作(不配图与上图一样)
第五步,用时钟线或者橘黄色的那个线,去连接

第六步,pc 0的ip设置


第七步pc1设置与第六步一样(不配图)
第八步 设置 路由器 g0/0 ip地址与子网掩码 并让接口up

第九步对另一个路由进行同样的操作(不配图与八一样)
第十步配置串口的ip地址 子网掩码

第十一步,对另一个串口进行配置,跟第十步一样(不配图)(完成以后串口的那条线出现两个绿色小三角)
第十二步,配置环形网络lo0和lo1
第十三步,配置路由表router2 目的地址pc1 子网页码 下一跳

第十四步 ,配置路由表router3 目的地址pc0 子网掩码 下一跳


(补充,以上为课堂步骤,实验报告仍有部分需要补充 )

(补)第十五步分配设备名称



(补)第十六部对交换机禁用dns查找,指定 class 作为使能密码,指定 cisco 作为控制台和 vty 密码,将运行配置保存到启动配置文件中。




(补)第十七步,对r3的s0/0/0/0(dec)设置clock rate 老师上课的时候没有设置理由是静态不需要,但是实验报告里存在,还是补充一下

(补)第十八步 删除R1环回地址的静态路由

(补)第十九步 配置静态路由给s0/0/0


(补)第二十步 pc-a ping209.165.200.225
pc-a ping198.133.219.1

实验 – 配置 IPv4 静态路由和默认路由(教师版)步骤在末尾,报告结束以后(二十步解决,不用听课,闭着眼照着步骤做就没问题)相关推荐

  1. 华为实验 | 配置 IPv4 静态路由基本功能

    先看看本文目录: 规格 组网需求 操作步骤 步骤1 RouterA的配置 步骤2 RouterB的配置 步骤3 RouterC的配置 步骤4 配置主机 步骤5 配置交换机 步骤6 验证配置结果 配置注 ...

  2. 【计算机网络】实验六路由器静态路由、默认路由的配置

    实验六  路由器静态路由.默认路由的配置 一.实验目标 掌握静态路由.默认路由的配置方法和技巧: 掌握路由配置实现网络的连通性方法: 熟悉广域网线缆的连接方式: 二.实验背景 郑州某中学有2个校区,每 ...

  3. 基于【IPv6】静态路由和默认路由的配置

    基于IPv6静态路由和默认路由的配置 实验环境: 实验背景:在路由器R1上配置3个环回接口IPv6地址,分别模拟三个不同的IPv6前缀,作为IPV6目标网络,然后,在路由器R2上为三个IPv6前缀配置 ...

  4. 静态路由和默认路由的配置实战及其区别--很详细哦

    静态路由和默认路由的配置实战及其区别   一:实验拓扑 二:实验要求 1:实现全网互通 2:实现静态路由与动态路由的区别认识 3:熟练掌握其配置命令 三:实验步骤 第一步:ip地址.环回扣的划分 R1 ...

  5. 华为静态路由及默认路由的配置

    一. 静态路由及默认路由配置: 原理概述: 实验目的: 掌握配置静态路由(指定接口)的方法. 掌握配置静态路由(指定下一跳ip地址)的方法 掌握测试静态路由的连通性的方法. 掌握配置默认路由的方法 掌 ...

  6. 湖南大学 路由实验 ensp 实验1-1 静态路由及默认路由基本设置

    学号 2017******** 姓名 *** 班级 **** 全按照实验指南操作. 目录 静态路由及默认路由基本设置 一.实验内容: 二.实验报告要求 三.实验拓扑与编址 实验步骤 1. 基本配置 2 ...

  7. 静态路由及默认路由——基本配置

    原理简述: 1.静态路由:是指用户或网络管理员手工配置的路由信息.当网络拓扑结构或链路状态发生改变时,需要网络管理员手工配置静态路由信息. 相比较动态路由协议,静态路由无需频繁的交换各自的路由表,配置 ...

  8. 静态路由_配置IPv4静态路由

    组网需求 如图1所示,属于不同网段的主机通过几台Switch相连,要求不配置动态路由协议,使不同网段的任意两台主机之间能够互通. 图1 配置IP静态路由组网图 配置思路 采用如下的思路配置IPv4静态 ...

  9. 配置接口IP地址并通过静态路由、默认路由配置实现全网互通!

    配置接口IP地址并通过静态路由.默认路由配置实现全网互通 1.对Router-R1/R3进行默认路由配置,R2为静态路由配置 2.配置好PC机的IP地址,子网掩码,网关之后,开始配置路由R1/2/3/ ...

最新文章

  1. 洛谷P2057 【SHOI2007】善意的投票
  2. LOL手游上线!同步专属限量游戏红包封面,还不快来拿?
  3. java重命名sheet失败_java jxl excel 数据导出 重新命名无效的工作表名称 | 学步园...
  4. (转)《AS3 Expert》动态语言的基石:函数闭包
  5. (一)elasticsearch6.1.1安装详细过程
  6. IoT -- (九) IoT通讯技术选型与模型设计
  7. python 列表 元祖 字典,Python 列表、元组、字典
  8. VSS 数据库地址批量更改器 - VSS Database Changer
  9. android中json解析及使用 (下)
  10. matlab plv,脑电脑网络分析代码使用流程介绍
  11. html 怎么调用js中函数返回值,JavaScript 函数
  12. PDF文件中电子签名(安全性、有效性、合法性)验证指南
  13. 路由交换接口类型详解——通俗易懂版
  14. 深入分析Kafka架构(三):消费者消费方式、三种分区分配策略、offset维护
  15. Ubuntu 16.04 LTS设置屏幕分辨率并永久保存所设置的分辨率
  16. windows桌面远程连接(以XP连windows7为例)
  17. 一些js和jquery操作功能
  18. 弱口令审计-工具用法大全
  19. 清除bios密码的N种方法
  20. allegro差分信号走线_高速PCB设计软件allegro16.6演示差分规则的设置

热门文章

  1. 自己做的网站--新农合医药网
  2. 改完计算机名自动重启 vbs,VBS改计算机名,加IP,网关,DNS,无需禁用网卡.重...
  3. OPhone手机应用何处寻?
  4. 全面大涨原因!多家基金解读
  5. Windows Server 2003 磁盘镜像卷实现双硬盘数据灾难备份 2012
  6. 到底何谓好产品???
  7. python@最容易上手的图形界面开发框架之一PySimpleGUI@PySimpleGUI学习路线和官方文档阅读
  8. Android编写电话拨号器
  9. 只要掌握了这几点,摄影小白也能拍出氛围感大片
  10. Python os库之隐藏、显示文件夹