实验七、路由器静态路由配置
一、 实验目的
1. 理解路由表
2. 掌握静态路由的配置
二、 应用环境
1. 在小规模环境里,静态路由是最佳的选择
2. 静态路由开销小,但不灵活,适用于相对稳定的网络
三、 实验设备
1. DCR-1751 三台
2. CR-V35FC 一条
3. CR-V35MT 一条
四、 实验拓扑
五、 实验要求
配置表
Router-A Router-B Router-C
S1/1(DCE) 192.168.1.1 S/1/0(DTE) 192.168.1.2 F0/0 192.168.2.2
F0/0 192.168.0.1 F0/0 192.168.2.1 E1/0 192.168.3.1
六、 实验步骤
第一步:参照实验三,按照上表配置所有接口的 IP 地址,保证所有接口全部是 up 状态,测
试连通性
第二步:查看 ROUTER-A 的路由表
Router-A#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area
ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
OE1 - OSPF external type 1, OE2 - OSPF external type 2
DHCP - DHCP type
VRF ID: 0
C 192.168.0.0/24 is directly connected, FastEthernet0/0 !直连的路由
C 192.168.1.0/24 is directly connected, Serial1/1 !直连的路由
第三步:查看 ROUTER-B 的路由表
Router-B#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area
ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
OE1 - OSPF external type 1, OE2 - OSPF external type 2
DHCP - DHCP type
VRF ID: 0
C 192.168.1.0/24 is directly connected, Serial1/0
C 192.168.2.0/24 is directly connected, FastEthernet0/0
第四步:查看 ROUTER-C 的路由表
Router-B#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area
ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
OE1 - OSPF external type 1, OE2 - OSPF external type 2
DHCP - DHCP type
VRF ID: 0
C 192.168.1.0/24 is directly connected, Serial1/0
C 192.168.2.0/24 is directly connected, FastEthernet0/0
第五步:在 ROUTER-A 上 PING 路由器 C
Router-A#ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 56 data bytes
.....
--- 192.168.2.2 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss !不通
第六步:在路由器 A 上配置静态路由
Router-A#config
Router-A_config#ip route 192.168.2.0 255.255.255.0 192.168.1.2 !配置目标网段和下一跳
Router-A_config#ip route 192.168.3.0 255.255.255.0 192.168.1.2
第七步:查看路由表
Router-A#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area
ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
OE1 - OSPF external type 1, OE2 - OSPF external type 2
DHCP - DHCP type
VRF ID: 0
C 192.168.0.0/24 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial1/1
S 192.168.2.0/24 [1,0] via 192.168.1.2 !注意静态路由的管理距离是 1
S 192.168.3.0/24 [1,0] via 192.168.1.2
第八步:配置路由器 B 的静态路由并查看路由表
Router-B#config
Router-B_config#ip route 192.168.0.0 255.255.255.0 192.168.1.1
Router-B_config#ip route 192.168.3.0 255.255.255.0 192.168.2.2
Router-B_config#^Z
Router-B#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area
ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
OE1 - OSPF external type 1, OE2 - OSPF external type 2
DHCP - DHCP type
VRF ID: 0
S 192.168.0.0/24 [1,0] via 192.168.1.1
C 192.168.1.0/24 is directly connected, Serial1/0
C 192.168.2.0/24 is directly connected, FastEthernet0/0
S 192.168.3.0/24 [1,0] via 192.168.2.2
第九步:配置路由器 C 的静态路由并查看路由表
Router-C#config
Router-C_config#ip route 192.168.0.0 255.255.0.0 192.168.2.1 !采用超网的方法
Router-C_config#^Z
Router-C#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP
D - DEIGRP, DEX - external DEIGRP, O - OSPF, OIA - OSPF inter area
ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
OE1 - OSPF external type 1, OE2 - OSPF external type 2
S 192.168.0.0/16 [1,0] via 192.168.2.1 !注意掩码是 16 位
C 192.168.2.0/24 is directly connected, FastEthernet0/0
C 192.168.3.0/24 is directly connected, Ethernet1/0
第十步:测试
Router-C#ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
!!!!! !成功
--- 192.168.0.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 30/32/40 ms
七、 注意事项和排错
1. 非直连的网段都要配置路由
2. 以太网接口要接主机或交换机才能 up
3. 串口注意 DCE 和 DTE 的问题
八、 配置序列
路由器 B 的序列
Router-B#show running-config
Building configuration...
Current configuration:
!
!version 1.3.2E
service timestamps log date
service timestamps debug date
no service password-encryption
!
hostname Router-B
!
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0
no ip directed-broadcast
!
interface Serial1/0
ip address 192.168.1.2 255.255.255.0
no ip directed-broadcast
!
interface Async0/0
no ip address
no ip directed-broadcast
!
!
!
!
ip route 192.168.0.0 255.255.255.0 192.168.1.1
ip route 192.168.3.0 255.255.255.0 192.168.2.2
!
!
九、 共同思考
1. 什么情况下可以采用路由器 C 的超网配置方法?
2. 为什么只有当所有路由器都配置了路由以后才能通?
3. 静态路由有什么优势?什么情况下使用?
十、 课后练习
1. 请将路由器 A 采用缺省路由的方式配置
2. 将地址改为 10.0.0.0/24 这个网段重复以上实验
实验七、路由器静态路由配置
一、 实验目的
二、 应用环境
三、 实验设备
四、 实验拓扑
五、 实验要求
六、 实验步骤
七、 注意事项和排错
八、 配置序列
九、 共同思考
十、 课后练习
本文档为【实验七、路由器静态路由配置】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。