子网划分路由配置Word下载.docx
《子网划分路由配置Word下载.docx》由会员分享,可在线阅读,更多相关《子网划分路由配置Word下载.docx(14页珍藏版)》请在冰点文库上搜索。
•BRANCH1的LAN1子网需要10个主机IP地址。
•BRANCH1的LAN2子网需要10个主机IP地址。
•BRANCH2的LAN1子网需要10个主机IP地址。
•BRANCH2的LAN2子网需要10个主机IP地址。
•HQ的LAN子网需要20个主机IP地址。
•从HQ到BRANCH1的链路的两端各需要一个IP地址。
•从HQ到BRANCH2的链路的两端各需要一个IP地址。
(注意:
请记住,网络设备的接口也是主机IP地址,已包括在上面的编址需求中。
)
实验内容:
1.设计子网
子网编号
说明
子网地址
子网掩码
第一个可用地址
最后一个可用地址
1
HQ的LAN
192.168.9.0
255.255.255.224
192.168.9.1
192.168.9.30
2
BRANCH1的LAN1
192.168.9.32
255.255.255.240
192.168.9.33
192.168.9.46
3
BRANCH1的LAN2
192.168.9.48
192.168.9.49
192.168.9.62
4
BRANCH2的LAN1
192.168.9.64
192.168.9.65
192.168.9.78
5
BRANCH2的LAN2
192.168.9.80
192.168.9.81
192.168.9.126
6
HQ到BRANCH1
192.168.9.128
255.255.255.252
192.168.9.129
192.168.9.130
7
HQ到BRANCH2
192.168.9.132
192.168.9.133
192.168.9.134
2.分配IP地址(网关地址使用子网的第一个可用地址)
设备
接口
IP地址
默认网关
HQ
Fa0/1
不适用
S0/0
S0/1
BRANCH1
Fa0/0
BRANCH2
PC1
网卡
192.168.9.2
PC2
192.168.9.50
PC3
192.168.9.34
PC4
192.168.9.82
PC5
192.168.9.66
3.连接网络(路由器之间使用DCE电缆连接到串行口
3、配置每个路由器的接口IP:
5配置每台计算机的IP地址
6.设置路由器中的路由表。
【BRANCH1的配置】
下面是配置BRANCH1的IP地址的过程,其它两个路由器的配置自行完成
(1)关闭路由器电源
(2)安装模块WIT-2T。
(3)进入CLI
(4)进行以下操作(蓝色文字是需要输入的命令,红色文字是说明)
Continuewithconfigurationdialog?
[yes/no]:
n
PressRETURNtogetstarted!
进入控制台模式
Router>
en
进入全局配置模式
Router#conft
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
修改路由器名称
Router(config)#hostnameBRANCH1
配置Fa0/0的IP地址
BRANCH1(config)#intf0/0
BRANCH1(config-if)#ipaddr192.168.9.33255.255.255.240
BRANCH1(config-if)#noshutdown
%LINK-5-CHANGED:
InterfaceFastEthernet0/0,changedstatetoup
%LINEPROTO-5-UPDOWN:
LineprotocolonInterfaceFastEthernet0/0,changedstatetoup
配置Fa0/1的IP地址
BRANCH1(config-if)#intf0/1
BRANCH1(config-if)#ipaddr192.168.9.49255.255.255.240
InterfaceFastEthernet0/1,changedstatetoup
LineprotocolonInterfaceFastEthernet0/1,changedstatetoup
配置S0/0的IP地址。
因为BRANCH1是BRANCH1和HQ之间串行通信的DCE设备,所以需要配置时钟频率。
BRANCH1(config-if)#ints0/0
BRANCH1(config-if)#ipaddr192.168.9.129255.255.255.252
InterfaceSerial0/0,changedstatetoup
BRANCH1(config-if)#clockrate64000
LineprotocolonInterfaceSerial0/0,changedstatetoup
返回到控制台模式。
Exit命令返回到上一层,使用Ctrl+Z可以直接返回控制台。
BRANCH1(config-if)#exit
BRANCH1(config)#exit
%SYS-5-CONFIG_I:
Configuredfromconsolebyconsole
查看IP地址配置情况。
BRANCH1#showipintbri
InterfaceIP-AddressOK?
MethodStatusProtocol
FastEthernet0/0192.168.9.33YESmanualupup
FastEthernet0/1192.168.9.49YESmanualupup
Serial0/0192.168.9.129YESmanualupup
Serial0/1unassignedYESmanualadministrativelydowndown
按此方法配置其它两个路由器,此时可以测试各个子网和网关的连通情况。
(5)添加路由表。
这里没有使用路由总结。
BRANCH1#conft
BRANCH1(config)#iproute192.168.9.32255.255.255.240f0/0
BRANCH1(config)#iproute192.168.9.48255.255.255.240f0/1
BRANCH1(config)#iproute192.168.9.0255.255.255.224192.168.9.130
BRANCH1(config)#iproute192.168.9.64255.255.255.240192.168.9.130
BRANCH1(config)#iproute192.168.9.80255.255.255.240192.168.9.130
返回控制台
BRANCH1(config)#^Z
查看路由表
BRANCH1#showiproute
Codes:
C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP
D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterarea
N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2
E1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGP
i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea
*-candidatedefault,U-per-userstaticroute,o-ODR
P-periodicdownloadedstaticroute
Gatewayoflastresortisnotset
192.168.9.0/24isvariablysubnetted,6subnets,3masks
S192.168.9.0/28[1/0]via192.168.9.130
C192.168.9.32/28isdirectlyconnected,FastEthernet0/0
C192.168.9.48/28isdirectlyconnected,FastEthernet0/1
S192.168.9.64/27[1/0]via192.168.9.130
S192.168.9.64/28[1/0]via192.168.9.130
C192.168.9.128/30isdirectlyconnected,Serial0/0
【HQ的配置】
(4)进行以下操作(红色文字是说明)
Router(config)#hostnameHQ
HQ(config)#intf0/1
HQ(config-if)#ipaddr192.168.9.1255.255.255.224
HQ(config-if)#noshutdown
HQ(config-if)#ints0/0
HQ(config-if)#ipaddr192.168.9.130255.255.255.252
配置IP地址
HQ(config-if)#
HQ(config-if)#ints0/1
HQ(config-if)#ipaddr192.168.9.134255.255.255.252
配置DCE设备的时钟频率。
HQ是HQ和BRANCH2之间的DCE设备。
InterfaceSerial0/1,changedstatetoup
HQ(config-if)#clockrate64000
LineprotocolonInterfaceSerial0/1,changedstatetoup
HQ(config-if)#^Z
查看IP地址配置情况
HQ#showipintbri
FastEthernet0/0unassignedYESmanualadministrativelydowndown
FastEthernet0/1192.168.9.1YESmanualupup
Serial0/0192.168.9.130YESmanualupup
Serial0/1192.168.9.134YESmanualupup
添加路由表。
这里使用了路由总结(请自行计算是如何总结的!
),路由表从5条减少到3条。
HQ#conft
HQ(config)#iproute192.168.9.0255.255.255.224f0/1
HQ(config)#iproute192.168.9.32255.255.255.224192.168.9.129
HQ(config)#iproute192.168.9.64255.255.255.224192.168.9.133
HQ(config)#^Z
HQ#showiproute
192.168.9.0/24isvariablysubnetted,5subnets,3masks
C192.168.9.0/27isdirectlyconnected,FastEthernet0/1
S192.168.9.32/27[1/0]via192.168.9.129
S192.168.9.64/27[1/0]via192.168.9.133
C192.168.9.132/30isdirectlyconnected,Serial0/1
HQ#
【BRANCH2的配置】
Router(config)#hostnameBRANCH2
配置每个端口的IP地址
BRANCH2(config)#intf0/0
BRANCH2(config-if)#ipaddr192.168.9.65255.255.255.240
BRANCH2(config-if)#noshutdown
BRANCH2(config-if)#intf0/1
BRANCH2(config-if)#ipaddr192.168.9.81255.255.255.240
BRANCH2(config-if)#ints0/1
BRANCH2(config-if)#ipaddr192.168.9.133255.255.255.252
BRANCH2(config-if)#
BRANCH2(config-if)#^Z
BRANCH2#showipintbri
FastEthernet0/0192.168.9.65YESmanualupup
FastEthernet0/1192.168.9.81YESmanualupup
Serial0/0unassignedYESmanualadministrativelydowndown
Serial0/1192.168.9.133YESmanualupup
添加路由表
BRANCH2#conft
BRANCH2(config)#iproute192.168.9.64255.255.255.240f0/0
BRANCH2(config)#iproute192.168.9.80255.255.255.240f0/1
BRANCH2(config)#iproute192.168.9.0255.255.255.192192.168.9.134
BRANCH2(config)#^Z
BRANCH2#showiproute
*-candidatedefault,U-per-userstatic