1、组网实验实验一 交换机、路由器实验1.1交换机的基本配置一、 实验目的:掌握NetSim模拟器的安装配置掌握交换机的工作原理以及交换机各项基本配置。二、 实验内容及测试结果:您设计的拓扑图:测试结果:交换机测试:S1#logoutRouter con0 is now availablePress RETURN to get started.Password:Enter password:S1enPassword:Password:Enter password:S1#show running-config!Version 12.1service timestamps debug uptimese
2、rvice timestamps log uptimeno service password-encryption!hostname S1ip name-server 0.0.0.0enable secret 5 $sdf$6978yhg$jnb76sdenable password abcde!ip subnet-zerospanning-tree extend system-id!interface FastEthernet0/1!interface FastEthernet0/2!interface FastEthernet0/3PC机测试:C:ping 192.168.0.22Ping
3、ing 192.168.0.22 with 32 bytes of data:Reply from 192.168.0.22: bytes=32 time=60ms TTL=241Reply from 192.168.0.22: bytes=32 time=60ms TTL=241Reply from 192.168.0.22: bytes=32 time=60ms TTL=241Reply from 192.168.0.22: bytes=32 time=60ms TTL=241Reply from 192.168.0.22: bytes=32 time=60ms TTL=241Ping s
4、tatistics for 192.168.0.22: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55msC:ping 192.168.0.11Pinging 192.168.0.11 with 32 bytes of data:Reply from 192.168.0.11: bytes=32 time=60ms TTL=241Reply from 192
5、.168.0.11: bytes=32 time=60ms TTL=241Reply from 192.168.0.11: bytes=32 time=60ms TTL=241Reply from 192.168.0.11: bytes=32 time=60ms TTL=241Reply from 192.168.0.11: bytes=32 time=60ms TTL=241Ping statistics for 192.168.0.11: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip t
6、imes in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55msC:三、算法或核心技术思考体会:1、当由用户模式进入特权模式时,应该输入的密码是abcde还是edcba?为什么?edcba。因为特权密码是edcba.2、在配置文件running-config中口令和密码的显示有什么不同?enable secret 5 $sdf$6978yhg$jnb76sdenable password abcde一个是控制台口令,一个是远程登陆口令。3、如果把PC1的IP地址改为192.168.1.21/24,验证它和PC2能否连通,
7、为什么?不可以ping通,与默认网关不匹配。4、通过 ? 命令查看 sh mac 命令的完整写法是什么?show mac address5、为交换机配置IP地址有什么用途? 使用此IP地址登陆交换机进行管理和设置。四、 附件(源代码)(可选)交换机的配置:SwitchSwitchenableSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S1S1(config)#line console 0S1(config-line)#loginlogin d
8、isabled on line 0 until password is set.S1(config-line)#password 12345S1(config-line)#exitS1(config)#line vty 0 15S1(config-line)#loginlogin disabled on line 0 until password is set.login disabled on line 1 until password is set.login disabled on line 2 until password is set.login disabled on line 3
9、 until password is set.login disabled on line 4 until password is set.login disabled on line 5 until password is set.login disabled on line 6 until password is set.login disabled on line 7 until password is set.login disabled on line 8 until password is set.login disabled on line 9 until password is
10、 set.login disabled on line 10 until password is set.login disabled on line 11 until password is set.login disabled on line 12 until password is set.login disabled on line 13 until password is set.login disabled on line 14 until password is set.login disabled on line 15 until password is set.S1(conf
11、ig-line)#password 54321S1(config-line)#exitS1(config)#enable password abcdeS1(config)#enable secret edcbaS1(config)#interface vlan 1S1(config-if)#ip address 192.168.0.11 255.255.255.0S1(config-if)#no shutdown%LINK-3-UPDOWN: Interface Vlan 1, changed state to upS1(config-if)#exitS1(config)#ip default
12、-gateway 192.168.0.1S1(config)#endS1#2.1路由器的基本配置一、 实验目的:掌握NetSim模拟器的使用掌握复杂情况下路由器、交换机的配置。二、 实验内容及测试结果:(一)您设计的拓扑图:图3.1实验代码及测试结果:(1)路由器配置:Press Enter to StartRouterRouterenRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1R1(config)#line console 0R1(co
13、nfig-line)#login login disabled on line 0 until password is set.R1(config-line)#password 12345R1(config-line)#exit R1(config)#line vty 0 4R1(config-line)#login R1(config-line)#password 54321R1(config-line)#exit R1(config)#enable password abcdeR1(config)#enable secret edcbaR1(config)#interface e0R1(c
14、onfig-if)#ip address 192.168.0.1 255.255.255.0R1(config-if)#no shutdown %LINK-3-UPDOWN: Interface Ethernet0, changed state to upR1(config-if)#interface e1R1(config-if)#exit R1(config)#interface e1R1(config-if)#ip address 192.168.1.1 255.255.255.0R1(config-if)#no shutdown %LINK-3-UPDOWN: Interface Et
15、hernet1, changed state to upR1(config-if)#exitR1(config)#exitR1#exitRouter con0 is now availPress RETURN to get started.Password:Enter password:R1enEnter password:R1#show ip interface briefInterface IP-Address OK? Method Status ProtocolEthernet0 192.168.0.1 YES unset up upEthernet1 192.168.1.1 YES u
16、nset up upR1#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U
17、- per-user static routeGateway of last resort is not setC 192.168.0.0/24 is directly connected, Ethernet0C 192.168.1.0/24 is directly connected, Ethernet1R1#show running-config Building configuration.!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encrypt
18、ion!hostname R1enable secret 5 $sdf$6978yhg$jnb76sdenable password abcde!ip subnet-zero!interface Ethernet0 ip address 192.168.0.1 255.255.255.0 no ip directed-broadcast!(2)Pc1 ping Pc2结果:Boson BOSS 5.0Copyright 1998-2003 Boson Software, Inc.Use the command help to get startedPress Enter to beginC:w
19、inipcfgC:ping 192.168.1.22Pinging 192.168.1.22 with 32 bytes of data:Reply from 192.168.1.22: bytes=32 time=60ms TTL=241Reply from 192.168.1.22: bytes=32 time=60ms TTL=241Reply from 192.168.1.22: bytes=32 time=60ms TTL=241Reply from 192.168.1.22: bytes=32 time=60ms TTL=241Reply from 192.168.1.22: by
20、tes=32 time=60ms TTL=241Ping statistics for 192.168.1.22: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55msC:ping 192.168.0.1Pinging 192.168.0.1 with 32 bytes of data:Reply from 192.168.0.1: bytes=32 time
21、=60ms TTL=241Reply from 192.168.0.1: bytes=32 time=60ms TTL=241Reply from 192.168.0.1: bytes=32 time=60ms TTL=241Reply from 192.168.0.1: bytes=32 time=60ms TTL=241Reply from 192.168.0.1: bytes=32 time=60ms TTL=241Ping statistics for 192.168.0.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Ap
22、proximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55ms(二)您设计的拓扑图:图3.2(1) 路由器R1配置:Press Enter to StartRouterRouterenRouter#CONFIG TEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname r1r1(config)#interface s0r1(config-if)#ip address
23、 192.168.10.1 255.255.255.0r1(config-if)#clock rate 64000r1(config-if)#no shutdown %LINK-3-UPDOWN: Interface Serial0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to downr1(config-if)#exit %LINK-3-UP
24、DOWN: Interface Serial0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to upr1(config)#interface Loopback 0r1(config-if)#ip address 192.168.1.1 255.255.255.0r1(config-if)#no shutdown r1(config-if)#_Z% Invalid input detected at marker.r1(config-if)#exitr1(c
25、onfig)#exitr1#show running-config Building configuration.!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname r1!ip subnet-zero!interface Loopback0 ip address 192.168.1.1 255.255.255.0 no ip directed broadcast!interface Serial0 ip address 1
26、92.168.10.1 255.255.255.0r1#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candi
27、date default U - per-user static routeGateway of last resort is not setC 192.168.10.0/24 is directly connected, Serial0C 192.168.1.0/24 is directly connected, Loopback0r1#show ip interface briefInterface IP-Address OK? Method Status ProtocolSerial0 192.168.10.1 YES unset up upEthernet0 unassigned YE
28、S unset administratively down downLoopback0 192.168.1.1 YES unset up upr1#ping 192.168.10.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.10.2, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms(2)路由器R2配置:Press Enter to StartRouterRout
29、erenable Router#configure tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname r2r2(config)#interface s0r2(config-if)#ip address 192.168.10.2 255.255.255.0r2(config-if)#clock rate 64000r2(config-if)#no shutdown %LINK-3-UPDOWN: Interface Serial0, changed state to upr2(
30、config-if)#exitr2(config)#interface Loopback 0r2(config-if)#ip address 192.168.2.1 255.255.255.0r2(config-if)#no shutdown r2(config-if)#endr2#show running-config Building configuration.!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname r2!ip subnet-zero!interface Loopback0 ip address 192.168.2.1 255.255.255.0 no ip directed broadcast!interface Serial0 ip address 192.168.10.2 255.255.255.0 no ip directed-broadcast clock rate 64000!interface Ethernet0 no ip address no ip directed-broadcast s
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1