思科交换机基本配置命令


01.进入特权模式 enable

代码如下(示例):

switch>enable
switch#

02.进入全局配置模式 configure terminal

代码如下(示例):

switch>enable
switch#configure terminal
switch(conf)#

03交换机命名 hostname aptech2950以aptech2950为例

代码如下(示例):

switch>enable
switch#configure terminal
switch(conf)#hostname aptch-2950
aptech2950(conf)#

04配置使能口令 enable password cisco以cisco为例

代码如下(示例):

switch>enable
switch # configure terminal
switch(conf)#hostname aptch2950
aptech2950(conf)# enable password cisco

05配置使能密码enable secret ciscolab以cicsolab为例

代码如下(示例):

switch>enable
switch # configure terminal
switch(conf)#hostname aptch2950
aptech2950(conf)# enble secret ciscolab

06创建多个VLAN

代码如下(示例):

switch>enable (进入特权模式)
switch#vlan data (进入VLAN配置模式)
switch(vlan)#vlan 10 name IT (划分VLAN 10,名称为IT)
switch(vlan)#vlan 20 name HR (划分VLAN20,名称为HR)
switch(vlan)#vlan 30 name FIN (划分VLAN30,名称为FIN)
switch(vlan)#vlan 40 name LOG (划分VLAN40,名称为LOG)
switch(vlan)#exit

07设置VLAN 1

代码如下(示例):

switch>enable
switch#configure terminal
switch(conf)#hostname aptch2950
aptech2950(conf)# interface vlan 1
aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0
配置交换机端口IP和子网掩码
aptech2950(conf-if)#no shut
aptech2950(conf-if)#exit
aptech2950(conf)#ip default-gateway 192.168.254 设置网关地址

08进入交换机某一个端口interface fastehernet 0/17以17为例

代码如下(示例):

switch>enable
switch#configure terminal
switch(conf)#hostname aptch2950
aptech2950(conf)# interface fastehernet 0/17
aptech2950(conf-if)#

09查看命令show

代码如下(示例):

switch>enable
switch# show version
查看系统中的所有版本信息
show interface vlan 1
查看交换机有关IP协议的配置信息
show running-configure
查看交换机当前起作用的配置信息
show interface fastethernet 0/1
查看交换机1接口具体配置和统计信息
show mac-address-table
查看MAC地址表
show mac-address-table aging-time
查看MAC地址表自动老化时间

10交换机恢复出厂默认命令

代码如下(示例):

switch>enable
switch#erase startup-configure
switch#reload

11双工模式设置

代码如下(示例):

switch> enable
switch # configure terminal
switch2950(conf)#hostname aptch-2950
aptech2950(conf)# interface fastehernet 0/17
aptech2950(conf-if)#duplex full/half/auto
有 full、half、auto三个选项

12cdp相关命令

代码如下(示例):

switch> enable
switch# show cdp 查看设备的cdp全局配置信息
show cdp interface fastethernet 0/17
show cdp traffic 查看有关cdp包的统计信息
show cdp nerghbors 列出与设备相连的cisco设备

13交换机telnet远程登录设置

代码如下(示例):

switch>enable
switch # configure terminal
switch(conf)#hostname aptech-2950
aptech2950(conf)#enable password cisco
aptech2950(conf)#interface fastethernet 0/1
aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0
aptech2950(conf-it)#no shut
aptech2950(conf-if)#exit
aptech2950(conf)line vty 0 4 设置0-4个用户可以telnet远程登录
aptech2950(conf-line)#password edge 以edge为远程登录的用户密码
主机设置:
IP 192.168.1.2 主机的IP必须和交换机端口的地址在同一个网络段
metmask 255.255.255.0
gate-way 192.168.1.1 网关地址是交换机端口地址
运行:
telent 192.168.1.1
进入telnet远程登录界面
password:edge
aptech2950>en
password:cisco
aptech#
  • 14
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值