交换机H3C(华三)基本命令
创始人
2025-01-18 15:03:26
0次

学校一般会教思科交换机的命令,但出来工作基本会接触到H3C(华三华为跟3com合资公司,华为大家都懂的国货,国内的占有率不会少)的交换机居多。

H3C Switch命令

一、模式命令:

1. 用户模式:Switch>

2. 特权模式:Switch>enable

Switch#

3. 全局配置模式:Switch#config terminal

Switch(config)#

4. 接口配置模式:Switch(config)#interface fastethernet0/1

Switch(config-if)#

5. Line模式:Switch(config)#line console 0

Switch(config-line)#

二、特权模式下的命令:

1. 查看机MAC地址:Switch#show mac-address-table

2. 发现(CDP):

Switch#show cdp

Switch#show cdp interface fastethernet0/1

Switch#show cdp neighbors

Switch#show cdp neighbors detail

Switch#show cdp entry

3. 保存机配置:

Switch#copy running-config startup-config或者Switch#write

4. 恢复交换机出厂值:

Switch#erase startup-config

Switch#reload

三、全局配置模式下的命令:

1. 配置主机名:Switch(config)#hostname Sw1

Sw1(config)#

2、 设置登陆台密码:Switch(config)#line console 0

Switch(config-line)#password 密码

Switch(config-line)#login

3. 使能口令:Switch(config)#enable Password 密码

4. 加密保存的使能口令:Switch(config)#enable secret 密码

5. 配置IP地址:

Switch(config)#interface vlan 1

Switch(config-if)#ip address IP地址 网关

Switch(config-if)#no shutdown

6. 配置交换机网关:Switch(config)#ip default-gateway 网关

四、VLAN配置命令:

1. 创建vlan命令:

a) 全局配置模式下:

Switch)#vlan 2(config

Switch(config)#name v2

Switch(config)#mtu 数值

Switch(config)#end

b) Vlan数据库下:

Switch#vlan database

Switch#vlan 2 name v2

Switch#vlan 2 mut 数值

Switch#exit

2. 删除vlan命令:

a) 全局配置模式下:

Switch(config)#no vlan 2

Switch(config)#end

b) Vlan数据库下:

Switch#no vlan 2 name v2

Switch#exit

3. 在vlan中添加端口:

Switch#config terminal

Switch(config)#interface f0/1(端口)

Switch(config-if)#Switchport mode access

Switch(config-if)#switchport access vlan 2

Switch(config-if)#end

一次将多个端口添加到vlan中:

Switch#config terminal

Switch(config)#interface range f0/1 - 5(端口)

Switch(config-if)#switchport access vlan 2

Switch(config-if)#end

注:switch#show vlan biref(查看vlan信息)

4. 配置vlan trunk:

1. 配置接口为trunk命令:

Switch(config)# interface f0/1(端口)

Switch(config-if)#Switchport mode trunk

2. 配置接口为动态协商模式的命令:

Switch(config)# interface f0/1(端口)

Switch(config-if)#switchport mode dynamic desirable/auto

3. 从trunk中删除vlan:

Switch(config)# interface f0/1(端口)

Switch(config-if)#Switchport trunk allowed vlan remove 2

4. 在trunk中添加vlan:

Switch(config)# interface f0/1(端口)

Switch(config-if)#Switchport trunk allowed vlan add 2

相关内容

热门资讯

最新开挂!微信微乐小程序游戏辅... 最新开挂!微信微乐小程序游戏辅助脚本,微信小程序辅助器免费版在进入微信微乐小程序游戏辅助脚本软件靠谱...
最新透视挂!微乐小程序免费黑科... 最新透视挂!微乐小程序免费黑科技,微信小程序微乐房间有技巧吗1、微乐小程序免费黑科技透视辅助软件激活...
最新辅助!微信微乐小程序修改器... 最新辅助!微信微乐小程序修改器,微乐陕西小程序破解器下载1、微信微乐小程序修改器脚本辅助下载、微信微...
最新透视挂!微信微乐小程序有挂... 最新透视挂!微信微乐小程序有挂黑科技,微乐家乡麻将辅助1、下载好微信微乐小程序有挂黑科技脚本下载之后...
最新开挂!微乐家乡麻将自建房辅... 最新开挂!微乐家乡麻将自建房辅助app,微乐小程序自建房辅助下载1、打开软件启动之后找到中间准星的标...
最新透视挂!微乐小程序辅助工具... 最新透视挂!微乐小程序辅助工具,如何下载微乐自建房黑科技入口1、首先打开微乐小程序辅助工具辅助器下载...
最新开挂!微乐家乡麻将自建房开... 最新开挂!微乐家乡麻将自建房开挂,微信小程序微乐房间的挂多少钱一、微乐家乡麻将自建房开挂可以开透视的...
最新辅助!微信微乐辅助免费,微... 最新辅助!微信微乐辅助免费,微乐小程序自建房透视免费1、游戏颠覆性的策略玩法,独创攻略技巧玩法,可透...
最新透视挂!小程序微乐游戏辅助... 最新透视挂!小程序微乐游戏辅助器,微乐自建房脚本入口1、下载好小程序微乐游戏辅助器透视辅助下载之后点...
最新辅助!微信微乐小程序辅助器... 最新辅助!微信微乐小程序辅助器免费安装,微乐小程序免费黑科技在线下载1、金币登录送、破产送、升级送、...