通过telnet远程登录路由器一、实验目的1.路由器的用户模式和特权模式的使用方法;2.配置路由器以太网接口的Ip地址;3.配置路由器的enable密码和vty密码;二、实验拓扑三、实验步骤第一步:按照拓扑图搭建实验环境;第二步:实验步骤;(1)步骤一:配置路由器以太网接口IP地址;1、交换机上基本操作Switch>enable \\进入全局模式Switch#conf t \\进入特权模式Switch(config)#interface vlan 1 \\进入端口Switch(config-if)#ip address 192.168.1.10 255.255.255.0 \\配置IP地址Switch(config-if)#no shutdown \\打开端口Switch(conffig-if)#exit \\回到上一步2、配置虚拟终端密码Switch(config)#line vty 0 4 \\进入vty虚拟终端Switch(config-line)#password 123 \\配置telnet密码Switch(config-line)#login \\注册Switch(config-line)#exit \\回到上一级模式下四、实验调试(1)通过telnet访问路由器在计算机配置网卡的IP地址为192.168.1.1/255.255.255.0,并打开DOS命令行窗口。
首先测试计算机和路由器的IP连通性,在进行Telnet远程登录。
如下:Ping statistics for 192.168.1.10:Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),PC>ping 192.168.1.10Pinging 192.168.1.1 with 32 bytes of data:Request timed out.Reply from 192.168.1.10: bytes=32 time=0ms TTL=255Reply from 192.168.1.10: bytes=32 time=0ms TTL=255Reply from 192.168.1.10: bytes=32 time=0ms TTL=255Ping statistics for 192.168.1.10:Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0ms//以上表明计算机能ping通路由器接口fastethernet0/1的IP地址PC>telnet 192.168.1.10 //从计算机telnet路由器以太网卡上的IP地址Trying 192.168.1.10 ...OpenUser Access VerificationPassword:Switch>enablePassword:Switch#//输入vty的密码123、输入enable的密码456,能正常进入路由器的特权模式。
划分VLAN一、实验目的1.VLAN的创建方法;2.把交换机接口划分到特定VLAN的方法;3.配置交换机接口Trunk的方法;4.实现不同VLAN间的通信;二、实验步骤三、实验步骤第一步:按照拓扑图搭建实验环境;第二步:实验步骤;步骤1:在S1上创建VLANS1>enable \\进入配置模式S1#conf t \\进入全局模式S1(config)#vlan 10 \\创建vlan10S1(config-vlan)#exit \\回到上一级S1(config)#vlan 20 \\创建vlan20S1(config-vlan)#exit \\回到上一级步骤2:将端口划分到指定VLAN中S1(config)#interface f0/1 \\ 进入端口S1(config-if)#switchport mode access \\将模式改为access S1(config-if)#switchport access vlan 10 \\端口划分到vlan10 S1(config-if)#exit \\回到上一级S1(config)#interface f0/2 \\ 进入端口S1(config-if)#switchport mode access \\将模式改为access S1(config-if)#switchport access vlan 20 \\端口划分到vlan20 S1(config-if)#exit \\回到上一级步骤3:将指定端口改为Trunk模式S1(config)#interface f0/11 \\ 进入端口S1(config-if)#switch mode trunk \\将模式改为trunk S1(config-if)#switchport trunk native vlan 10 \\允许vlan10通过S1(config-if)#switchport trunk native vlan 20 \\允许vlan10通过S1(config-if)#end \\结束S2交换机上操作步骤1:在S2上创建VLANS1>enable \\进入配置模式S1#conf t \\进入全局模式S1(config)#vlan 10 \\创建vlan10S1(config-vlan)#exit \\回到上一级S1(config)#vlan 20 \\创建vlan20S1(config-vlan)#exit \\回到上一级步骤2:将端口划分到指定VLAN中S1(config)#interface f0/1 \\ 进入端口S1(config-if)#switchport mode access \\模式改为access S1(config-if)#switchport access vlan 10 \\端口划分vlan10 S1(config-if)#exit \\回到上一级S1(config)#interface f0/2 \\ 进入端口S1(config-if)#switchport mode access \\将模式改access S1(config-if)#switchport access vlan 20 \\端口划vlan20 S1(config-if)#exit \\回到上一级步骤3:将指定端口改为Trunk模式S1(config)#interface f0/11 \\ 进入端口S1(config-if)#switch mode trunk \\模式改为trunk S1(config-if)#switchport trunk native vlan 10 \\允许vlan10通过S1(config-if)#switchport trunk native vlan 20 \\允许vlan10通过S1(config-if)#end \\结束四、实验调试在PC机上进行ip地址访问(1)在PC1下Pinging 192.168.1.3 with 32 bytes of data:Reply from 192.168.1.3: bytes=32 time=0ms TTL=128 Reply from 192.168.1.3: bytes=32 time=0ms TTL=128 Reply from 192.168.1.3: bytes=32 time=4ms TTL=128 Reply from 192.168.1.3: bytes=32 time=1ms TTL=128 Ping statistics for 192.168.1.3:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 4ms, Average = 1ms//PC1与PC3在同一VLAN下,故能ping通Ping statistics for 192.168.1.4:Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), PC>ping 192.168.1.4Pinging 192.168.1.4 with 32 bytes of data: Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for 192.168.1.4:Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), //PC1与PC4不在同一VLAN下,故不能ping通Etherchannel链路聚合配置一、实验目的1.Etherchannel的工作原理;2.Etherchannel的配置;二、实验拓扑三、实验步骤第一步:按照拓扑图搭建实验环境;第二部:实验步骤;步骤1:配置EtherchannelR1路由器上操作S1>enable \\进入配置模式S1#conf t \\进入全局模式S1(config)#interface port-channel 1 \\创建以太通道S1(config)#exit \\返回全局模式S1(config-if)#interface range f0/11-12 \\进入端口S1(config-if-range)#channel-group 1 mode on \\接口指定到创建的通道中S1(config-if-range)#exit \\回到上一级S1(config)#interface port-channel 1 \\进入以太通道中S1(config-if)#switchport mode trunk \\将模式改为Trunk模式S1(config-if)#end \\结束R2路由器上操作S1>enable \\进入配置模式S1#conf t \\进入全局模式S1(config)#interface port-channel 1 \\创建以太通道S1(config)#exit \\返回全局模式S1(config-if)#interface range f0/11-12 \\进入端口S1(config-if-range)#channel-group 1 mode on \\接口指定到创建的通道中S1(config-if-range)#exit \\回到上一级S1(config)#interface port-channel 1 \\进入以太通道中S1(config-if)#switchport mode trunk \\将模式改为Trunk模式S1(config-if)#end \\结束四、实验调试(3)查看etherchannel信息S1#show etherchannel summaryFlags: D - down P - in port-channelI - stand-alone s - suspendedH - Hot-standby (LACP only)d - default portNumber of channel-groups in use: 1Number of aggregators: 1Group Port-channel Protocol Ports------+-------------+-----------+-----------------------------------------------1 Po1(SU) - Fa0/13(P) Fa0/14(P)//可以看到 EtherChannel 已经形成,“SU”表示 EtherChannel 正常,如果显示为“SD”,把EtherChannel 接口关掉重新开启。