华为交换机设备基础命令大全,拿走不谢!
华为交换机配置命令大全
华为交换机配置命令大全华为交换机是一种高性能、高可靠的数据通信设备,广泛应用于各种网络环境中。
为了更好地使用华为交换机,我们需要了解一些基本的配置命令。
本文将为大家详细介绍华为交换机的配置命令大全,帮助大家更好地了解和使用华为交换机。
1. 登录华为交换机。
首先,我们需要登录华为交换机进行配置。
一般来说,我们可以通过串口、Telnet或SSH方式登录交换机。
以SSH方式登录为例,我们可以使用以下命令:```shell。
ssh -l username 192.168.1.1。
```。
其中,username为登录用户名,192.168.1.1为交换机的IP地址。
登录成功后,我们需要输入密码进行验证。
2. 查看交换机当前配置。
在登录成功后,我们可以使用以下命令查看交换机的当前配置信息:```shell。
display current-configuration。
```。
这条命令可以显示出交换机当前的全部配置信息,包括接口配置、VLAN配置、路由配置等。
3. 配置交换机接口。
接下来,我们可以对交换机的接口进行配置。
比如,我们可以通过以下命令配置一个VLAN接口:```shell。
interface Vlanif1。
ip address 192.168.1.1 255.255.255.0。
```。
这条命令将为VLAN接口Vlanif1配置IP地址为192.168.1.1,子网掩码为255.255.255.0。
4. 配置交换机VLAN。
除了配置接口,我们还可以对交换机的VLAN进行配置。
比如,我们可以使用以下命令创建一个VLAN:```shell。
vlan 10。
```。
这条命令将创建一个VLAN ID为10的VLAN。
5. 配置交换机路由。
在需要进行路由配置时,我们可以使用以下命令添加静态路由:```shell。
ip route-static 0.0.0.0 0.0.0.0 192.168.1.254。
```。
华为路由器交换机常用命令
华为路由器交换机常用命令一、设备管理命令1.登录管理命令- ssh [ip地质] -p [端口号]:通过SSH协议登录设备。
- telnet [ip地质]:通过Telnet协议登录设备。
- logout:退出设备。
2.用户管理命令- display current-configuration:显示当前设备配置信息。
- save:保存当前配置。
- undo save:取消保存的配置。
- super:切换到超级用户模式。
- user-interface console 0:配置控制台终端的参数。
- user-interface vty 0 4:配置远程登录终端的参数。
3.设备操作命令- reboot:重启设备。
- reset saved-configuration:恢复出厂配置。
- display version:显示设备的硬件和软件版本信息。
- display device:显示设备的基本信息。
- display interface[接口名称]:显示指定接口信息。
- display ip routing-table:显示IP路由表信息。
二、网络配置命令1.IP配置命令- interface [接口名称]:进入指定接口。
- ip address [IP地质] [子网掩码]:配置接口IP地质。
- undo ip address:取消接口IP地质配置。
- ip route-static [目标网络] [子网掩码] [下一跳地质]:配置静态路由。
- undo ip route-static [目标网络] [子网掩码] [下一跳地质]:取消静态路由配置。
2.VLAN配置命令- vlan [VLAN ID]:创建指定VLAN。
- quit:退出VLAN配置模式。
- interface vlan [VLAN ID]:进入指定VLAN接口。
- ip address [IP地质] [子网掩码]:为VLAN接口配置IP地质。
(完整版)华为交换机命令大全
华为交换机基本配置命令详解1、配置文件相关命令[Quidway]display current-configuration 显示当前生效的配置[Quidway]display saved-configuration显示flash中配置文件,即下次上电启动时所用的配置文件reset saved-configuration 檫除旧的配置文件reboot 交换机重启display version 显示系统版本信息2、基本配置[Quidway]super password 修改特权用户密码[Quidway]sysname 交换机命名[Quidway]interface ethernet 1/0/1 进入接口视图[Quidway]interface vlan 1进入接口视图[Quidway-Vlan-interfacex]ip address 10.1.1.11 255.255.0.0配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1静态路由=网关3、telnet配置[Quidway]user-interface vty 0 4 进入虚拟终端[S3026-ui-vty0-4]authentication-mode password 设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple xmws123设置口令[S3026-ui-vty0-4]user privilege level 3 用户级别4、端口配置[Quidway-Ethernet1/0/1]duplex {half|full|auto} 配置端口工作状态[Quidway-Ethernet1/0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet1/0/1]flow-control 配置端口流控[Quidway-Ethernet1/0/1]mdi {across|auto|normal} 配置端口平接扭接[Quidway-Ethernet1/0/1]port link-type {trunk|access|hybrid} 设置端口工作模式[Quidway-Ethernet1/0/1]undo shutdown 激活端口[Quidway-Ethernet1/0/2]quit 退出系统视图5、链路聚合配置[DeviceA] link-aggregation group 1 mode manual 创建手工聚合组1[Qw_A] interface ethernet 1/0/1 将以太网端口Ethernet1/0/1加入聚合组1 [Qw_A-Ethernet1/0/1] port link-aggregation group 1[Qw_A-Ethernet1/0/1] interface ethernet 1/0/2 将以太网端口Ethernet1/0/1加入聚合组1[Qw_A-Ethernet1/0/2] port link-aggregation group 1[Qw_A] link-aggregation group 1 service-type tunnel # 在手工聚合组的基础上创建t unnel业务环回组。
华为交换机基本配置命令
华为交换机基本配置命令华为交换机基本配置命令一、单交换机VLAN划分以下是单交换机VLAN划分的基本命令:system:进入系统视图。
system-view:进入系统视图。
quit:退出系统视图。
undovlan20:删除vlan20.XXX:交换机命名。
dispvlan:显示vlan。
vlan20:创建vlan(也可进入vlan20)。
porte1/0/1toe1/0/5:把端口1-5放入VLAN20中。
对于5700系列交换机,单个端口放入VLAN的命令如下:XXX]intg0/0/1XXX]portlink-type access(注:接口类型access,hybrid、trunk)XXX]portdefaultvlan10而批量端口放入VLAN的命令如下:XXX]port-group1XXX-port-group-1]group-XXXXXX-port-group-1]porthybriduntaggedvlan3如果需要删除group(组)vlan200内的15端口,可以使用以下命令:XXX]intg0/0/15XXX-XXX]XXX通过group端口限速设置的命令如下:XXX]Port-group2XXX]group-memberg0/0/2tog0/0/23XXX]qoslroutboundcir2000cbs要显示vlan里的端口20,可以使用以下命令:dispvlan20如果需要进入端口24,可以使用以下命令:inte1/0/24要删除当前VLAN端口10,可以使用以下命令:XXX如果需要显示当前配置,可以使用以下命令:dispcurr如果需要保存配置,可以使用以下命令:save如果需要通过关闭日志信息命令改变DS模块来实现关闭配置后的确认信息显示,可以使用以下命令:info-XXXoff如果需要通过打开日志信息命令改变DS模块来实现打开配置后的确认信息显示,可以使用以下命令:info-XXX二、配置交换机支持XXX以下是配置交换机支持XXX的基本命令:system:进入系统视图。
华为交换机命令大全
华为交换机基本配置命令详解1、配置文件相关命令[Quidway]display current-configuration 显示当前生效的配置[Quidway]display saved-configuration显示flash中配置文件,即下次上电启动时所用的配置文件reset saved-configuration 檫除旧的配置文件reboot 交换机重启display version 显示系统版本信息2、基本配置[Quidway]super password 修改特权用户密码[Quidway]sysname 交换机命名[Quidway]interface ethernet 1/0/1 进入接口视图[Quidway]interface vlan 1进入接口视图[Quidway-Vlan-interfacex]ip address 10.1.1.11 255.255.0.0配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1静态路由=网关3、telnet配置[Quidway]user-interface vty 0 4 进入虚拟终端[S3026-ui-vty0-4]authentication-mode password 设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple xmws123设置口令[S3026-ui-vty0-4]user privilege level 3 用户级别4、端口配置[Quidway-Ethernet1/0/1]duplex {half|full|auto} 配置端口工作状态[Quidway-Ethernet1/0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet1/0/1]flow-control 配置端口流控[Quidway-Ethernet1/0/1]mdi {across|auto|normal} 配置端口平接扭接[Quidway-Ethernet1/0/1]port link-type {trunk|access|hybrid} 设置端口工作模式[Quidway-Ethernet1/0/1]undo shutdown 激活端口[Quidway-Ethernet1/0/2]quit 退出系统视图5、链路聚合配置[DeviceA] link-aggregation group 1 mode manual 创建手工聚合组1[Qw_A] interface ethernet 1/0/1 将以太网端口Ethernet1/0/1加入聚合组1 [Qw_A-Ethernet1/0/1] port link-aggregation group 1[Qw_A-Ethernet1/0/1] interface ethernet 1/0/2 将以太网端口Ethernet1/0/1加入聚合组1[Qw_A-Ethernet1/0/2] port link-aggregation group 1[Qw_A] link-aggregation group 1 service-type tunnel # 在手工聚合组的基础上创建t unnel业务环回组。
华为交换机常用命令
华为交换机常用命令 Hessen was revised in January 2021
1、通过AC telnet到交换机(交换机管理IP为:),需要输入交换机的用户名和密码,
下图中用户名为:smxyd,密码为:smxyd;
2、进入交换机特权模式:sys
3、查看交换机端口信息:display interface brief
4、查看交换机各端口连接AP的MAC地址:display mac-address
5、显示当前交换机信息:display current-configuration
6、进交换机端口命令:interface ethernet0/0/28
7、关交换机某个端口,要先进入到某个端口下:shutdown
8、开交换机某个端口,要先进入到某个端口下:undo shutdown
9、开交换机某个端口poe供电功能,要先进入到某个端口下:poe enable
10、关交换机某个端口poe供电功能,要先进入到某个端口下:undo poe enable
11、看交换机所有端口poe供电功能是开还是关:display poe power-state
12、地址解析协议,AP MAC对应的AP ip地址:dis arp
13、返回:quit
14、保存设置:save
15、删除某条命令,一般使用命令: undo。
华为基础命令总结
华为基础命令总结第一篇:华为基础命令总结华为基础命令总结目录1.镜像口配置................................................................................................................2 2.设备改名字................................................................................................................2 3.配置保存....................................................................................................................2 4查看路由表. (2)5.telnet密码、特权密码..............................................................................................2 6.用户远程登录从用户模式变成特权模式..............................................................2 7.交换接口配置(vlan、access、trunk)...................................................................3 8.接口物理配置 (3)9.DHCP分配 (3)10.VRRP配置.................................................................................................................4 11.静态路由 (4)12.RIP协议 (4)13.OSPF协议 (5)1.单区域................................................................................................................5 2.多区域. (5)3.STUB................................................................................................................. ...5 4.完全STB..............................................................................................................5 5.点到点. (5)6.改COST 值..........................................................................................................6 7.查看配置信息....................................................................................................6 14.端口聚合 (6)1.二层端口聚合(华为又名E-trunk)..................................................................6 2.三层端口聚合. (7)15.MSTP............................................................................................................... . (8)1.配置....................................................................................................................8 2.查看配置信息.. (10)16.ACL.................................................................................................................. ........10 1.标准列表........................................................................................................11 2.扩展列表..........................................................................................................11 3.时间的配置(例子)..........................................................................................11 4.查看配置信息.. (12)1.镜像口配置[Quidway]monitor-port指定镜像端口 [Quidway]port mirror指定被镜像端口 [Quidway]port mirror int_list observing-port int_type int_num 指定镜像和被镜像2.设备改名字[SW2]sysname SW23.配置保存save Are you sure to continue?[Y/N]y4查看路由表display ip routing-table5.telnet密码、特权密码[Quidway]super password修改特权用户密码 [Huawei]user-interface vty 0 3 [Huawei-ui-vty0-3]authentication-mode password//设置口令模式[Huawei-ui-vty0-3]set authentication password cipher 123 [Huawei-ui-vty0-3]user privilege level 3 用户级别6.用户远程登录从用户模式变成特权模式此命令在被telnet的路由器上配置,这里和思科的命令不同,要想在 LSW1 配置密码只能配置 CON 密码![Huawei]super password level 7 cipher 123例子LSW2 远程登录到 LSW1telnet 192.168.1.1 super 7 Password: sys [Huawei]7.交换接口配置(vlan、access、trunk)[SW1vlan 3[SW1-vlan3]port ethernet 0/1 to ethernet 0/4//在VLAN中增加端口[SW1]int g0/0/1 [SW1-GigabitEthernet0/0/1]port link-type access [SW1-GigabitEthernet0/0/1]port default vlan 10 [SW1]int e0/0/1 [SW1-Ethernet0/0/1]port link-type trunk [SW1-Ethernet0/0/1]port trunk allow-pass vlan {ID|All}[SW1-Ethernet0/0/1]port trunk pvid vlan 3//设置trunk端口的PVID8.接口物理配置[Quidway-Ethernet0/1]duplex {half|full|auto}//配置端口工作状态[Quidway-Ethernet0/1]speed {10|100|auto}//配置端口工作速率 [Quidway-Ethernet0/1]flow-control//配置端口流控[Quidway-Ethernet0/1]mdi {across|auto|normal}//配置端口平接扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid}//设置端口工作模式 [Quidway-Ethernet0/1]undo shutdown//激活端口9.DHCP分配[SW2]dhcp enable [SW2]ip pool 1 [SW2-ip-pool-1]network 192.168.1.0 255.255.255.0 [SW2-ip-pool-1]dns-list 192.168.1.1 [SW2-ip-pool-1]gateway-list 192.168.1.1 [SW2-ip-pool-1]excluded-ip-address 192.168.1.1 255.255.255.0查看配置命令[Quidway] display ip pool查看IP地址池配置情况10.VRRP配置[SW2]int vl 10 [SW2-Vlanif10]ip add 192.168.1.253 255.255.255.0 [SW2-Vlanif10]vrrp vrid 10 192.168.1.254 [SW2-Vlanif10]vrrp vrid 10 priority 120 [SW2-Vlanif10]vrrp vrid 10 track interface g0/0/3 reduced 30查看配置命令display vrrp命令可以看到SwitchA的状态是Master 11.静态路由[SW1]ip route-static 20.1.1.0 255.255.255.0 10.1.1.212.RIP协议[SW1]rip [SW1-rip-1]version 2 [SW1-rip-1]undo summary [SW1-rip-1]net 10.0.0.0 删掉 rip 协议 [SW1]undo rip 1 Warning: The RIP process will be deleted.Continue?[Y/N]y 注意:1.绿色数字是几就删掉几比如[SW1-rip-2] 就 [SW1]undo rip 22.比如10.1.1.1/24 要是通告网络的话 cisco可以10.1.1.0 华为必须的 10.0.0.0 查看配置信息[SwitchA] display rip 1 route查看SwitchA的RIP路由表。
华为交换机基本命令
华为交换机配置常用命令一、配置软件和硬件1、配置(Console)电缆连接配置电缆是一根8芯屏蔽电缆,一端是压接的RJ-45连接器,插入交换机的Console口里;另一端则同时带有一个DB-9(孔)和DB-25(孔)连接器2、配置软件及设置使用系统自带的“超级终端”,运行“hypertrm”程序,设置终端参数参数要求:波特率为9600,数据位为8,奇偶校验为无,停止位为1,流量控制为无,选择终端仿真为VT100。
二、常用命令1、用户模式:交换机启动后在控制台直接按回车就进入用户模式(远程管理telnet 交换机ip时需要口令)。
--帮助quit ――退出当前模式返回上一级<switchone>ping ip-address --测试网络连通性<switchone>telnet ip-address --从交换机登陆其它设备<switchone>super --从用户模式进入特权模式2、特权模式:进入特权模式一般需要口令,可以防止非法登陆交换机<switchone>display current --显示当前运行的配置<switchone>save --保存当前运行的配置<switchone>reboot --重启交换机<switchone>display mac ――显示mac地址表<switchone>display inteface ethernet 0/1 ――查看以太网口状态<switchone>system-view --从特权模式进入全局模式3、全局模式:更改配置a.进入以太网口配置模式及相关配置[switchone]interface ethernet 0/1[switchone-Ethernet0/1]shutdown/undo shutdown 关闭/打开接口[switchone-Ethernet0/1]port link-type access/trunk 接口类型设为untagged端口(默认)/tagged端口(用于上行口和级联口)access端口发出和接收的帧不带vlan标记,即untagged端口trunk端口发出和接收的帧一般要带vlan标记,即tagged端口设为tagged口后,还要做以下操作:[switchone-Ethernet0/1]port trunk permit vlan 225 to 250这条命令是允许有vlan标记225到250的帧上传b.进入vlan配置模式(为了便于操作,不用在接口模式下配置access,而在vlan模式下进行相关操作)[switchone]vlan 225[switchone-vlan225] port Ethernet 1/1 将ethernet 1/1加入vlan225c.设置super口令[switchone]super password simple 2403h 特权口令为2403h三、标准配置:802.1Q标准的VLAN(与汇聚交换机、BAS直连的交换机),#vlan 1#vlan 225#vlan 226#vlan 227#vlan 228#vlan 229#vlan 230#vlan 231#vlan 232#vlan 233#vlan 234#vlan 235#vlan 236#vlan 237#vlan 238#vlan 239#vlan 240#vlan 241#vlan 242#vlan 243#vlan 244#vlan 245#vlan 246#vlan 247#vlan 248#vlan 249#vlan 250#interface Vlan-interface250ip address 11.22.33.250 255.255.255.0 #interface Ethernet0/1port access vlan 225#interface Ethernet0/2port access vlan 226#interface Ethernet0/3port access vlan 227#interface Ethernet0/4port access vlan 228#interface Ethernet0/5port access vlan 229#interface Ethernet0/6port access vlan 230#interface Ethernet0/7port access vlan 231#interface Ethernet0/8port access vlan 232# interface Ethernet0/9port access vlan 233#interface Ethernet0/10 port access vlan 234#interface Ethernet0/11 port access vlan 235#interface Ethernet0/12 port access vlan 236#interface Ethernet0/13 port access vlan 237#interface Ethernet0/14 port access vlan 238#interface Ethernet0/15 port access vlan 239#interface Ethernet0/16 port access vlan 240#interface Ethernet0/17 port access vlan 241#interface Ethernet0/18 port access vlan 242#interface Ethernet0/19 port access vlan 243# interface Ethernet0/20 description 30-1-fenghuo port access vlan 244#interface Ethernet0/21 description 1-4-huawei port access vlan 245#interface Ethernet0/22 description 5-2-fenghuo port access vlan 246#interface Ethernet0/23 description 6-1-port access vlan 247#interface Ethernet0/24 description 40-1-port access vlan 248#interface Ethernet0/25port access vlan 249 #interface Ethernet1/1port link-type trunkport trunk permit vlan 225 to 250。
华为路由器交换机常用命令
华为路由器交换机常用命令华为路由器交换机常用命令文档1、连接路由器交换机1.1 使用Console端口连接1.2 使用Telnet远程连接1.3 使用SSH远程连接2、系统管理2.1 修改设备名称2.2 设备备份与恢复2.3 设备升级与软件安装2.4 日志管理2.5 用户管理2.6 系统时间配置3、接口配置3.1 查看接口状态3.2 配置接口IP地质3.3 配置接口描述3.4 配置接口MTU3.5 配置接口速率与双工模式3.6 配置接口ACL3.7 配置接口链路聚合(LAG)4、VLAN 配置4.1 创建VLAN4.2 配置接口VLAN成员关系4.3 配置接口访问VLAN4.4 配置接口Trunk模式4.5 配置VLAN间路由4.6 配置VLAN间ACL控制5、路由配置5.1 配置静态路由5.2 配置动态路由(OSPF,BGP,RIP) 5.3 配置路由跟踪5.4 配置路由重分发5.5 配置路由策略5.6 配置路由保护6、安全配置6.1 配置访问控制列表(ACL) 6.2 配置端口安全6.3 配置802.1X认证6.4 配置密钥链(Key Chn)6.5 配置IPsec VPN7、QoS 配置7.1 配置流量分类7.2 配置流量策略7.3 配置队列调度7.4 配置流量控制附件:1、常用命令示例2、路由器交换机配置示例法律名词及注释:1、ACL(访问控制列表)- 一种用于控制网络流量的策略,可以基于源IP地质、目标IP地质、传输层协议和端口号等信息进行匹配。
2、VLAN(虚拟局域网)- 基于交换机端口的逻辑划分,将不同的端口划分到不同的虚拟局域网中,实现隔离和安全性。
3、LAG(链路聚合)- 将多个物理链路合并为一个逻辑链路,提高链路带宽和冗余能力。
4、OSPF(开放最短路径优先)- 一种用于动态路由选择的协议,根据链路状态信息计算最短路径。
5、BGP(边界网关协议)- 一种用于互联网自治系统间的路由选择的协议。
华为交换机的配基命令大全
华为交换机的配基命令大全一、基本配置1、视图<quidway>system-view //用户视图[quidway]interface ethernet 0/1 //系统视图[quidway-ethernet0/1] //接口视图2、密码及基本参数配置(1) console口登录配置<quidway>system-view[quidway]user-interface aux 0[quidway-aux0]authentication-mode {none|password|scheme} //设置登录的验证方法。
none是不要验证,password是密码验证,scheme 是服务器验证。
123456 //当上面的模式为paaword时,设置验证的密码。
simple是明文密码。
[quidway-aux0]user privilege level 2 //设置从AUX登录后可以访问的命令级别为2级,默认是1级。
[quidway-aux0]speed 19200 //设置console口使用的传输速率[quidway-aux0]screen-length 30 //设置一屏显示30行命令[quidway-aux0]history-command max-size 20 //设置历史命令缓冲区最多存放20条命令[quidway-aux0]idle-timeout 6 //设置超时时间为6分钟(2)telnet 登录<quidway>system-view[quidway]user-interface vty 0 4[quidway-aux0]authentication-mode {none|password|scheme} //设置登录的验证方法。
none是不要验证,password是密码验证,scheme 是服务器验证。
123456 //当上面的模式为paaword时,设置验证的密码。
华为路由器交换机配置命令大全
华为华为路由器交换机配置命令大全一、计算机命令PCAlogin:root;使用root用户password:linux;口令是linux#shutdown-hnow;关机#init 0;关机#logout;用户注销#login;用户登录#ifconfig;显示IP地址#ifconfig eth0 netmask;设置IP地址#ifconfig eht0 netmask down;禁用IP地址#route add 0.0.0.0 gw;设置网关#route del 0.0.0.0 gw;删除网关#route add default gw;设置网关#route del default gw;删除网关#route;显示网关#ping;发ECHO包#telnet;远程登录二、华为路由器交换机配置命令:交换机命令[Quidway]dis cur;显示当前配置[Quidway]display current-configuration;显示当前配置[Quidway]display interfaces;显示接口信息[Quidway]display vlan;显示vlan信息[Quidway]display version;显示版本信息[Quidway]super password;修改特权用户密码[Quidway]sysname;交换机命名[Quidway]interface ethernet0/1;进入接口视图[Quidway]interface vlan x;进入接口视图[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0;配置VLAN的IP地址[Quidway]Ip route-static 0.0.0.0 0.0.0.0 10.65.1.2;静态路由=网关[Quidway]rip; rip协议[Quidway]local-user ftp[Quidway]user-interface vty 0 4;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222;设置口令[S3026-ui-vty0-4]user privilege level 3;用户级别[Quidway]interface ethernet0/1;进入端口模式[Quidway]int e0/1;进入端口模式[Quidway-Ethernet0/1]duplex{half|full|auto};配置端口工作状态[Quidway-Ethernet0/1]speed{10|100|auto};配置端口工作速率[Quidway-Ethernet0/1]flow-control;配置端口流控[Quidway-Ethernet0/1]mdi{across|auto|normal};配置端口平接扭接[Quidway-Ethernet0/1]portlink-type{trunk|access|hybrid};设置端口工作模式[Quidway-Ethernet0/1]port access vlan 3;当前端口加入到VLAN[Quidway-Ethernet0/2]port trunk permit vlan{ID|All};设trunk允许的VLAN [Quidway-Ethernet0/3]port trunk pvid vlan 3;设置trunk端口的PVID[Quidway-Ethernet0/1]undo shutdown;激活端口[Quidway-Ethernet0/1]shutdown;关闭端口[Quidway-Ethernet0/1]quit;返回[Quidway]vlan3;创建VLAN[Quidway-vlan3]port ethernet0/1;在VLAN中增加端口[Quidway-vlan3]port e0/1;简写方式[Quidway-vlan3]port ethernet0/1 to ethernet0/4;在VLAN中增加端口[Quidway-vlan3]port e0/1 to e0/4;简写方式[Quidway]monitor-port;指定镜像端口[Quidway]port mirror;指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num;指定镜像和被镜像[Quidway]description string;指定VLAN描述字符[Quidway]description;删除VLAN描述字符[Quidway]display vlan[vlan_id];查看VLAN设置[Quidway]stp{enable|disable};设置生成树,默认关闭[Quidway]stp priority 4096;设置交换机的优先级[Quidway]stp root{primary|secondary};设置为根或根的备份[Quidway-Ethernet0/1]stp cost 200;设置交换机端口的花费[Quidway]link-aggregation e0/1 to e0/4 ingress|both;端口的聚合[Quidway]undo link-aggregation e0/1|all;始端口为通道号[SwitchA-vlanx]isolate-user-vlan enable;设置主vlan[SwitchA]isolate-user-vlan secondary;设置主vlan包括的子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan;设置vlan的pvid[Quidway-Ethernet0/2]port hybrid pvid;删除vlan的pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged;设置无标识的vlan 如果包的vlanid与PVId一致,则去掉vlan信息.默认PVID=1。
华为交换机基础命令
华为交换机基础命令1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]5.基于IOS的交换机的端口描述:switch(config-if)# description description-string基于CLI的交换机的端口描述:switch(enable)set port name module/number description-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex {auto|full|half}在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number {full|half}8.在基于IOS的交换机上配置静态VLAN:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式:switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]12. 在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source|destination}]在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time seconds` switch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]。
华为交换机的基础命令
华为交换机的基础命令华为交换机的基础命令如下:1. 登录交换机:telnet ip_address或ssh ip_address (例如:telnet 192.168.1.1)2. 进入特权模式:enable3. 进入全局配置模式:configure terminal4. 设定管理口IP地址:interface vlanif 1,ip address ip_address subnet_mask (例如:interface vlanif 1,ip address 192.168.1.1 255.255.255.0)5. 设定交换机主机名:hostname name (例如:hostname Switch1)6. 设定管理口的默认网关:ip route-static 0.0.0.0 0.0.0.0 gateway_ip (例如:ip route-static 0.0.0.0 0.0.0.0 192.168.1.254)7. 显示系统配置信息:display current-configuration8. 添加VLAN:vlan vlan_id (例如:vlan 10)9. 进入VLAN模式:interface vlan vlan_id (例如:interface vlan 10)10. 设定VLAN接口IP地址:ip address ip_addresssubnet_mask (例如:ip address 192.168.10.1 255.255.255.0)11. 进入接口配置模式:interface interface_typeinterface_number (例如:interface gigabitethernet 0/0/1)12. 配置接口描述:description description (例如:description This is a test interface)13. 设定接口IP地址:ip address ip_address subnet_mask (例如:ip address 192.168.1.2 255.255.255.0)14. 保存配置:save15. 退出配置模式:exit注意:以上命令仅为基础命令示例,具体根据交换机型号和需求使用相应命令。
华为交换机常用命令配置介绍
华为交换机常用命令配置介绍华为交换机是一种常见的网络设备,用于构建大型网络。
配置华为交换机需要使用一些常用的命令,通过这些命令可以设置交换机的各种功能和参数。
本文将介绍一些常用的华为交换机配置命令,包括基本配置、端口配置和VLAN配置等。
一、基本配置命令:1.设置设备主机名:[HUAWEI] sysname Switch //将设备主机名设置为Switch2.配置管理口:[Switch] interface gigabitethernet 0/0/1 //进入GigabitEthernet 0/0/1接口[Switch-GigabitEthernet0/0/1] port link-type access //设置接口类型为access[Switch-GigabitEthernet0/0/1] port default vlan 10 //设置默认VLAN为103.配置IP地址:[Switch-GigabitEthernet0/0/1] ip address 192.168.1.1255.255.255.0 //配置接口IP地址为192.168.1.1,子网掩码为255.255.255.04.设置设备登录认证:[Switch] aaa //进入AAA视图[Switch-aaa] local-user admin //创建本地用户admin[Switch-aaa] password simple admin123 //设置密码为admin1235.开启SSH远程登录:[Switch] ssh server enable //开启SSH服务[Switch] ssh user admin //创建SSH用户admin[Switch-ssh-user-admin] authentication-type password //设置认证方式为密码[Switch-ssh-user-admin] service-type stelnet //设置服务类型为SSH二、端口配置命令:1.查看端口状态:[Switch] display interface gigabitethernet 0/0/1 //查看GigabitEthernet 0/0/1接口的状态信息2.端口速率设置:[Switch] interface gigabitethernet 0/0/1 //进入GigabitEthernet 0/0/1接口[Switch-GigabitEthernet0/0/1] speed 100 //设置速率为100Mbps 3.端口流量控制:[Switch] interface gigabitethernet 0/0/1 //进入GigabitEthernet 0/0/1接口[Switch-GigabitEthernet0/0/1] flow-control //开启流量控制4.端口VLAN成员关系设置:[Switch] interface gigabitethernet 0/0/1 //进入GigabitEthernet 0/0/1接口[Switch-GigabitEthernet0/0/1] port link-type trunk //设置接口类型为trunk[Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 1020 //设置允许通过的VLAN为10和20三、VLAN配置命令:1.创建VLAN:[Switch] vlan 10 //创建VLAN 10[Switch-vlan10] quit //退出VLAN 10视图2.VLAN接口配置:[Switch] interface vlanif 10 //进入VLAN 10接口[Switch-Vlan-interface10] ip address 192.168.10.1255.255.255.0 //配置接口IP地址为192.168.10.1,子网掩码为255.255.255.03.VLAN端口关联:[Switch] interface gigabitethernet 0/0/1 //进入GigabitEthernet 0/0/1接口[Switch-GigabitEthernet0/0/1] port link-type hybrid //设置接口类型为hybrid(混合)[Switch-GigabitEthernet0/0/1] port hybrid vlan 10 untagged //设置接口为VLAN 10的未标记端口四、其他常用命令:1.查看设备信息:[Switch] display version //查看设备版本信息[Switch] display interface brief //查看所有接口的基本信息2.保存配置:[Switch] save //保存当前配置3.重启设备:[Switch] reboot //重启设备以上是一些常用的华为交换机配置命令。
华为交换机基本命令表
华为交换机基本命令表Tag: 交换机 , 华为 | Author: jakee |PCA login: root ;使用root用户password: linux ;口令是linux# shutdown -h now ;关机# init 0 ;关机# logout# login# ifconfig ;显示IP地址# ifconfig eth0 netmask ;设置IP地址# ifconfig eht0 netmask down ; 删除IP地址# route add 0.0.0.0 gw# route del 0.0.0.0 gw# route add default gw ;设置网关# route del default gw ;删除网关# route ;显示网关# ping# telnet ;建议telnet之前先ping一下#POE ENABLE ;开启POE供电#PORT ISOLATE ;端口隔离----------------------------------------交换机命令~~~~~~~~~~[Quidway]super password 修改特权用户密码[Quidway]sysname 交换机命名[Quidway]interface ethernet 0/1 进入接口视图[Quidway]interface vlan x 进入接口视图[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 静态路由=网关[Quidway]user-interface vty 0 4[S3026-ui-vty0-4]authentication-mode password[S3026-ui-vty0-4]set authentication-mode password simple 222[S3026-ui-vty0-4]user privilege level 3[Quidway-Ethernet0/1]duplex {half|full|auto} 配置端口双工工作状态 [Quidway-Ethernet0/1]speed {10|100|auto} 配置端口工作速率 [Quidway-Ethernet0/1]flow-control 配置端口流控[Quidway-Ethernet0/1]mdi {across|auto|normal} 配置端口MDI/MDIX状态平接或扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 设置接口工作模式(access(缺省)不支持802.1q帧的传送,而trunk支持(用于Switch间互连),hybrid和trunk的区别在于trunk 只允许缺省VLAN的报文发送时不打标签,而hybrid 允许多个VLAN报文发送时不打标签。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
华为交换机设备基础命令大全,拿走不谢!终将渡过成长的海01正文01交换机的基础命令汇总system-view 进入系统视图quit 退到系统视图sysname 交换机命名vlan 20 创建vlan(进入vlan20)display vlan 显示vlanundo vlan 20 删除vlan20display vlan 20 显示vlan里的端口20Interface e1/0/24 进入端口24portlink-type access vlan 20 把当前端口放入vlan20 undo porte1/0/10 删除当前VLAN端口10display current-configuration 显示当前配置02配置交换机支持TE L N E Tinterfacevlan 1 进入VLAN1ip address192.168.3.100 255.255.255.0 配置IP地址user-interfacevty 0 4 进入虚拟终端authentication-modepassword (aut password) 设置口令模式setauthentication password simple 222 (set aut pass sim 222) 设置口令userprivilege level 3(use priv lev 3) 配置用户级别dispcurrent-configuration (disp cur) 查看当前配置display ipinterface 查看交换机VLANIP配置resetsaved-configuration(reset saved) 删除配置(必须退到用户模式)reboot重启交换机03跨交换机V L AN的通讯在sw1上:vlan 10建立VLAN 10interfacee1/0/5 进入端口5Portdefault vlan 10 把端口5加入vlan10vlan 20建立VLAN 20interfacee1/0/15 进入端口15portdefault vlan 20 把端口15加入VLAN20interfacee1/0/24 进入端口24portlink-type trunk 把24端口设为TRUNK端口port trunkpermit vlan all 所有端口都能经过此路径在SW2上:vlan 10建立VLAN 10interfacee1/0/20 进入端口20portdefault vlan 10 把端口20放入VLAN10interfacee1/0/24 进入端口24portlink-type trunk 把24端口设为TRUNK端口port trunkpermit vlan all (port trunk permit vlan 10 只能为vlan10使用)24端口为所有VLAN使用displayinterface e1/0/24 查看端口24是否为TRUNKundo porttrunk permit vlan all 删除该句04路由器的基础命令汇总dispaly version 显示系统软件版本及硬件信息system-view 切换到系统视图quit 返回interface +接口进入接口视图ip address +IP +mask 配置IP和子网掩码return 返回用户视图<Ctrl+Z> 返回用户视图sysname R1 修改路由器名称为R1display current-configuration 查看路由器当前配置dispaly interface +接口查看路由器接口的状态信息save 保存当前配置display ip interface brief 查看接口与IP相关摘要信息display ip routing-table 查看路由表05t e l ne t远程登陆配置user-interface vty 0 4 进入0~4前五个的VTY用户界面进行整体配置authentication-mode password 设置验证方式为密码user privilege level 3 设置用户登陆级别aaa 进入aaa视图local-user admin password cipher hello privilege level 3在aaa视图下设置账号密码和用户级别local-user admin service-type telnet 配置该用户接入类型为aaaq 退回到用户视图user-interface vty 0 4 进入到VTY用户视图authentication-mode aaa 设置验证方式aaa06配置S te l ne t配置SSHserver:rsalocal-key-pair create 生成本地RSA主机密钥对display rsa local-key-pair public 查看本地密钥对中的公钥信息user-interface vty 0 4 进入VTY用户视图authentication-mode aaa 设置用户验证方式为aaa授权验证方式protocol inbound ssh 指定VTY用户只支持sshq 返回到系统视图aaa 进入aaa视图local-user huawei1 password cipher huawei1 创建用户和设置用户密码local-user huawei1 service-type ssh 配置本地用户接入类型为sshq 退回到用户视图ssh user huawei1 authentication-type password新建ssh用户指定ssh用户认证方式为passwordaaa 进入aaa视图local-user huawei1 privilege level 3 设置huawei1用户级别为3级别范围0~15stelnet server enable 开启ssh功能display ssh user-information huawei1 查看ssh用户配置信息不指定用户默认查看所有用户display ssh server status 查看ssh服务器全局配置信息07S TP配置和选路规则stp enable 在交换机上启用STPstp mode stpdis stp 查看stp配置dis stp brief 查看接口摘要信息stp priority 4096 修改交换机优先级为4096stp root primary 设置交换机为主根交换机stp root secondary 命令配置备份交换机display stp interface Ethernet 0/0/2 查看e0/0/2接口的开销值int e0/0/2stp cost 2000 配置接口e0/0/2的带价值为2000stp timer forward-delay 3000 修改STP的ForwardDelay时间为3000cs也就是30sstp bridge-diameter 3 命令设置网络的直径为3stp mode rstp 启用RSTP使用RSTP可以缩短收敛时间int e0/0/1stp edged-port enable 配置接口e0/0/1为边缘端口不参与生成树的计算08配置MS TP多实例stp region-configuration 进入MST域视图region-name huawei 配置MST域名为huaweirevision-level 1 配置MSTP的修订级别为1instance 1 vlan 10 指定VLAN10映射到MSTI1active region-configuration 激活MST域配置display stp region-configuration 查看交换机上当前生效的MST域配置信息dis stp instance 0 brief 查看实例0中的生成树状态和统计的摘要信息stp instance 2 priority 0 配置交换机成位实例2中的根交换机09R I P路由协议配置rip 创建开启协议进程network + ip 对指定网段接口使能RIP功能IP地址是与路由器直连的网段debugging rip 1 查看RIP定期更新情况terminal debuggingterminal monitor 在屏幕上显示debug信息undo debugging rip 1undo debug all 命令关闭debug调试功能在上面的配置基础上配置RIP2rip 进入子视图模式version 2 配置版本或者直接配置rip 1version 2network + ip10O S P F单区域配置ospf 1 进入ospf视图1代表进程号area 0 创建区域并进入OSPF区域视图,输入要创建的区域ID,骨干区域即区域0network +IP +匹配码display ospf interface 命令查看OSPF接口通告是否正确、display ospf peer 查看OSPF邻居状态display ip routing-table protocol ospf 查看OSPF路由表11配置O S P F区域明文认证ospf 1area 1authentication-mode simple plain huawei plain是口令以明文方式显示authentication-mode md5 1 huawei 配置区域密文认证12配置链路认证int g0/0/1ospf authentication-mode md5 1 huawei 在一条链路中的两个接口配置要相同13配置抑制接口ospf 1silent-interface GigabitEthernet 0/0/1 禁止接口g0/0/1接收和发送ospf报文14技巧对多个接口配置接口抑制ospf 1silent-interface all 抑制所有接口undisplay ip routing-table 10.0.1.1 查看10.0.1.1所在网段的路由条目15基于接口修改int g0/0/0ospf network-type p2mp 修改ospf的网络类型为多到多点ospf network-type broadcast 修改ospf的网络类型为广播ospf dr-priority 100 修改g0/0/0接口的DR优先级为100reset ospf process 重启ospf进程ospf cost 1000 修改ospf的开销值为1000ospf timer hello 20 修改HELLO计时器为20sospf timer dead 80 修改dead计时器为80sospf 1preference 110 修改ospf优先级为110值越大优先级越低16路由引入ospf 1import-route rip 1 在ospf进程中引入ripdefault-route-advertise always 在ospf进程中引入默认路由ripimport-route ospf 1 在rip进程中引入ospfimport-route ospf cost 3 ospf 引入rip时配置开销值default-route originate 在RIP进程中发布默认路由17v r r p(虚拟路由器冗余协议)基本配置int g0/0/0vrrp vrid 1 virtual-ip 172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrp vrid 1 priority 120 修改优先级为120display vrrp 查看vrrp信息display vrrp briefdisplay vrrp interface g0/0/0 查看VRRP的工作状态18配置V R RP多备份组int g0/0/0vrrp vrid 1 virtual-ip 172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrp vrid 1 priority 120 修改优先级为120vrrp vrid 2 virtual-ip 172.16.1.253创建VRRP备份组,备份组号为2,配置虚拟IP为172.16.1.253int g0/0/0vrrp vrid 1 virtual-ip 172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrp vrid 2 virtual-ip 172.16.1.253创建VRRP备份组,备份组号为2,配置虚拟IP为172.16.1.253vrrp vrid 2 priority 120 修改优先级为120vrrp vrid 2 preempt-mode disable 开启非抢占方式19配置V R RP的跟踪接口及认证int g0/0/1vrrp vrid 1 track interface GigabitEthernet 0/0/0 reduced 50监视上行接口G0/0/0,当此接口断掉时,裁减优先级50,使优先级为70 vrrp vrid 1 authentication-mode md5 huawei 认证配置20配置基本的访问控制表acl 2000 创建一个编号型ACL,基本ACL的范围是2000~29999rule 5 permit source 1.1.1.1 0指定规则ID为5,允许数据源地址为1.1.1.1的报文通过,反掩码全为0,即精确匹配rule 10 deny source any 指定ID为10,拒绝任意源地址的数据包通过display acl all 查看设备上所有的访问控制列表。