
网络工程实践报告.doc
10页实践课程设计报告一、交换机实验1、基本配置交换机各命令操作模式的进入和退出Switch>(处于用户模式)Switch>enable14(从用户模式进入特权模式)PasswordadminSwitch#Switch#configureterminal(从特权模式进入全局模式)Switch(config)#Switch(config-if)#exit(1) 交换机主机名的配置Switch(config)#hostnameSA(注:将主机名配置为“SA")SA(config)#(2) 为交换机分配管理IP地址Switch(config)#interfacevlan1(VLAN1是交换机默认的VLAN)Switch(config-if)#ipaddress192.168.120.1255.255.255.0Switch(config-if)#noshutdown2、VLAN的配置创建VLANSwitch(config)#VLAN5(创建VLAN5)Switch(config-vlan)#nameexmp5(将VLAN5命名为exmp5)Switch(config)#VLAN10(创建VLAN10)Switch(config-vlan)#nameexmp10(将VLAN10命名为exmp10)(1) 把交换机端口分配到VLAN中Switch(config)#interfacefastethernet0/5(进入0/5端口模式)Switch(config-if)#switchaccessvlan5(把端口0/5分配给VLAN5)Switch(config)#interfacefastethernet0/10(进入0/10端口模式)Switch(config-if)#switchaccessvlan10(把端口0/10分配给VLAN10)我们还可以把连续若干个端口一次分配给某个VLAN:Switch(config)#interfacerangefastethernet0/2-4Switch(config-if)#switchaccessvlan5显示VLAN信息Switch#showVLAN删除VLANSwitch(config)#noVLAN103、跨交换机的VLAN在交换机SA上创建VLAN10和VLAN20,并把0/10端口划分给VLAN10、0/20端口划分给VLAN20SA(config)#VLAN10SA(config-vlan)#nameexmp10SA(config)#VLAN20SA(config-vlan)#nameexmp20SA(config)#interfacefastethernet0/10SA(config-if)#switchaccessvlan10SA(config)#interfacefastethernet0/20SA(config-if)#switchaccessvlan20把交换机SA上与交换机SB相连的0/24端口配置为Trunk端口SA(config)#interfacefastethernet0/24SA(config-if)#switchportmodetrunk(把端口0/24配置为Trunk端口)(1) 在交换机SB上创建VLAN10,并把0/10端口划分给VLAN10SB(config)#VLAN10SB(config-vlan)#nameexmp10SB(config)#interfacefastethernet0/10SB(config-if)#switchaccessvlan10把交换机SB上与交换机SA相连的端口0/24配置为Trunk端口SB(config)#interfacefastethernet0/24SB(config-if)#switchportmodetrunk验证Trunk端口SA#showinterfacefastethernet0/24switchport4、配置生成树协议在交换机SA上创建VLANSA(config)#VLAN10SA(config-vlan)#nameexmp10SA(config)#VLAN20SA(config-vlan)#nameexmp20SA(config)#interfacefastethernet0/10SA(config-if)#switchaccessvlan10SA(config)#interfacefastethernet0/20SA(config-if)#switchaccessvlan20(1) 在交换机SA上把端口0/23-24配置为Trunk端口SA(config)#interfacerangefastethernet0/23-24SA(config-if)#switchportmodetrunk(2) 在交换机SB上创建VLAN10,并把端口0/10划分到VLAN10中SB(config)#VLAN10SB(config-vlan)#nameexmp10SB(config)#interfacefastethernet0/10SB(config-if)#switchaccessvlan10在交换机SB上把端口0/23-24配置为Trunk端口SB(config)#interfacerangefastethernet0/23-24SB(config-if)#switchportmodetrunk配置快速生成树协议在交换机SA上:SA(config)#spanning-treeSA(config-if)#spanning-treemoderstp在交换机SB上:SB(config)#spanning-treeSB(config-if)#spanning-treemoderstp验证快速生成树协议SA(config)#showspanning-tree二、路由器实验1、基本配置路由器各命令操作模式的进入和退出Router>(处于用户模式)Router>enable14(从用户模式进入特权模式)Password:adminRouter#Router#configureterminal(从特权模式进入全局模式)Router(config)#Router(config)#interfaceserial1/2(从全局模式进入端口模式)Router(config-if)#Router(config-if)#exit(exit是返回上一级模式命令)Router(config)#Router(config-if)#end(exit是返回特权模式命令)Router#路由器命令的帮助信息Router>?(显示当前模式下所有可以执行的命令)Router(config)#int?(显示当前模式下所有以int开头的命令)Router(config-if)#ip?(显示当前模式下ip命令后可以跟随的参数)路由器命令的简写与自动补齐Router(config)#intf1/1(路由器支持命令简写,其代表interfacefastethernet0/5)Router(config)#int(按Tab键将自动补齐interface)Router(config)#interface路由器RA主机名的配置Router(config)#hostnameRA(注:将主机名配置为“RA")RA(config)#为路由器RA的DCE端口分配IP地址、时钟频率和带宽频率RA(config)#interfaceserial1/2(进入RA的s1/2端口模式)RA(config-if)#ipaddressRA(config-if)#clockrate64000(在DCE接口上配置时钟频率为64000,其它端口不用配置)RA(config-if)#bandwidth512(配置端口的带宽频率为512KB)RA(config-if)#noshutdown(使端口处于活动状态)路由器RB端口参数的配置Router(config)#hostnameRBRB(config)#RB(config)#interfaceserial1/3RB(config-if)#ipaddressRB(config-if)#bandwidth512RA(config-if)#noshutdown查看路由器的配置信息RA#showversion(查看路由器版本信息)RA#showrunning-config(查看路由器当前生效配置)RA#showinterfaceSerial1/2(查看端口s1/2配置信息)RA#showiproute(查看路由器路由信息)2、静态路由路由器RA端口参数的配置RA(config)#interfaceserial1/2RA(config-if)#ipaddressRA(config-if)#clockrate64000RA(config-if)#noshutdownRA(config)#interfacefastethernet1/1RA(config-if)#ipaddressRA(config-if)#noshutdown路由器RB端口参数的配置RB(config)#interfaceserial1/3RB(config-if)#ipaddressRB(config-if)#noshutdownRB(config)#interfacefastethernet1/1RB(config-if)#ipaddressRB(config-if)#noshutdown在路由器RA上配置静态路由RA(config)#iproute或:RA(config)#iprouteserial1/2在路由器RB上配置静态路由RB(config)#iproute或:RA(config)#iprouteserial1/3查看路由器上的静态路由信息RA#showipinterfacebrief三、综合实践1、实践题目网络工程实践2、实践要求使用5-6台设备组建连通网络;画出拓扑图;进行子网划分,并给网络中的设备分配IP地址;要包含跨交换机的VLAN;对交换机和路由器进行必要的配置,使不同的子网之间能够进行通信。
3、网络拓扑结构SA10F0/1S1/2S1/3F1/1RCS1/4SVLAN10F0/23F0/23F0/23F0/23SBSCVLAN104、小组成员及分工SA:孟坤SB:贾琳SC:王德卿RA:吴鹏超RB:冯贻国RC:朱宝亮5、设备的配置信息设备RA:设备RB:设备SC:SC(config)#SC(config)#SC(config)#vlan102010-05-0613:36:51@5-CONFIG:ConfiguredfromoutbandSC(config-vlan)#nameexmp102010-05-0613:37:04@5-CONFIG:ConfiguredfromoutbandSC(config-vlan)#exit2010-05-0613:37:20@5-CONFIG:ConfiguredfromoutbandSC(config)#vlan202010-05-0613:37:26@5-CONFIG:ConfiguredfromoutbandSC(config-vlan)#nameexmp202010-05-0613:37:35@5-CONFIG:ConfiguredfromoutbandSC(config-vlan)#exit2010-05-0613:37:43@5-CONFIG:ConfiguredfromoutbandSC(config)#interfacefastethernet0/202010-05-0613:38:43@5-CONFIG:Con。
