局域网技术与组网工程网络综合实习任务书参考解答.docx
《局域网技术与组网工程网络综合实习任务书参考解答.docx》由会员分享,可在线阅读,更多相关《局域网技术与组网工程网络综合实习任务书参考解答.docx(15页珍藏版)》请在冰豆网上搜索。
局域网技术与组网工程网络综合实习任务书参考解答
计算机网路综合实习任务书
网络功能描述
迅捷公司是一家自行车产品销售公司,该公司企业网规划拓扑如图1所示。
图1网络拓扑
迅捷公司企业网规划中,使用一台接入路由器,把公司内网连接到Internet中,实现和Internet中网络服务器(标识名PC4)访问。
迅捷公司企业网内部,使用一台三层交换机(标识名A)作为网络核心,实现全网汇聚功能,网络服务器(标识名PC3)连接在核心交换机上,提供全网网络管理和资源共享服务。
公司使用另一台(标识名B)作为热备份,二台设备之间通过双链路实现网络可靠性。
公司办公区所有计算机,通过二层交换机F接入,实现销售部、产品开发部和行政管理部设备接入到网络核心。
为解决部门间网络安全,减少网间广播,需要通过技术把部门间计算机隔离开。
所有设备之间连接拓扑如图1所示,各设备连接接口及接口地址规划根据实际需要自行设定。
网络中使用4台计算机模拟实现服务器(标识名Server1、Server2)和测试机(标识名PC1、PC2)功能。
第一部分 组网及网络设备配置
1、交换网功能配置
(1)制作网线:
制作15根网线,其中5根用于网络设备间连接,10根作为备用线(要求为5根直连线和5根交叉线)。
解答:
直连线的顺序:
白橙、橙、白绿、蓝、白蓝、绿、白棕、棕(两头一样)
交叉线的顺序:
白橙、橙、白绿、蓝、白蓝、绿、白棕、棕(一头)
白绿、绿、白橙、蓝、白蓝、橙、白棕、棕(另一头)
(2)在F上创建虚拟局域网VLAN10和VLAN20,其中交换机1~7接口分配给销售部,8~15接口分配给产品开发部,销售部和产品开发部接入PC1和PC2,连接在相应VLAN接口上。
解答:
实验拓扑
使用一台交换机和两台PC机,还将其中PC1作为控制台终端,使用Console口配置方式(在我院网路工程实验室使用串口服务器连接设备,选择超级终端->TCP/IP->输入IP->;输入端口号),使用两根网线分别将PC1和PC2连接到交换机的RJ-45接口上。
实验步骤:
第一步:
交换机恢复出厂设置
switch#setdefault
switch#write
switch#reload
第二步:
给交换机设置IP地址即管理IP。
switch#config
switch(Config)#interfacevlan1
switch(Config-If-Vlan1)#ipaddress192.168.1.11255.255.255.0
switch(Config-If-Vlan1)#noshutdown
switch(Config-If-Vlan1)#exit
switch(Config)#exit
第三步:
创建vlan10和vlan20。
switch(Config)#
switch(Config)#vlan10
switch(Config-Vlan100)#exit
switch(Config)#vlan20
switch(Config-Vlan200)#exit
switch(Config)#
验证配置:
switch#showvlan
……
10VLAN010StaticENET!
已经创建了vlan10,vlan10中没有端口;
20VLAN020StaticENET!
已经创建了vlan20,vlan20中没有端口;
第四步:
给vlan10和vlan20添加端口。
switch(Config)#vlan10!
进入vlan10
switch(Config-Vlan10)#switchportinterfaceethernet0/0/1-7
!
给vlan100加入端口1-7
SettheportEthernet0/0/1accessvlan10successfully
SettheportEthernet0/0/2accessvlan10successfully
SettheportEthernet0/0/3accessvlan10successfully
SettheportEthernet0/0/4accessvlan10successfully
SettheportEthernet0/0/5accessvlan10successfully
SettheportEthernet0/0/6accessvlan10successfully
SettheportEthernet0/0/7accessvlan10successfully
switch(Config-Vlan10)#exit
switch(Config)#vlan20!
进入vlan20
switch(Config-Vlan200)#switchportinterfaceethernet0/0/8-15
!
给vlan200加入端口8-15
SettheportEthernet0/0/8accessvlan20successfully
SettheportEthernet0/0/9accessvlan20successfully
SettheportEthernet0/0/10accessvlan20successfully
SettheportEthernet0/0/11accessvlan20successfully
SettheportEthernet0/0/12accessvlan20successfully
SettheportEthernet0/0/13accessvlan20successfully
SettheportEthernet0/0/14accessvlan20successfully
SettheportEthernet0/0/15accessvlan20successfully
switch(Config-Vlan20)#exit
验证配置:
switch#showvlan
VLANNameTypeMediaPorts
---------------------------------------------------------------------------
1defaultStaticENETEthernet0/0/16Ethernet0/0/17Ethernet0/0/18
Ethernet0/0/19Ethernet0/0/20Ethernet0/0/21
Ethernet0/0/22Ethernet0/0/23Ethernet0/0/24
10VLAN010StaticENETEthernet0/0/1Ethernet0/0/2
Ethernet0/0/3Ethernet0/0/4
Ethernet0/0/5Ethernet0/0/6
Ethernet0/0/7
20VLAN020StaticENETEthernet0/0/8Ethernet0/0/9Ethernet0/0/10
Ethernet0/0/11Ethernet0/0/12Ethernet0/0/13Ethernet0/0/14Ethernet0/0/15
(3)F通过23、24端口和2台核心交换机连接,实现VLAN10(销售部)和VLAN20(产品开发部)间设备互访。
解答:
分别在两台核心交换机A、B中创建虚拟局域网VLAN10、VLAN20,注意23、23两个端口的模式为干路(trunk).
设置交换机trunk端口
交换机F:
switchF(Config)#interfaceethernet0/0/23
switchF(Config-Ethernet0/0/23)#switchportmodetrunk
SettheportEthernet0/0/23modeTRUNKsuccessfully
switchF(Config-Ethernet0/0/23)#switchporttrunkallowedvlanall
settheportEthernet0/0/23allowedvlansuccessfully
switchF(Config-Ethernet0/0/23)#exit
switchF(Config)#
switchF(Config)#interfaceethernet0/0/24
switchF(Config-Ethernet0/0/24)#switchportmodetrunk
SettheportEthernet0/0/24modeTRUNKsuccessfully
switchF(Config-Ethernet0/0/24)#switchporttrunkallowedvlanall
settheportEthernet0/0/24allowedvlansuccessfully
switchF(Config-Ethernet0/0/24)#exit
switchF(Config)#
交换机A、B配置与交换机F的配置类似。
(4)A作为网络核心交换机,B作为核心交换机热备份,通过13、14端口实现冗余连接,实现聚合链接、均衡负载功能。
解答:
配置聚合链接实验拓扑
实验步骤
第一步、创建portgroup
交换机A:
switchA(Config)#port-group1
switchA(Config)#
验证配置:
switchA#showport-groupdetail
Sortedbytheportsinthegroup1:
--------------------------------------------
switchA#showport-groupbrief
Port-groupnumber:
1
Numberofportsinport-group:
0Maxportsinport-channel=8
Numberofport-channels:
0Maxport-channels:
1
switchA#
交换机B
switchB(Config)#port-group2
switchB(Config)#
第二步、手工生成链路聚合组
交换机A:
switchA(Config)#interfaceethernet0/0/13-14
switchA(Config-Port-Range)#port-group1modeon
switchA(Config-Port-Range)#exit
switchA(Config)#interfaceport-channel1
switchA(Config-If-Port-Channel1)#
交换机B:
switchB(Config)#inte0/0/13-14
switchB(Config-Port-Range)#port-group2modeon
switchB(Config-Port-Range)#exit
switchB(Config)#interfaceport-channel2
switchB(Config-If-Port-Channel2)#
验证配置:
switchA#showport-groupbrief
Port-groupnumber:
1
……
验证配置:
switchB#showport-groupbrief
Port-groupnumber:
2
……
交换机负载均衡配置:
第一步、启动QoS功能:
在全局下启动和关闭QoS功能。
必须在全局下启动QoS功能后才
能配置其它的QoS命令。
switchA(Config)#mlsqos
switchA(Config)#
switchB(Config)#mlsqos
switchB(Config)#
第二步、配置分类表(classmap):
建立一个分类规则,可以按照ACL,VLANID,IPPrecedent,
DSCP来分类。
本实验中,按照ACL,所以首先配置一个名字为qos_acl的ACL。
SwitchA(Config)#ipaccess-liststandardqos_acl
switchA(Config-Std-Nacl-qos_acl)#permit192.168.10.1010.0.0.255
switchA(Config-Std-Nacl-qos_acl)#exit
再创建一个名字为qos_class的class-map.
switchA(Config)#class-mapqos_class
switchA(Config-ClassMap)#matchaccess-groupqos_acl
switchA(Config-ClassMap)#exit
switchA(Config)#
第三步、配置策略表(policymap)
建立一个策略表,可以对相应的分类规则进行带宽限制,优先级降低等操作。
switchA(Config)#policy-mapqos10
switchA(Config-PolicyMap)#classqos_class
switchA(Config-Policy-Class)#setipdscp0
switchA(Config-Policy-Class)#exit
switchA(Config-PolicyMap)#exit
switchA(Config)#
第四步、将QoS应用到端口
配置端口的信任模式,或者绑定策略。
策略只有绑定到具体的端口,才在此端口生效。
switchA(Config)#interfaceethernet0/0/13
switchA(Config-Ethernet0/0/13)#service-policyinputqos10
switchA(Config-Ethernet0/0/13)#exit
switchA(Config)#
switchA(Config)#interfaceethernet0/0/14
switchA(Config-Ethernet0/0/14)#service-policyinputqos10
switchA(Config-Ethernet0/0/14)#exit
switchA(Config)#
switchB(Config)#interfaceethernet0/0/13
switchB(Config-Ethernet0/0/13)#service-policyinputqos10
switchB(Config-Ethernet0/0/13)#exit
switchB(Config)#
switchB(Config)#interfaceethernet0/0/14
switchB(Config-Ethernet0/0/14)#service-policyinputqos10
switchB(Config-Ethernet0/0/14)#exit
switchB(Config)#
……
(5)设置核心交换机A为根交换机(优先级为0),全网启用快速生成树,实现网络连接的稳定性。
解答:
第一步:
正确连接网线,交换机全部恢复出厂设置,做初始配置,避免广播风暴出现交换机A:
switch#config
switch(Config)#hostnameswitchA
switchA(Config)#interfacevlan1
switchA(Config-If-Vlan1)#ipaddress192.168.1.11255.255.255.0
switchA(Config-If-Vlan1)#noshutdown
switchA(Config-If-Vlan1)#exit
switchA(Config)#spanning-tree
MSTPisstartingnow,pleasewait...........
MSTPisenabledsuccessfully.
switchA(Config)#
交换机B:
switch#config
switch(Config)#hostnameswitchB
switchB(Config)#interfacevlan1
switchB(Config-If-Vlan1)#ipaddress192.168.1.12255.255.255.0
switchB(Config-If-Vlan1)#noshutdown
switchB(Config-If-Vlan1)#exit
switchB(Config)#spanning-tree
MSTPisstartingnow,pleasewait...........
MSTPisenabledsuccessfully.
switchB(Config)#
2、路由网功能配置
(1)核心交换机A通过三层接口Fa0/1实现和路由器R的Eth0/0接口连接,实现和Internet中服务器PC4连通。
解答:
核心交换机A接口Fa0/1
SwitchA(config)#interfaceFa0/1
SwitchA(config-Fa0/1)#ipaddress192.168.1.1255.255.255.252
SwitchA(config-Fa0/1)#exit
(2)全网设备通过OSPF协议实现连通。
解答:
启动OSPF协议,并将对应的直连网段配置到OSPF进程中
交换机A:
SWITCHA(Config)#routerospf
OSPFprotocolisworking,pleasewaiting.......
OSPFprotocolhasenabled!
SWITCHA(Config-Router-Ospf)#exit
SWITCHA(Config)#interfacevlan1
SWITCHA(Config-If-Vlan1)#ipospfenablearea0
SWITCHA(Config-If-Vlan1)#
SWITCHA(Config)#interfacevlan10
SWITCHA(Config-If-Vlan10)#ipospfenablearea0
SWITCHA(Config-If-Vlan10)#
SWITCHA(Config)#interfacevlan20
SWITCHA(Config-If-Vlan20)#ipospfenablearea0
SWITCHA(Config-If-Vlan20)#exit
验证配置:
SWITCHA#showiproute
……
交换机B配置与交换机A配置类似。
路由器R的配置
Router-R#conf
Router-R_config#routerospf100
Router-R_config_ospf_100#network119.1.1.0255.255.255.0area1
Router-R_config_ospf_100#network192.168.1.0255.255.255.0area1
Router-R_config_ospf_100#^Z
(3)核心交换机上配置VRRP虚拟路由冗余技术,实现网络稳定。
解答:
配置VRRP
交换机A:
SWITCHA(config)#routervrrp1
SWITCHA(config-router)#virtual-ip172.16.1.1master
SWITCHA(config-router)#interfacevlan10
SWITCHA(config-router)#enable
交换机SWITCHB:
SWITCHB(config)#routervrrp1
SWITCHB(config-router)#virtual-ip172.16.1.2backup
SWITCHB(config-router)#interfacevlan10
SWITCHB(config-router)#enable
验证配置:
SWITCHA#showvrrp
……
(4)路由器R配置Nat技术,实现企业网中私有地址和Internet中服务器PC4连接。
解答:
第一步:
按实验三和上表将接口地址和PC4地址配置好,并且做连通性测试
第二步:
配置ROUTER-R的NAT
Router-R#config
Router-R_config#ipRccess-liststRndRrd1
!
定义访问控制列表
Router-R_config_std_nRcl#permit119.1.1.0255.255.255.0!
定义允许转换的源地址范围
Router-R_config_std_nRcl#exit
Router-R_config#ipNATpooloverld192.168.1.1192.168.1.25425255.255.255.0
!
定义名为overld的转换地址池
Router-R_config#ipNATinsidesourcelist1pooloverldoverloRd
!
配置将RCL允许的源地址转换成overld中的地址,并且做PRT的地址复用
Router-R_config#intf0/0
Router-R_config_f0/0#ipNATinside
Router-R_config_f0/0#ints1/1
Router-R_config_s1/1#ipNAToutside
Router-R_config_s1/1#exit
!
定义F0/0为内部接口
!
定义S1/1为外部接口
Router-R_config#iproute0.0.0.00.0.0.0192.168.1.2!
配置路由器R的缺省路由
(5)置核心交换机,实现全网中所有计算机,由网络中心dhcp服务器PC3获取地址,实现和Internet中服务器PC4连通。
解答:
配置DHCP中继
switchA(Config)#servicedhcp
switchA(Config)#ipforward-protocoludp67
switchA(Config)#interfacevlan1
switchA(Conf