路由与交换实训报告_第1页
路由与交换实训报告_第2页
路由与交换实训报告_第3页
路由与交换实训报告_第4页
路由与交换实训报告_第5页
已阅读5页,还剩66页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

年4月19日路由与交换实训报告文档仅供参考,不当之处,请联系改正。苏州市职业大学实习(实训)报告名称交换与路由技术12月29日至12月30日共1周院系计算机工程系班级10网络安全(CIW)姓名胡帅帅系主任李金祥教研室主任谭方勇指导教师方立刚、高小惠苏州市职业大学实习(实训)任务书 名称:路由与交换起讫时间:12月院系:计算机工程系班级:10网络安全指导教师:方立刚、高小惠系主任:李金祥一、实习(实训)目的和要求学生经过本实训,能够掌握网络的基本配置和管理,熟悉常见的交换和路由设备的特点和性能,能具备网络管理员及网络工程师的基本素质。并可完成《RCNA或CISCO网络工程师》认证。项目一、交换机基本配置、交换机的远程登陆项目二、路由器实现不同VLAN之间互通项目三、链路聚合与生成树协议项目四、网络安全及ACL项目五、局域网和互联网之间的互连(NAT和NAPT)实验六、综合实验(选做)二、实习(实训)内容项目一、交换机基本配置、交换机的远程登陆交换机基本配置交换机的远程登陆项目二、路由器实现不同VLAN之间互通交换机VLAN的划分跨交换机实现相同VLAN的互通路由器实现不同VLAN之间的通信项目三、链路聚合与生成树协议链路聚合aggregeteport生成树协议(STP、RSTP)项目四、网络安全及ACL路由器基本配置、路由器的远程登陆路由器的静态路由网络安全(交换机的端口安全)访问控制列表项目五、局域网和互联网之间的互连(NAT和NAPT)网络地址转换NAT网络地址NAPT实验六、综合实验模拟某学校网络拓扑结构.在该学校网络接入层采用S2126,接入层交换机划分了办公网VLAN2和学生网VLAN4,VLAN2和VLAN4经过汇聚层交换机S3550与路由器A相连,另3550上有一个VLAN3存放一台网管机。路由器A与B经过路由协议获取路由信息后,办公网能够访问B路由器后的FTPserver。为了防止学生网内的主机访问重要的FTPserver,A路由器采用了访问控制列表的技术作为控制手段。F0F0S0S0F0ABF0/5VLAN1F0/5VLAN2VLAN4S2126S3550RA:S0=/30F0=/24;RB:S0=/30F0=/24S3550:VLAN2=/24VLAN3=/24VLAN4=/24FTPserverWebserver=/24VLAN3networkadmin=2/24S2126:VLAN1=/24S3550:VLAN1=/24F0/6F0/6实验要求:根据拓朴图分别在S2126和S3550创立相应VLAN,并在S2126上将F0/10-15加入VLAN2,将F0/16-20加入VLAN4,在S3550上将F0/10-12加入VLAN3在两台交换机之间配置实现冗余链路,解决环路问题S3550经过SVI方式和RA互连S3550配置实现VLAN间互连RA和RB之间采用PPP链路,采用PAP方式进行验证提高链路的安全性。在全网运应RIPV2实现全网互连。经过访问列表控制所有人能够正常访问服务器,只有VLAN4不能够访问FTP服务。经过相关命令显示相关配置结果,并进行验证三、实习(实训)方式■集中□分散□校内□校外四、实习(实训)具体安排序号教学内容题目学时分配小计讲课实训1交换机基本配置、交换机的远程登陆6242路由器实现不同VLAN之间互通543链路聚合与生成树协议544网络安全及ACL4135局域网和互联网之间的互连(NAT和NAPT)436综合实验(2)(2)合计24(2)321(2)五、实习(实训)报告内容(有指导书的可省略)项目一、交换机基本配置、交换机的远程登陆实训要求经过实训熟悉配置环境,学会交换机的基本配置方法和交换机的远程登陆。二.实训步骤开始/程序/附件/通讯/超级终端/连接时使用:TCP/IP/主机地址:/d6/password:star(注释:五个岛每个岛的各个计算机IP地址分别为,,,,。同一个岛各个计算机的IP地址相同)2.开始/运行/telnet/enable/password:star,如图1-1,1-2和1-3所示:图1-1:新建连接图1-2:连接到bbc图1-3:打开超级终端//模式转换SwitchA>//用户模式SwitchA>enablePassword:starSwitchA#//特权模式SwitchA#configterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.SwitchA(config)#//全局模式SwitchA(config)#exit//返回上级模式//交换机命名,设置特权状态密码SwitchA(config)#hostnameswitchA-02-2016:59:05@5-CONFIG:ConfiguredfromoutbandswitchA(config)#enablesecret0aabb//SpecifiesanUNENCRYPTEDpasswordwillfollow-02-2016:59:56@5-CONFIG:ConfiguredfromoutbandswitchA(config)#exitswitchA#exitPressRETURNtogetstarted!switchA>enPassword:aabb//原来为starswitchA#switchA#conterSwitchA(config)#linevty-02-2016:55:29@5-CONFIG:ConfiguredfromoutbandSwitchA(config-line)#exec-timeout1000-02-2016:55:47@5-CONFIG:ConfiguredfromoutbandSwitchA(config-line)#exit-02-2016:55:55@5-CONFIG:ConfiguredfromoutbandSwitchA(config)#switchA#configterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.switchA(config)#noipdomain-lookup-02-2017:02:54@5-CONFIG:ConfiguredfromoutbandswitchA(config)#intfa0/1-02-2017:03:47@5-CONFIG:ConfiguredfromoutbandswitchA(config-if)#speed100-02-2017:04:00@5-CONFIG:ConfiguredfromoutbandswitchA(config-if)#duplexfull-02-2017:04:09@5-CONFIG:ConfiguredfromoutbandswitchA(config-if)#exitswitchA(config)#intvlan1-02-2017:18:16@5-CONFIG:ConfiguredfromoutbandswitchA(config-if)#ipaddress-02-2017:18:42@5-CONFIG:ConfiguredfromoutbandswitchA(config-if)#exit//设置每日提示信息switchA(config)#bannermotd&Welcome!&switchA(config)#endswitchA#exitWelcome!switchA#showrunning-configSystemsoftwareversion:1.61(2)BuildAug31ReleaseBuildingconfiguration...Currentconfiguration:453bytes!version1.0!enableservicesweb-serverhostnameswitchAvlan1!vlan2!enablesecretlevel155$2,1u_;C3&-8U0<D4'.tj9=GQ+/7R:>H!interfacefastEthernet0/1speed100duplexfull!interfacevlan1noshutdownipaddress!interfacevlan2!ipdefault-gateway54snmp-servercommunitypublicrolinevtyexec-timeout1000!lineconsole0exec-timeout30!endswitchA#switchA#showinterfacevlan%Incompletecommand.switchA#showinterfacevlan1Interface:Vlan1Description:AdminStatus:upOperStatus:downHardware:-Mtu:1500LastChange:0d:0h:0m:0sARPTimeout:3600secPhysAddress:00d0.f8db.b176ManagementStatus:EnabledPrimaryInternetaddress:/24Broadcastaddress:55switchA#switchA#showinterfacefa0/1Interface:FastEthernet100BaseTX0/1Description:AdminStatus:upOperStatus:downHardware:10/100BaseTXMtu:1500LastChange:0d:0h:0m:0sAdminDuplex:FullOperDuplex:UnknownAdminSpeed:100OperSpeed:UnknownFlowControlAdminStatus:OffFlowControlOperStatus:OffPriority:0Broadcastblocked:DISABLEUnknownmulticastblocked:DISABLEUnknownunicastblocked:DISABLEswitchA#switchA#showmac-address-tableVlanMACAddressTypeInterfaceswitchA#switchA#showversionSystemdescription:Red-GiantGigabitIntelligentSwitch(S2126G)ByRuijieNetworkSystemuptime:0d:3h:44m:25sSystemhardwareversion:3.3Systemsoftwareversion:1.61(2)BuildAug31ReleaseSystemBOOTversion:RG-S2126G-BOOT03-02-02SystemCTRLversion:RG-S2126G-CTRL03-08-02RunningSwitchingImage:Layer2switchA#showclockSystemclock:-02-2017:31:58SundayswitchA#showconfigUsing181outof6291456bytes!version1.0!enableservicesweb-serverhostnameS2126-2vlan1!enablesecretlevel155$2;C,tZ[30<D+S(\49=G1X)sQ:>H.Y*T!snmp-servercommunitypublicroendswitchA#2.交换机的远程登陆SwitchA(config)#lineconsole0SwitchA(config-line)#linevty04SwitchA(config-line)#enablesecrettcySwitchA(config)#enablepasswordtcy三.项目小结经过实验,我基本掌握了交换机的基本配置方法,也学会了交换机的远程登陆。但还有很多不足的地方,希望能够经过今后的上级操作来逐渐完善自己。项目二、路由器实现不同VLAN之间互通一.实训要求经过实训掌握交换机VLAN的划分,跨交换机实现相同VLAN的互通和路由器实现不同VLAN之间的通信。二.实训步骤1.交换机VLAN的划分SwitchA(config)#SwitchA#%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleSwitchA#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.SwitchA(config)#exitSwitchA#conftSwitchA(config)#vlan10SwitchA(config-vlan)#exitSwitchA(config)#vlan20SwitchA(config-vlan)#exitSwitchA(config)#vlan30SwitchA(config-vlan)#exitSwitchA(config)#vlan40SwitchA(config-vlan)#exitSwitchA(config)#interfacerangefastethernet0/1-5SwitchA(config-if-range)#switchportaccessvlan10SwitchA(config-if-range)#exitSwitchA(config)#interfacerangefastethernet0/6-10SwitchA(config-if-range)#switchportaccessvlan20SwitchA(config-if-range)#exitSwitchA(config)#interfacerangefastethernet0/11-15SwitchA(config-if-range)#switchportaccessvlan30SwitchA(config-if-range)#exitSwitchA(config)#interfacerangefastethernet0/16-20SwitchA(config-if-range)#switchportaccessvlan40SwitchA(config-if-range)#exitSwitchA(config)#interfacevlan10SwitchA(config-if)#%LINK-5-CHANGED:InterfaceVlan10,changedstatetoup%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceVlan10,changedstatetoupSwitchA(config-if)#ipaddressSwitchA(config-if)#exitSwitchA(config)#interfacevlan20SwitchA(config-if)#ipaddressSwitchA(config-if)#exitSwitchA(config)#interfacevlan30SwitchA(config-if)#ipaddressSwitchA(config-if)#exitSwitchA(config)#interfacevlan40SwitchA(config-if)#ipaddressSwitchA(config-if)#exitSwitchA(config)#%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleSwitchA#2.跨交换机实现相同VLAN的互通Switch>enSwitch#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Switch(config)#hostSwitchBSwitchB(config)#vlan10SwitchB(config-vlan)#exitSwitchB(config)#vlan20SwitchB(config-vlan)#exitSwitchB(config)#interfacerangefastethernet0/1-5SwitchB(config-if-range)#switchportaccessvlan10SwitchB(config-if-range)#exitSwitchB(config)#interfacerangefastethernet0/6-10SwitchB(config-if-range)#switchportaccessvlan20SwitchB(config-if-range)#exitSwitchB(config)#interfacevlan10SwitchB(config-if)#%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceVlan10,changedstatetoupSwitchB(config-if)#ipaddressSwitchB(config-if)#exitSwitchB(config)#interfacevlan30SwitchB(config-if)#interfacevlan20%LINK-5-CHANGED:InterfaceVlan20,changedstatetoupSwitchB(config-if)#SwitchB(config-if)#ipaddress%Incompletecommand.SwitchB(config-if)#exit实验结果如图2-1所示:图2-1:跨交换机实现相同VLAN的互通3.路由器实现不同VLAN之间的通信(1)拓扑图将主机A和B划分到VLAN2(将交换机端口1-4划分到VLAN2)中,接在交换机端口2和4con上;将主机C和D划分到VLAN3(将交换机端口9-12划分到VLAN3)中,接在交换机端口10和12上;路由器的FASTETHERNET0接在交换机的端口6上,将交换机端口6设为主干模式。所有设备IP见上图。拓扑图如图2-2所示:图2-2:实验拓扑图(二)、交换机A的配置Switch>enableSwitch#conterSwitch(config)#vlan3Switch(config)#vlan2Switch(config)#exitSwitch#showvlanSwitch(config)#interfa0/1Switch(config-if)#switchportaccessvlan2Switch(config)#interfa0/2Switch(config-range)#switchportaccessvlan2Switch(config-range)#interfa0/3Switch(config-range)#switchportaccessvlan2Switch(config-range)#interfa0/4Switch(config-range)#switchportaccessvlan2Switch(config-range)#interfa0/9Switch(config-range)#switchportaccessvlan3Switch(config-range)#interfa0/10Switch(config-range)#switchportaccessvlan3Switch(config-range)#interfa0/11Switch(config-range)#switchportaccessvlan3Switch(config-range)#interfa0/12Switch(config-range)#switchportaccessvlan3Switch(config-range)#exitSwitch(config)#interfa0/6Switch(config-range)#switchportmodetrunkSwitch(config-range)#exitSwitch(config)#intervlan2Switch(config-if)#ipaddressSwitch(config-if)#exitSwitch(config)#intervlan3Switch(config-if)#ipaddress(三)、路由器配置Router>enableRouter(config)#interfast0/0Router(config-if)#noshutdownRouter(config-if)#interfast0/0.1Router(config-subif)#encapsulationdot1q2Router(config-subif)#ipaddressRouter(config-subif)#interfast0/0.2Router(config-subif)#encapsulationdot1q3Router(config-subif)#ipaddressRouter(config-subif)#end(四)、主机的配置主机A的配置:ipaddress主机B的配置:ipaddress主机C的配置:ipaddress主机D的配置:ipaddress(五)、测试不同VLAN间的连通性1.测试同一VLAN内工作站的连通性。eStations/HOSTCC:>PING(HOSTC与HOSTD间连通性测试)2.测试不同VLAN工作站的连通性。eStations/HOSTCC:>PING(HOSTC与HOSTA间连通性测试)(六).实验结果如图2-3所示:图2-3:测试连通性结果三、项目小结经过本次上机实践,我基本掌握了交换机vlan的划分,在跨交换机的情况下实现相同VLAN之间的互通和在路由器之间实现不同VLAN之间的通信。可是我发现自己的上机操作还不是很熟练,对命令的记忆还不是很深刻,不能完全的脱离教材,以后会努力加强对配置命令的记忆,让自己具备正确快速配置网络设备的能力。项目三.链路聚合与生成树协议实训要求经过实训掌握链路的聚合和生成树协议的相关配置。二.实训步骤1.链路聚合aggregeteport(1)实验拓扑图如图3-1所示:图3-1:实验拓扑图(2)网段划分与IP地址分配1、A组:VLAN10SwitchA:PCA1至PCA5SwitchB:PCA61至PCA1052、B组:VLAN20SwitchA:PCB1,至PCB50SwitchB:PCB66,至PCB1003、C组:VLAN30SwitchA:PCC1192.168.10:11,至PCC55SwitchB:PCC6192.168.10:31,至PCC1054、D组:VLAN40SwitchA:PCD16至PCD60SwitchB:PCD66至PCD100(3)设备配置PC机的配置:以PC0配置为例。如图3-2所示:图3-2:配置pc0的相关网络参数(2)交换机A的配置Switch>enableSwitch#configureterminalSwitch(config)#hostnameSwitchASwitchA(config)#vlan10SwitchA(config-vlan)#exitSwitchA(config)#vlan20SwitchA(config-vlan)#exitSwitchA(config)#vlan30SwitchA(config-vlan)#exitSwitchA(config)#vlan40SwitchA(config-vlan)#exitSwitchA(config)#interfacerangefastethernet0/1-5SwitchA(config-if-range)#switchportaccessvlan10SwitchA(config-if-range)#noshutdownSwitchA(config-if-range)#exitSwitchA(config)#interfacerangefastethernet0/6-10SwitchA(config-if-range)#switchportaccessvlan20SwitchA(config-if-range)#noshutdownSwitchA(config-if-range)#exitSwitchA(config)#interfacerangefastethernet0/11-15SwitchA(config-if-range)#switchportaccessvlan30SwitchA(config-if-range)#noshutdownSwitchA(config-if-range)#exitSwitchA(config)#interfacerangefastethernet0/16-20SwitchA(config-if-range)#switchportaccessvlan40SwitchA(config-if-range)#noshutdownSwitchA(config-if-range)#exitSwitchA(config)#SwitchA(config)#interfacerangefastethernet0/23-24SwitchA(config-if-range)#switchportmodetrunkSwitchA(config-if-range)#noshutdownSwitchA(config-if-range)#exitSwitchA(config)#interfacefastethernet0/23SwitchA(config-if)#channel-group1modeonSwitchA(config-if)#exitSwitchA(config)#interfacefastethernet0/24SwitchA(config-if)#channel-group1modeonSwitchA(config-if)#exitSwitchA(config)#interfacevlan1SwitchA(config-if)#ipaddress00SwitchA(config-if)#noshutdownSwitchA(config-if)#(2)交换机B的配置Switch>enableSwitch#configureterminalSwitch(config)#hostnameSwitchBSwitchB(config)#vlan10SwitchB(config-vlan)#exitSwitchB(config)#vlan20SwitchB(config-vlan)#exitSwitchB(config)#vlan30SwitchB(config-vlan)#exitSwitchB(config)#vlan40SwitchB(config-vlan)#exitSwitchB(config)#interfacerangefastethernet0/1-5SwitchB(config-if-range)#switchportaccessvlan10SwitchB(config-if-range)#noshutdownSwitchB(config-if-range)#exitSwitchB(config)#interfacerangefastethernet0/6-10SwitchB(config-if-range)#switchportaccessvlan20SwitchB(config-if-range)#noshutdownSwitchB(config-if-range)#exitSwitchB(config)#interfacerangefastethernet0/11-15SwitchB(config-if-range)#switchportaccessvlan30SwitchB(config-if-range)#noshutdownSwitchB(config-if-range)#exitSwitchB(config)#interfacerangefastethernet0/16-20SwitchB(config-if-range)#switchportaccessvlan40SwitchB(config-if-range)#noshutdownSwitchB(config-if-range)#exitSwitchB(config)#interfacerangefastethernet0/23-24SwitchB(config-if-range)#switchportmodetrunkSwitchB(config-if-range)#exitSwitchB(config)#interfacefastethernet0/23SwitchB(config-if)#channel-group1modeonSwitchB(config-if)#exitSwitchB(config)#interfacefastethernet0/24SwitchB(config-if)#channel-group1modeonSwitchB(config-if)#exitSwitchB(config)#interfacevlan1SwitchB(config-if)#ipaddress00SwitchB(config-if)#noshutdown2.生成树协议(STP、RSTP)(1)实验拓扑图如图3-3所示:F0/5switchF0/5switchBswitchAPCPCF0/1F0/1F0/2F0/2F0/5图3-3:实验拓扑图(2)交换机A的配置Switch>enPassword:Switch#conftSwitch(config)#vlan10Switch(config-vlan)#namesalesSwitch(config-vlan)#exitSwitch(config)#interf0/5Switch(config-if)#exitSwitch(config)#hostswitchAswitchA(config)#interf0/5switchA(config-if)#switchportaccessvlan10switchA(config-if)#exitswitchA(config)#interrangefa0/1-2switchA(config-if-range)#switchportmodetrunkswitchA(config-if-range)#exitswitchA(config)#spanning-treeswitchA(config)#spanning-treemoderstpswitchA(config)#switchA(config)#exitswitchA#showspanning-treeswitchA#(3)交换机B的配置Switch>enPassword:Switch#conftSwitch(config)#hostswitchBswitchB(config)#vlan10switchB(config-vlan)#namesalesswitchB(config-vlan)#exitswitchB(config)#intefa0/5switchB(config-if)#switchportaccessvlan10switchB(config-if)#endswitchB(config)#interrangefa0/1-2switchB(config-if-range)#switchportmodetrunkswitchB(config-if-range)#exitswitchB(config)#spanning-treeswitchB(config)#spanning-treemoderstpswitchB(config)#exitswitchB#showspanning-tree(4)设置交换机的优先级,指定switchB为根交换机switchB>ENPassword:switchB#conftswitchB(config)#spanning-treepriority4096switchB(config)#endswitchB#showspanning-treeswitchB#(5)查看switchA生成树的配置信息:switchA>enPassword:switchA#showspanning-treeswitchA#(6)分别验证switchA的端口1端口2的状态以及switchB的端口2的状态switchA#showspanning-treeinterfa0/1switchA#switchB#SHOWSPanning-treeINTERFA0/2switchB#(7)测试pc1与pc2之间的网络连通状况,测试结果表明生成树配置成功了,具体测试结果如图3-4所示:图3-4:生成树配置结果测试三.项目小结经过这一次的上机模拟练习,我基本掌握了链路聚合的相关配置,也掌握交换机上生成树协议的诊断方法,收获很多,但还有很多不足的地方,希望以后能够多多上机操作来熟练快速的掌握生成树和聚合链路的相关配置。项目四、网络安全及ACL实训要求经过此次实训掌握路由器基本配置、路由器的远程登陆,路由器的静态路由网络安全(交换机的端口安全)和访问控制列表的使用。二.实训步骤路由器基本配置、路由器的远程登陆(1)路由器基本配置实验拓扑图,如图4-1所示:图4-1:实验拓扑图路由器Ra端口参数的配置:Router>Router>enableRouter#configureterminalRouter(config)#bannermotd&Welcome!&Router(config)#hostnameRaRa(config)#interfaceserial2/0!进入Serial2/0的端口模式Ra(config-if)#ipaddress!配置端口的IP地址Ra(config-if)#clockrate64000!在DCE接口上配置时钟频率64000Ra(config-if)#bandwidth512!配置端口的带宽速率512KBRa(config-if)#noshutdown!开启该端口,使端口转发数据路由器Rb端口参数的配置。Router>Router>enableRouter#configureterminalRouter(config)#hostnameRbRb(config)#interfaceserial3/0Rb(config-if)#ipaddressRb(config-if)#bandwidth512Rb(config-if)#noshutdownRb(config-if)#exitRb(config)#exit查看路由器Rb端口参数的配置。Rb#showinterfaceserial3/0!查看Seriall3/0接口的状态Serial3/0isup,lineprotocolisup!接口状态,是否UPHardwareisHD64570Internetaddressis/24!接口IP地址信息MTU1500bytes,BW512Kbit,DLY1000usec,rely255/255,load1/255!接口的带宽为512K查看路由器Rb端口ip地址和状态。Rb#showipinterfacebriefInterfaceIP-AddressOK?MethodStatusProtocolSerial3/0YESunsetupupSerial2/0unassignedYESunsetadministrativelydowndown查看路由器Ra端口参数的配置。Ra#showinterfaceserial2/0!查看Seriall2/0接口的状态Serial0isup,lineprotocolisup!接口状态,是否UPHardwareisHD64570Internetaddressis/24!接口IP地址信息MTU1500bytes,BW512Kbit,DLY1000usec,rely255/255,load1/255!接口的带宽为512K验证配置。!在RAping对端RBserial1/2接口的IPRa#pingTypeescapesequencetoabort.Sending5,100-byteICMPEchosto,timeoutis2seconds:!!!!!Successrateis100percent(5/5),round-tripmin/avg/max=1/2/4ms路由器远程登录Red-Giant>enRed-Giant#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Red-Giant(config)#hostRouterARouterA(config)#enablesecrettcy1RouterA(config)#enablepasswordtcy2RouterA(config)#lineconsole0RouterA(config-line)#passwordtcyRouterA(config-line)#loginRouterA(config-line)#exitRouterA(config)#linevty04RouterA(config-line)#passwordtcyRouterA(config-line)#loginRouterA(config-line)#endRouterA#2.路由器的静态路由RouterA#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.RouterA(config)#interfaceserial0RouterA(config-if)#exitRouterA(config)#interfaceserial0RouterA(config-if)#ipaddressRouterA(config-if)#clockrate64000RouterA(config-if)#noshutdownRouterA(config-if)#exitRouterA(config)#interfacefastethernet0RouterA(config-if)#ipaddress4RouterA(config-if)#noshutdownRouterA(config-if)#exitRouterA(config)#iproute3%InconsistentaddressandmaskRouterA(config)#exitRouterA#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.RouterA(config)#iprouteserial0RouterA(config)#exitRouterA#3.网络安全(交换机的端口安全)(1)配置交换机端口的最大连接数限制Switch>en Switch#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Switch(config)#interfacerangefastethernet0/1-23 Switch(config-if-range)#switchportport-securityCommandrejected:FastEthernet0/1isadynamicport.Commandrejected:FastEthernet0/2isadynamicport.Commandrejected:FastEthernet0/3isadynamicport.Commandrejected:FastEthernet0/4isadynamicport.Commandrejected:FastEthernet0/5isadynamicport.Commandrejected:FastEthernet0/6isadynamicport.Commandrejected:FastEthernet0/7isadynamicport.Commandrejected:FastEthernet0/8isadynamicport.Commandrejected:FastEthernet0/9isadynamicport.Commandrejected:FastEthernet0/10isadynamicport.Commandrejected:FastEthernet0/11isadynamicport.Commandrejected:FastEthernet0/12isadynamicport.Commandrejected:FastEthernet0/13isadynamicport.Commandrejected:FastEthernet0/14isadynamicport.Commandrejected:FastEthernet0/15isadynamicport.Commandrejected:FastEthernet0/16isadynamicport.Commandrejected:FastEthernet0/17isadynamicport.Commandrejected:FastEthernet0/18isadynamicport.Commandrejected:FastEthernet0/19isadynamicport.Commandrejected:FastEthernet0/20isadynamicport.Commandrejected:FastEthernet0/21isadynamicport.Commandrejected:FastEthernet0/22isadynamicport.Commandrejected:FastEthernet0/23isadynamicport.Switch(config-if-range)#switchportport-securitymaximum1Switch(config-if-range)#switchportport-securityviolationshutdownSwitch(config-if-range)#endSwitch#%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleSwitch#showport-security(2)配置交换机端口的地址绑定.Switch#Switch#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Switch(config)#interfacefastethernet0/3Switch(config-if)#switchportport-securityCommandrejected:FastEthernet0/3isadynamicport.Switch(config-if)#switchportport-securitymac-address4.访问控制列表(1)实验设备:路由器Generic一台,交换机两台,PC四台。路由器Router0的fa0/0(00)接交换机Switch0;路由器R0的fa1/0(00)接交换机Switch1;(2)实验拓扑图如图4-2所示:图4-2:ACL实验拓扑图(3)实验步骤步骤一:在路由器Router0上配置接口fa0/0的IP地址(00/24)和接口fa1/0的IP地址(00/24)。Switch0接PC0和PC1;Switch1接PC2和PC3;如图4-3所示:图4-3:pc0和pc1的相关网络参数的配置Router>Router>enableRouter#configureterminalRouter(config)#hostnameR0R0(config)#interfacefa0/0R0(config-if)#ipaddress00R0(config-if)#noshutdownR0(config-if)#exitR0(config)#interfacefa1/0R0(config-if)#ipaddress00R0(config-if)#noshutdownR0(config-if)#exit步骤二:配置路由器上的标准ACL,使得只有PC0能够访问全部,其它PC不能访问全网。R0#configureterminalR0(config)#access-list1permit1R0(config)#access-list1denyanyR0(config)#interfacefa0/0R0(config-if)#ipaccess-group1inR0(config-if)#endR0#showaccess-listsStandardIPaccesslist1permithost1denyany(12match(es))步骤三:配置路由器上的扩展ACL,允许1到1返回的包,意思就是如果1回1的包就允许,而1主动发起的拼包就不允许。R0>enableR0#configureterminalR0(config)#access-list150permiticmphost1host1echo-reply//允许1到1返回的包,意思就是如果1回1的包就允许,而1主动发起的拼包就不允许。R0(config)#interfacefa0/0R0(config-if)#ipaccess-group150inR0(config-if)#ipaccess-group150outR0(config)#noaccess-list1denyanyR0(config-if)#endR0#showaccess-listsExtendedIPaccesslist150permiticmphost1host1echo-reply(8match(es))StandardIPaccesslist1permithost1(32match(es))denyany测试:PC0pingPC2;PC2pingPC0(4)测试结果如图4-4所示:图4-4:访问控制列表配置测试结果三.项目小结经过本次上机实践,我基本掌握了路由器基本配置、路由器的远程登陆,路由器的静态路由的相关配置,网络安全(交换机的端口安全)以及对访问控制列表的相关配置,可是同时还我发现自己的上机操作还不是很熟练,对命令的记忆还不是很深刻,不能完全的脱离教材和老师给的文档,我以后会努力加强对配置命令的记忆,让自己具备正确快速的配置网络设备的能力,学到更多有用的知识。项目五、局域网和互联网之间的互连(NAT和NAPT)一.实训要求经过实训,掌握局域网和互联网之间的互联(NAT和NAPT)技术,熟练配置静态NAT和动态NAT以及NAPT网络地址端口转换技术。二.实训步骤1.网络地址转换NAT(1)静态NAT地址转换的实验拓扑图,如图5-1所示:图5-1:静态NAT地址转换的实验拓扑图(2)静态NAT地址转换实验步骤:步骤一:配置路由器Router>en //进入特权模式Router#configureterminal //进入全局模式Router(config)#hostnameRouterARouterA(config)#ipnatinsidesourcestatic//配置静态地址映射关系RouterA(config)#ipnatinsidesourcestaticRouterA(config)#ipnatinsidesourcestaticRouterA(config)#interfaceFASTEthernet0/0//配置端口F0/0RouterA(config-if)#ipaddress//配置端口F0/0的IP地址RouterA(config-if)#ipnatinside//配置端口F0/0为内部接口RouterA(config-if)#noshutdown//启动接口RouterA(config-if)#exitRouterA(config)#interfaceserial2/0//配置端口S2/0RouterA(config-if)#ipaddress//配置端口S2/0的IP地址RouterA(config-if)#ipnatoutside//配置端口S2/0为外部接口RouterA(config-if)#noshutdown//启动接口RouterA(config-if)#end步骤二:配置PC1-PC3PC1IPAddress............:SubnetMask...........:DefaultGateway.........:PC2IPAddress............:SubnetMask...........:DefaultGateway.........:PC3IPAddress............:SubnetMask...........:DefaultGateway.........:步骤三:配置完成后能够用以下语句进行查看:RouterA#showipnattranslationsRouterA#showipnatstatistics(3)动态NAT地址转换实验拓扑图,如图5-2所示:图5-2:动态NAT地址转换实验拓扑图(4)动态NAT地址转换实验步骤:步骤一:配置路由器Router>Router>enRouter#conterRouter(config)#interF0/0Router(config-if)#ipaddRouter(config-if)#ipnatinsideRouter(config-if)#noshutRouter(config-if)#exitRouter(config)#interF1/0Router(config-if)#ipaddRouter(config-if)#ipnatoutsideRouter(config-if)#noshutRouter(config-if)#exitRouter(config)#ipnatpoolaanetmaskRouter(config)#access-list1permit55Router(config)#ipnatinsidesourcelist1poolaaRouter(config)#exit步骤二:配置PC1与PC2PC1IPAddress............:SubnetMask...........:DefaultGateway.........:C>ipconfig/ipC>ipconfig/dgPC2IPAddress............:SubnetMask...........:DefaultGateway.........:C>ipconfig/ipC>ipconfig/dg步骤二:测试PC1:C:>pingPingingwith32bytesofdata:Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Pingstatisticsfor:Packets:Sent=5,Received=5,Lost=0(0%loss),Approximateroundtriptimesinmilli-seconds:Minimum=50ms,Maximum=60ms,Average=55msC:>pingPingingwith32bytesofdata:Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Pingstatisticsfor:Packets:Sent=5,Received=5,Lost=0(0%loss),Approximateroundtriptimesinmilli-seconds:Minimum=50ms,Maximum=60ms,Average=55msPC2:C:>pingPingingwith32bytesofdata:Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Replyfrom:bytes=32time=60msTTL=241Pingstatisticsfor:Packets:Sent=5,Received=5,Lost=0(0%loss),Approximateroundtriptimesinmilli-seconds:Minimum=50ms,Maximum=60ms,Average=55ms步骤四:配置完成后能够用以下语句进行查看:RouterA#showipnattranslationsProInsideglobalInsidelocalOutsidelocalOutsideglobalIcmp:9392:9392:9392:9392Icmp:9393:9393:9393:9393Icmp:9394:9394:9394:9394Icmp:9395:9395:9395:9395Icmp:9396:9396:9396:9396RouterA#showipnatstatisticsTotalactivetranslations:1(0static,1dynamic;1extended)Outsideinterfaces:Ethernet1Insideinterfaces:Ethernet0Hits:5Misses:5Expiredtranslations:5Dynamicmappings:--InsideSourceAccesslist+1interfacerefcount02.网络地址NAPTRed-Giant(config)#hostRouterARouterA(config)#interfacefastethernet0RouterA(config-if)#exitRouterA(config)#access-list1permit55RouterA(config)#ipnatinsidesourcelist1interfacefastethernet0RouterA(config)#ipnatinsidesourcelist1interfaceserial0RouterA(config)#interfacefa0RouterA(config-if)#ipaddressRouterA(config-if)#ipnatinsideRouterA(config-if)#noshutRouterA(config-if)#exitRouterA(config)#%UPDOWN:LineprotocolonInterfaceFastEthernet0,changedstatetoup%UPDOWN:InterfaceFastEthernet0,changedstatetoup%UPDOWN:LineprotocolonInterfaceFastEthernet0,changedstatetodownRouterA(config)#interfaces0RouterA(config-if)#ipaddressRouterA(config-if)#ipnat%UPDOWN:InterfaceSerial0,changedstatetodown%Incompletecommand.RouterA(config-if)#ipnatoutsideRouterA(config-if)#noshutRouterA(config-if)#endRouterA#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.RouterA(conf

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论