子网划分路由配置实验报告
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
实验报告8
实验步骤(1)设计子网
子网编号说明子网地址子网掩码第一个可用地址最后一个可用地址1HQ 的LAN
的LAN 1
的LAN 2
的LAN 1
的LAN 2
到BRANCH1
到BRANCH2
表1
(2)分配IP地址(网关地址使用子网的第一个可用地址)
设备接口IP地址子网掩码默认网关
HQ Fa0/1不适用
S0/0不适用
S0/1不适用
BRANCH1Fa0/0 1 不适用
Fa0/1不适用
S0/0不适用
BRANCH2Fa0/0不适用
Fa0/1不适用
S0/1不适用
PC1网卡
网卡
网卡
网卡
网卡
表2
(3)连接网络,(除路由器之间,其他的各设备都用直通线连接)。
关闭路由器电源,安装模块WIT-2T。(路由器之间使用DCE电缆连接到串行口),如图1所示:
图1
(4)配置每台计算机的IP地址。
图2 配置PC0的IP地址
图3 配置PC1的IP地址
图4 配置PC2的IP地址
图5 配置PC3的IP地址
图6 配置PC4的IP地址(5)配置路由器每个端口的IP地址。
图7
按此方法配置其它两个路由器,此时可以测试各个子网和网关的连通情况。
(3)添加路由表。这里没有使用路由总结。
BRANCH1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
BRANCH1(config)#ip route f0/0
BRANCH1(config)#ip route f0/1
BRANCH1(config)#ip route route route 返回控制台
BRANCH1(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
查看路由表
BRANCH1#show ip route(抓图如下图8)
图8
【HQ的配置】
(1)进入命令行。
(2)进行以下操作(红色文字是说明):
Continue with configuration dialog [yes/no]: n
Press RETURN to get started!
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname HQ
配置IP地址HQ(config)#int f0/1
HQ(config-if)#ip addr shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up HQ(config-if)#int s0/0
HQ(config-if)#ip addr shutdown
%LINK-5-CHANGED: Interface Serial0/0, changed state to up
HQ(config-if)#clock rate 64000
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
HQ(config-if)#int s0/1
HQ(config-if)#ip addr shutdown
配置DCE设备的时钟频率。HQ是HQ和BRANCH2之间的DCE设备。
%LINK-5-CHANGED: Interface Serial0/1, changed state to up
HQ(config-if)#clock rate 64000
HQ(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up
HQ(config-if)#^Z
%SYS-5-CONFIG_I: Configured from console by console
查看IP地址配置情况
HQ#show ip int bri(抓图如下图9)
图9
添加路由表。这里使用了路由总结,路由表从5条减少到3条。
HQ#conf t
Enter configuration commands, one per line. End with CNTL/Z.
HQ(config)#ip route f0/1
HQ(config)#ip route route Configured from console by console
HQ#show ip route(抓图如下图10)
图10【BRANCH2的配置】
(1)进入命令行。
(2)进行以下操作(红色文字是说明)
Continue with configuration dialog [yes/no]: n
Press RETURN to get started!
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname BRANCH2
配置每个端口的IP地址
BRANCH2(config)#int f0/0
BRANCH2(config-if)#ip addr shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
BRANCH2(config-if)#int f0/1
BRANCH2(config-if)#ip addr shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
BRANCH2(config-if)#int s0/1
BRANCH2(config-if)#ip addr shutdown