【实验分享】Switch基本配置

这篇具有很好参考价值的文章主要介绍了【实验分享】Switch基本配置。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

​实验目的:

l配置交换机的基本命令

实验说明:

Cisco的交换机配置命令和Router的配置命令基本一致, 故这里不做详细介绍

实验拓扑图:

实验步骤:

  1. 了解基本配置

Sw1#configure terminal

Sw1(config)# interface fastethernet0/10

Sw1(config-if)#speed 10

Sw1(config-if)#duplex half

Sw1(config-if)#description test

Sw1(config-if)#end

Sw1#sh int f0/10 status

Port Name Status Vlan Duplex Speed Type

Fa0/10 test notconnect 1 half 10 10/100BaseTX

Sw1#sh int fa0/11

FastEthernet0/11 is up, line protocol is up

Hardware is Fast Ethernet, address is 000d.2960.8bcb (bia 000d.2960.8bcb)

MTU 1500 bytes, BW 100000 Kbit, DLY 1000 usec,

 reliability 255/255, txload 1/255, rxload 1/255

Encapsulation ARPA, loopback not set

Keepalive set (10 sec)

Full-duplex, 100Mb/s

input flow-control is off, output flow-control is off

ARP type: ARPA, ARP Timeout 04:00:00

Last input 00:00:00, output 00:00:01, output hang never

Last clearing of “show interface” counters never

Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0

Queueing strategy: fifo

Output queue :0/40 (size/max)

5 minute input rate 0 bits/sec, 0 packets/sec

5 minute output rate 0 bits/sec, 0 packets/sec

 5751 packets input, 414216 bytes, 0 no buffer

 Received 5680 broadcasts, 0 runts, 0 giants, 0 throttles

 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

 0 watchdog, 5680 multicast, 0 pause input

 0 input packets with dribble condition detected

 119 packets output, 12781 bytes, 0 underruns

 0 output errors, 0 collisions, 2 interface resets

 0 babbles, 0 late collision, 0 deferred

 0 lost carrier, 0 no carrier, 0 PAUSE output

 0 output buffer failures, 0 output buffers swapped out

Sw1#sh int fa0/1 switchport

Name: Fa0/1

Switchport: Enabled

Administrative Mode: dynamic desirable

Operational Mode: down

Administrative Trunking Encapsulation: dot1q

Negotiation of Trunking: On

Access Mode VLAN: 1 (default)

Trunking Native Mode VLAN: 1 (default)

Administrative private-vlan host-association: none

Administrative private-vlan mapping: none

Operational private-vlan: none

Trunking VLANs Enabled: ALL

Pruning VLANs Enabled: 2-1001

Protected: false

Voice VLAN: none (Inactive)

Appliance trust: none

Sw1#sh run int f0/1

Building configuration…

Current configuration : 89 bytes

!

interface FastEthernet0/1

description test

no ip address

duplex half

speed 10

end

Sw1#show version

Cisco Internetwork Operating System Software

IOS ™ C2960 Software (C2960-I6Q4L2-M), Version 12.2(11)EA1, RELEASE SOFTWARE (fc1)

Copyright © 1986-2007 by cisco Systems, Inc.

Compiled Wed 28-Aug-02 10:25 by antonino

Image text-base: 0x80010000, data-base: 0x80528000

ROM: Bootstrap program is CALHOUN boot loader

Sw1 uptime is 30 minutes

System returned to ROM by power-on

System image file is “flash:/c2960-i6q4l2-mz.122-11.EA1.bin”

cisco WS-C2960-24 (RC32300) processor (revision J0) with 20402K bytes of memory.

Processor board ID FOC0725Y05M

Last reset from system-reset

Running Standard Image

24 FastEthernet/IEEE 802.3 interface(s)

32K bytes of flash-simulated non-volatile configuration memory.

Base ethernet MAC Address: 00:0D:29:60:8B:C0

Motherboard assembly number: 73-5782-11

Power supply part number: 34-0965-01

Motherboard serial number: FOC07250XZ2

Power supply serial number: DAB07226HJ0

Model revision number: J0

Motherboard revision number: A0

Model number: WS-C2960-24

System serial number: FOC0725Y05M

Configuration register is 0xF

Sw1(config)#do sh vlan b

VLAN Name Status Ports


1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                            Fa0/5, Fa0/6, Fa0/7, Fa0/8

                                            Fa0/9, Fa0/10(省略)

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

Sw1#sh int trunk

Port Mode Encapsulation Status Native vlan

Fa0/11 desirable 802.1q trunking 1

Fa0/12 desirable 802.1q trunking 1

Port Vlans allowed on trunk

Fa0/11 1-4094

Fa0/12 1-4094

Port Vlans allowed and active in management domain

Fa0/11 1

Fa0/12 1

Port Vlans in spanning tree forwarding state and not pruned

Fa0/11 1

Fa0/12 none

Sw1(config)#vlan 20

Sw1(config-vlan)#name G-LAB20

Sw1(config-vlan)#end

Sw1#vlan database

Sw1(vlan)#vlan 30 name G-LAB30

VLAN 30 added:

Name: G-LAB30

Sw1(vlan)#exit

APPLY completed.

Exiting…

Sw1#

Sw1#show vlan brief

VLAN Name Status Ports


1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                            Fa0/5, Fa0/6, Fa0/7, Fa0/8

                                            Fa0/9, Fa0/10

20 G-LAB20 active

30 G-LAB30 active

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

Sw1#

Sw1(config)#no vlan 30

Sw1(config)#do sh vlan b

VLAN Name Status Ports


1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                            Fa0/5, Fa0/6, Fa0/7, Fa0/8

                                            Fa0/9, Fa0/10

20 G-LAB20 active

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

Sw1(config)#int fa0/1

Sw1(config-if)#switchport mode access

Sw1(config-if)#switchport access vlan 20

Sw1(config-if)#spanning-tree portfast

%Warning: portfast should only be enabled on ports connected to a single

host. Connecting hubs, concentrators, switches, bridges, etc… to this

interface when portfast is enabled, can cause temporary bridging loops.

Use with CAUTION

%Portfast has been configured on FastEthernet0/1 but will only

have effect when the interface is in a non-trunking mode.

Sw1(config-if)#exit

Sw1(config)#vlan 30

Sw1(config-vlan)#name G-LAB30

Sw1(config-vlan)#exit

Sw1(config)#int range fa0/2 - 5

Sw1(config-if-range)#sw mode access

Sw1(config-if-range)#sw access vlan 30

Sw1(config-if-range)#end

Sw1#sh vlan brief

VLAN Name Status Ports


1 default active Fa0/6, Fa0/7, Fa0/8, Fa0/9

                                            Fa0/10

20 G-LAB20 active Fa0/1

30 G-LAB30 active Fa0/2, Fa0/3, Fa0/4, Fa0/5

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

Sw1(config-if)#int vlan 30

Sw1(config-if)#

Sw1(config-if)#ip address 192.168.30.254 255.255.255.0

Sw1(config-if)#no shutdown

Sw1(config-if)#exit

Sw1(config)#line vty 0 4

Sw1(config-line)#password G-LAB

Sw1(config-line)#login

Sw1(config)#enable secret G-LAB123

Sw1(config)#end

  1. 简单验证
  1. PC1 IP:192.168.30.23/24

PC2 IP:192.168.30.24/24

  1. PC1 连结到Sw1的Fa0/1端口,PC2 连结到Sw1的Fa0/2端口,观察两个端口指示灯变成绿色的时间:

Fa0/1: ___s

Fa0/2: ___s

3) PC1 ping PC2:

C:\Documents and Settings\Joseph>ping 192.168.30.24

Pinging 192.168.30.24 with 32 bytes of data:

Request timed out.

Request timed out.

Request timed out.

Request timed out.

Ping statistics for 192.168.30.24:

Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

4) 将PC1 连结到Sw1的Fa0/3端口,PC1 再ping PC2:

C:\Documents and Settings\Joseph>ping 192.168.30.24

Pinging 192.168.30.24 with 32 bytes of data:

Request timed out.

Reply from 192.168.30.24: bytes=32 time=1ms TTL=64

Reply from 192.168.30.24: bytes=32 time=1ms TTL=64

Reply from 192.168.30.24: bytes=32 time=1ms TTL=64

Ping statistics for 192.168.30.24:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 1ms, Maximum = 1ms, Average = 1ms

C:\Documents and Settings\Joseph>telnet 192.168.30.254

Trying 192.168.30.254 … Open

User Access Verification

Password:

Sw1>en

Password:

Sw1#

Sw1#copy run start

Destination filename [startup-config]?

Building configuration…

Sw1#

Sw1#sh flash:

Directory of flash:/

2  -rwx     2664051   Mar 01 1993 00:03:19  c2960-i6q4l2-mz.122-11.EA1.bin

3  -rwx         556   Mar 01 1993 03:56:53  vlan.dat

4  -rwx         269   Jan 01 1970 00:01:16  env_vars

5  -rwx         974   Mar 01 1993 03:59:06  config.text

6  -rwx           5   Mar 01 1993 03:59:06  private-config.text

7  drwx         704   Mar 01 1993 00:03:55  html

19 -rwx 109 Mar 01 1993 00:03:56 info

20 -rwx 109 Mar 01 1993 00:03:56 info.ver

Sw1#delete flash:/vlan.dat

Delete filename [vlan.dat]?

Delete flash:/vlan.dat? [confirm]↙

Sw1#delete flash:/config.text

Delete filename [config.text]?

Delete flash:/config.text? [confirm]↙

Sw1#sh flash:

Directory of flash:/

2  -rwx     2664051   Mar 01 1993 00:03:19  c2960-i6q4l2-mz.121-11.EA1.bin

4  -rwx         269   Jan 01 1970 00:01:16  env_vars

6  -rwx           5   Mar 01 1993 03:59:06  private-config.text

7  drwx         704   Mar 01 1993 00:03:55  html

19 -rwx 109 Mar 01 1993 00:03:56 info

20 -rwx 109 Mar 01 1993 00:03:56 info.ver

7741440 bytes total (3781120 bytes free)

Sw1#reload

Proceed with reload? [confirm]↙

04:06:33: %SYS-5-RELOAD: Reload requested

C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(11r)EA1, RELEASE SOFTWARE (fc1)

Compiled Mon 22-Jul-02 17:18 by antonino

WS-C2960-24 starting…

Base ethernet MAC Address: 00:0d:29:60:8b:c0

Xmodem file system is available.

Initializing Flash…

flashfs[0]: 16 files, 2 directories

flashfs[0]: 0 orphaned files, 0 orphaned directories

flashfs[0]: Total bytes: 7741440

flashfs[0]: Bytes used: 3960320

flashfs[0]: Bytes available: 3781120

flashfs[0]: flashfs fsck took 6 seconds.

…done initializing flash.

Boot Sector Filesystem (bs:) installed, fsid: 3

Parameter Block Filesystem (pb:) installed, fsid: 4

Loading “flash:/c2960-i6q4l2-mz.122-11.EA1.bin”…#########################################################################################################################################################################################################################################################################################

File “flash:/c2960-i6q4l2-mz.121-11.EA1.bin” uncompressed and installed, entry point: 0x80010000

executing…

          Restricted Rights Legend

Use, duplication, or disclosure by the Government is

subject to restrictions as set forth in subparagraph

© of the Commercial Computer Software - Restricted

Rights clause at FAR sec. 52.227-19 and subparagraph

© (1) (ii) of the Rights in Technical Data and Computer

Software clause at DFARS sec. 252.227-7013.

       cisco Systems, Inc.

       170 West Tasman Drive

       San Jose, California 95134-1706

Cisco Internetwork Operating System Software

IOS ™ C2960 Software (C2960-I6Q4L2-M), Version 12.2(11)EA1, RELEASE SOFTWARE (fc1)

Copyright © 1986-2007 by cisco Systems, Inc.

Compiled Wed 28-Aug-02 10:25 by antonino

Image text-base: 0x80010000, data-base: 0x80528000

Initializing flashfs…

flashfs[1]: 16 files, 2 directories

flashfs[1]: 0 orphaned files, 0 orphaned directories

flashfs[1]: Total bytes: 7741440

flashfs[1]: Bytes used: 3960320

flashfs[1]: Bytes available: 3781120

flashfs[1]: flashfs fsck took 7 seconds.

flashfs[1]: Initialization complete.

Done initializing flashfs.

POST: System Board Test : Passed

POST: Ethernet Controller Test : Passed

ASIC Initialization Passed

POST: FRONT-END LOOPBACK TEST : Passed

cisco WS-C2960-24 (RC32300) processor (revision J0) with 20402K bytes of memory.

Processor board ID FOC0725Y05M

Last reset from system-reset

Running Standard Image

12 FastEthernet/IEEE 802.3 interface(s)

32K bytes of flash-simulated non-volatile configuration memory.

Base ethernet MAC Address: 00:0D:29:60:8B:C0

Motherboard assembly number: 73-5782-11

Power supply part number: 34-0965-01

Motherboard serial number: FOC07250XZ2

Power supply serial number: DAB07226HJ0

Model revision number: J0

Motherboard revision number: A0

Model number: WS-C2960-24

System serial number: FOC0725Y05M

     --- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]: no↙

Press RETURN to get started!

Switch>文章来源地址https://www.toymoban.com/news/detail-459743.html

  1. 实验完成

到了这里,关于【实验分享】Switch基本配置的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 华为[ENSP]AAA基本实验配置

    想了解AAA概念的朋友,请移步我的这一篇文章: https://blog.csdn.net/weixin_62594100/article/details/123945539 https://blog.csdn.net/weixin_62594100/article/details/123945539 AAA基本实验拓扑图如下所示: 实验要求:在路由器R1上Telnet路由器R3,使用AAA本地认证方式。 配置AAA的基本步骤如下: (1)完成

    2024年02月10日
    浏览(40)
  • 【计算机网络实验】RIP的基本配置

    【实训目的】 掌握rip协议的基本工作原理 掌握RIP的基本配置 【实训环境】 eNSP模拟软件 【实验原理】 路由器启动时,路由表中只会包含直连路由。运行RIP之后,路由器会发送Request报文,用来请求邻居路由器的RIP路由。运行RIP的邻居路由器收到该Request报文后,会根据自己的

    2024年02月09日
    浏览(40)
  • 思科模拟器 实验7 OSPF基本配置

    实验要求: 1)按拓扑完成1-9-2的实验,验证路由表。 2)vlan50连一台pc,routerB连一台pc,验证实验。 3)三层交换机上,将任一端口划分到vlan10且连一台pc. 4) ip地址自行规划,最后所有的网段之间、pc之间能实现互连互通。 5)完成后将pt文件保存,同时完成实验报告的撰写。实验报

    2024年02月11日
    浏览(45)
  • eNSP实验三 路由器的基本配置

    (所属课程: 计算机网络 ) `院 系:计算机科学与技术信息工程学院 掌握路由器设备的基础配置 掌握路由器设备系统参数的配置方法和查看方法 掌握路由器接口 IP 地址的配置方法 掌握两台直连路由器连通性的测试方法 掌握重启设备的方法 路由器的定义。 路由器是一种连

    2024年02月04日
    浏览(47)
  • PacketTracer 5.0实验(六) 路由器基本配置

    一、实验目标 掌握路由器几种常用配置方法; 掌握采用Console线缆配置路由器的方法; 掌握采用telnet方式配置路由器的方法; 熟悉路由器不同的命令行操作模式以及各种模式之间的切换; 掌握路由器的基本配置命令; 二、技术原理 路由器的管理方式基本分为两种:带内管

    2024年02月05日
    浏览(37)
  • Cisco Packet Tracer 路由器基本配置实验

    (1)进入全局配置模式: (2)在全局配置模式可以配置路由器名称和特权用户密码: 特权密码同样分为明文密码(password)和密文密码(secret)。 (3)查看路由器enable密码: 密文密码优先级高 ,且 无法直接查看 ,如果同时设置两种密码,进入特权用户模式需要输入密文

    2024年02月04日
    浏览(44)
  • 计算机网络实验:交换机的基本配置与管理

    本实验旨在了解交换机的基本功能和工作原理,掌握交换机的配置方法和命令,学习交换机端口的基本设置和管理,以及交换机MAC地址表的查看和维护。通过本实验,学生可以熟悉交换机的操作界面,探索交换机的工作模式,理解交换机的转发机制,提高计算机网络实验的能

    2024年02月07日
    浏览(40)
  • 网络_TCP/IP_第五章_交换机的基本原理与配置_实验案例二:交换机的基本配置

    如图5.18所示、两台交换机互连,并与四台计算机连接在一起,设备之间接口的连接情况如表5-4所示。 图 5-18 实验案例二示意图 表5-4 设备之间接口的连接情况         通过命令查看MAC地址表,观察各个接口对应的MAC地址;配置交换机互连接口的双工模式及速率,观察在双工模式

    2024年04月10日
    浏览(48)
  • 网络安全之防火墙 server nat 基本配置实验

    目录 网络安全之防火墙 server nat 基本配置实验 实验图  1.进入视图模式  2.配置端口IP地址即区域 防火墙       ​编辑  untrust区域 DMZ区域 trust区域 配置trust-untrust区域的ftp 在untrust区域中的server1开启ftp服务  配置trust-untrust区域的ftp的安全策略 登陆ftp  查找server-map 配置 

    2024年02月15日
    浏览(38)
  • ENSP实验十一——动态NAT(easy-ip)的基本配置

    1,设备 4台PC,2台路由器AR2220,2台交换机S5700 2,目标 内网PC能够一NAT方式访问外网主机,假定外网的地址池为12.0.0.50道12.0.0.100 1,PC PC1到PC3全部开启DHCP 2,路由器 R1: sy sy R1 dhcp enable         //开启DHCP功能 int g0/0/

    2024年02月04日
    浏览(48)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包