【实验分享】Switch基本配置
实验目的:
l配置交换机的基本命令
实验说明:
Cisco的交换机配置命令和Router的配置命令基本一致, 故这里不做详细介绍
实验拓扑图:
实验步骤:
- 了解基本配置
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 bufferReceived 5680 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored0 watchdog, 5680 multicast, 0 pause input0 input packets with dribble condition detected119 packets output, 12781 bytes, 0 underruns0 output errors, 0 collisions, 2 interface resets0 babbles, 0 late collision, 0 deferred0 lost carrier, 0 no carrier, 0 PAUSE output0 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/8Fa0/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/8Fa0/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/8Fa0/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
- 简单验证
- PC1 IP:192.168.30.23/24
PC2 IP:192.168.30.24/24
- 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.bin3 -rwx 556 Mar 01 1993 03:56:53 vlan.dat4 -rwx 269 Jan 01 1970 00:01:16 env_vars5 -rwx 974 Mar 01 1993 03:59:06 config.text6 -rwx 5 Mar 01 1993 03:59:06 private-config.text7 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.bin4 -rwx 269 Jan 01 1970 00:01:16 env_vars6 -rwx 5 Mar 01 1993 03:59:06 private-config.text7 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 DriveSan 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>
- 实验完成
【实验分享】Switch基本配置相关推荐
- H3C实验H3CTE讲师京东翰林分享实验4 WLAN基本配置
实验4 WLAN基本配置 实验任务一:配置AP使终端设备可以接入 步骤一:创建服务模版 [WA2210-AG]wlanservice-template 2 crypto 步骤二:命名ssid为t ...
- 计算机网络交换机基本配置实验,计算机网络实验四交换机基本配置
计算机网络实验四交换机基本配置 (7页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦! 9.9 积分 实验报告实验四:交换机基本配置一. 实验目的和要求(1) ...
- 计算机交换机配置实验心得,实验六 三层交换机的配置实验报告
实验报告 实验名称 三层交换机的配置 同组同学 实验成绩 一. 实验目的 (1)深入了解三层交换机的功能.特点及工作原理. (2)掌握三层交换机实现路由功能的方法. 二. 实验仪器设备及软件 Pack ...
- 桌面云实验环境的部署配置
这篇文章给大家分享的是Citrix桌面云实验环境的部署配置教程,相信大部分人都还不知道怎么部署,为了让大家学会,给大家总结了以下内容,话不多说,一起往下看吧. 这次主要还是搭建在2个exsi上的.两 ...
- 桌面云计算机的配置,Citrix桌面云实验环境的部署配置
Citrix桌面云实验环境的部署配置 发布时间:2020-06-05 14:03:31 来源:亿速云 阅读:319 作者:Leah 栏目:云计算 这篇文章给大家分享的是Citrix桌面云实验环境的部署 ...
- 计算机网络实验——交换机的基本配置与管理
计算机网络实验--交换机的基本配置与管理 实验题目 交换机的基本配置与管理 一.实验目的 1.设置交换机端口的传输速度 2.设置交换机端口的工作模式 3.设置完成后查看设置信息 二.实验环境 Wind ...
- 西邮计算机网络实验报告,西邮计算机网络实验报告内容模板-实验二-交换机基本配置...
<西邮计算机网络实验报告内容模板-实验二-交换机基本配置>由会员分享,可在线阅读,更多相关<西邮计算机网络实验报告内容模板-实验二-交换机基本配置(10页珍藏版)>请在人人文库 ...
- 计算机网络实验:实验一 交换机基本配置
实验一 交换机基本配置 一.实验目的 (一)掌握交换机命令行各种操作模式的区别以及模式之间的切换. (二)掌握Cisco交换机(PT模拟)的配置方法. (三)掌握采用Telnet方式配置交换机的方法 ...
- 计算机网络实验 实验三 VLAN基本配置
实验三 VLAN基本配置 第一关 打开桌面的Cisco packet tracer软件 (软件需要登录 但是可以使用游客登录 打开软件后点击右下角 ghost login 弹出网页后关闭网页 右下角变 ...
最新文章
- 《OpenCV3编程入门》学习笔记9 直方图与匹配(三)直方图对比
- android listView嵌套gridview的使用心得
- 【Android 电量优化】电量优化 ( 充电状态获取 | 主动获取充电状态 | 广播接受者监听充电状态 | 被动获取充电状态 | 注册空广播接受者获取历史广播 )
- arm-linux下如何安装GDB?pc-linux下如何升级GDB?
- wmic 获取运行内存大小
- 离群点(oulier)挖掘详解
- ubuntu declare
- 如何手写代码进行页面布局
- 爬虫系统Lucene分词
- jhipster项目迁移websocket
- 常用数据库学习资源站点
- Ubuntu 20.04 安装多个版本 php 并应用到 nginx
- 冲突等价(ConflictEquivalence) 可串行化调度(Serializable Schedules)
- 前端地图之色斑图渲染(数据为矢量数据)(二)——以leaflet为例
- 简练网软考知识点整理-项目风险应对策略
- eregi php7.0,关于php:已弃用:函数eregi()已弃用
- 盘点世界上千奇百怪的数据中心选址,这些地方你一定想不到!
- widows上安装golang
- Android 汇集CSDN、GitHub等最实用的良心之作-KING
- 225款飘逸的手写英文字体包 适合WIN/MAC系统通用
热门文章
- 【附源码】计算机毕业设计SSM闲置物品交易平台
- pdf设置研究保护色
- 英雄联盟一直连接服务器win10,Win10系统玩lol英雄联盟无法连接服务器请检查您的网络连接如何解决...
- JAVA项目实现离线授权日期授权解决方案 代码混淆 字符串加密 支持JDK16
- iOS 5~7的模拟器下载
- mac中压缩文件自动排除隐藏文件和系统文件
- SpringBoot+Vue项目打包部署
- 蓝手指安卓模拟器中文版 V1.2.0 官方正式版
- 利用 Ophis 编写 Commodore 64 programs PRG 程序(五)
- FIR带通滤波器汉宁窗设计法matlab仿真