子网划分路由配置实验报告
- 格式:doc
- 大小:985.50 KB
- 文档页数:14
实验报告8
图1 (4)配置每台计算机的IP地址。
图2 配置PC0的IP地址
图3 配置PC1的IP地址
图4 配置PC2的IP地址
图5 配置PC3的IP地址
图6 配置PC4的IP地址
(5)配置路由器每个端口的IP地址。
(6)设置路由器中的路由表。
路由表设置要求网络中每个子网之间都可以连通,不考虑总结路由。
【BRANCH1的配置】
下面是配置BRANCH1的IP地址的过程,其它两个路由器的配置自行完成
(1)进入命令行
(2)进行以下操作(蓝色文字是需要输入的命令,红色文字是说明):
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
进入控制台模式
Router>en
进入全局配置模式
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
修改路由器名称
Router(config)#hostname BRANCH1
配置Fa0/0的IP地址
BRANCH1(config)#int f0/0
BRANCH1(config-if)#ip addr 192.168.9.33 255.255.255.240
BRANCH1(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up 配置Fa0/1的IP地址
BRANCH1(config-if)#int f0/1
BRANCH1(config-if)#ip addr 192.168.9.49 255.255.255.240
BRANCH1(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up 配置S0/0的IP地址。因为BRANCH1是BRANCH1和HQ之间串行通信的DCE设备,所以需要配置时钟频率。
BRANCH1(config-if)#int s0/0
BRANCH1(config-if)#ip addr 192.168.9.129 255.255.255.252
BRANCH1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0, changed state to up
BRANCH1(config-if)#clock rate 64000
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
返回到控制台模式。Exit命令返回到上一层,使用Ctrl+Z可以直接返回控制台。
BRANCH1(config-if)#exit
BRANCH1(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
查看IP地址配置情况。
BRANCH1#show ip int bri(抓图如下图7)
图7
按此方法配置其它两个路由器,此时可以测试各个子网和网关的连通情况。
(3)添加路由表。这里没有使用路由总结。
BRANCH1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
BRANCH1(config)#ip route 192.168.9.32 255.255.255.240 f0/0
BRANCH1(config)#ip route 192.168.9.48 255.255.255.240 f0/1
BRANCH1(config)#ip route 192.168.9.0 255.255.255.224 192.168.9.130 BRANCH1(config)#ip route 192.168.9.64 255.255.255.240 192.168.9.130 BRANCH1(config)#ip route 192.168.9.80 255.255.255.240 192.168.9.130返回控制台
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