华为交换机常用命令大全

合集下载

华为交换机常用命令

华为交换机常用命令

华为交换机常用命令2008-10-07 15:45dis vlan 显示vlanname text 指定当前vlan的名称undo name 取消[h3c] vlan 2[h3c-vlan2]name test vlandis users 显示用户dis startup 显示启动配置文件的信息dis user-interface 显示用户界面的相关信息dis web users 显示web用户的相关信息。

header login 配置登陆验证是显示信息header shellundo headerlock 锁住当前用户界面acl 访问控制列表acl number inbound/outbound[h3c]user-interface vty 0 4[h3c-vty0-4] acl 2000 inboundshutdown:关闭vlan接口undo shutdown 打开vlan接口关闭vlan1 接口[h3c] interface vlan-interface 1[h3c-vlan-interface] shutdownvlan vlan-id 定义vlanundo valn vlan-iddisplay ip routing-tabledisplay ip routing-table protocol staticdisplay ip routing-table statisticsdisplay ip routing-table verbose 查看路由表的全部详细信息interface vlan-interface vlan-id 进入valnmanagement-vlan vlan-id 定义管理vlan号reset ip routing-table statistics protocol all 清除所有路由协议的路由信息.display garp statistics interface GigabitEthernet 1/0/1 显示以太网端口上的garp统计信息display voice vlan status 查看语音vlan状态[h3c-GigabitEthernet1/0/1] broadcast-suppression 20 允许接受的最大广播流量为该端口传输能力的20%.超出部分丢弃.[h3c-GigabitEthernet1/0/1] broadcast-suppression pps 1000 每秒允许接受的最大广播数据包为1000传输能力的20%.超出部分丢弃.display interface GigabitEthernet1/0/1 查看端口信息display brief interface GigabitEthernet1/0/1 查看端口简要配置信息display loopback-detection 用来测试环路测试是否开启display transceiver-information interface GigabitEthernet1/0/50 显示光口相关信息duplex auto/full/half[h3c]interface GigabitEthernet1/0/1[h3c-GigabitEthernet1/0/1]duplux auto 设置端口双工属性为自协商port link-type access/hybrid/trunk 默认为accessport trunk permit vlan all 将trunk扣加入所有vlan中reset counters interface GigabitEthernet1/0/1 清楚端口的统计信息speed auto 10/100/1000display port-security 查看端口安全配置信息am user-bind mac-addr 00e0-fc00-5101 ip-addr 10.153.1.2 interface GigabitEthernet1/0/1 端口ip 绑定display arp 显示arpdisplay am user-bind 显示端口绑定的配置信息display mac-address 显示交换机学习到的mac地址display stp 显示生成树状态与统计信息[h3c-GigabitEthernet1/0/1]stp instance 0 cost 200 设置生成树实例0上路径开销为200stp cost 设置当前端口在指定生成树实例上路径开销。

(完整版)华为交换机常用命令大全

(完整版)华为交换机常用命令大全
华为交换机常用配置大全
2010-02-27
一、基础配置
1.1配置文件处理
导入配置文件
tftp x.x.x.x get vrpcfg.zip vrpcfg.zip
导出配置文件
tftp x.x.x.x put vrpcfg.zip vrpcfg.zip
1.2配置交换机远程管理
aaa 方式
system-view
qos lr cir 625 cbs 625000//端口限速
quit
端口隔离举例
2.2
system-view
interface eth-trunk 1
interface gigabitgibabitethernet0/0/1
eth-trunk 1
interface gigabitgibabitethernet0/0/2
Radius-server template radiusserver
Radius-server authentication 10.1.1.254 1812
Radius-server according 10.1.1.254 1813
Radius-server shared-key huawei
Undo radius-server user-name domain-included
aaa
local-user huawei password simple huawei
local-user huawei service-type telnet
local-user huawei priority level 3
quit
user-interface vty 0 4
authentication-mode aaa

华为路由器交换机常用命令

华为路由器交换机常用命令

华为路由器交换机常用命令一、设备管理命令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地质。

华为交换机命令大全

华为交换机命令大全
4.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enable switch(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]
1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string
2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录口令: switch(enable) set password switch(enable)tch(enable) set spantree portcost moudle/port cost switch(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}priority switch(enable) set spantree portvlanpri {module/port}priority [vlans] 17. 在基于IOS的交换机上修改STP时钟: switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(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] 20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name 21. 为了从一条中继链路上删除VLAN,可使用下列命令: switch(enable) clear trunk module/port vlan-range 22. 用show vtp domain 显示管理域的VTP参数. 23. 用show vtp statistics显示管理域的VTP参数. 24. 在Catalyst交换机上定义TrBRF的命令如下: switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}] 25. 在Catalyst交换机上定义TrCRF的命令如下: switch (enable) set vlan vlan-num [name name] type trcrf {ring hex-ring-num|decring decimal-ring-num} parent vlan-num 26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口: switch(enable) set vlan vlan-num mod-num/port-num 27. 命令show spantree显示一个交换机端口的STP状态. 28. 配置一个ELAN的LES和BUS,可以使用下列命令: ATM (config)# interface atm number.subint multioint

(完整版)华为交换机命令大全

(完整版)华为交换机命令大全

华为交换机基本配置命令详解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业务环回组。

华为交换机常用命令

华为交换机常用命令

1.进入管理界面:system-view2.设置用户登录时需要进行口令验证,且验证口令为huawei。

[Quidway] user-interface 0[Quidway-ui0] authentication-mode password[Quidway-ui0] set authentication password simple huawei3. 设置从用户界面登录后可以访问的命令级别: user privilege level level恢复从用户界面登录后可以访问的命令级别为缺省级别: undo user privilege level4.系统IP配置:a.创建并进入管理VLAN接口视图:interface vlan-interface vlan-id删除管理VLAN :undo interface vlan-interface vlan-idb.配置管理VLAN接口IP地址:ip address ip-address net-mast删除管理VLAN接口IP地址:undo ip address [ip-address net-mast]5. 进入Ethernet0/1以太网端口视图。

[Quidway] interface ethernet0/16. 配置端口Ethernet0/1为Trunk端口,并允许2、6到50、100等VLAN通过。

[Quidway-Ethernet0/1] port link-type trunk[Quidway-Ethernet0/1] port trunk permit vlan 2 6 to 50 100创建VLAN 100。

[Quidway] vlan 100配置端口Ethernet0/1的缺省VLAN ID为100。

[Quidway-Ethernet0/1] port trunk pvid vlan 1007. 创建VLAN并进入VLAN视图: vlan vlan_id删除已创建的VLAN: undo vlan{ vlan_id [ to vlan_id ] | all }8. 为指定的VLAN增加以太网端口: port interface_list删除指定的VLAN的某些以太网端口: undo port interface_list创建VLAN2并进入其视图。

华为交换机常见命令

华为交换机常见命令

一、清空配置:<HUAWEI> reset saved-configuration(清楚下次启动时使用的配置文件信息)然后重启设备,重启设备室提示保存信息,选择“NO”。

<HUAWEI> reset saved-configurationWarning: The action will delete thesaved configuration in the device.The configuration will be erased to reconfigure. Continue? [Y/N]:yWarning: Now clearing the configuration inthe device.Info: Succeeded in clearing the configuration in the device.<HUAWEI> rebootInfo: The system is now comparing the configuration, pleasewait.Warning: The configuration has been modified, and it will be saved tothe next startup saved-configuration file flash:/vrpcfg.zip. Continue?[Y/N]:n //此处请选择“N”Info: If want to reboot with saving diagnosticinformation, input 'N' and then execute 'reboot save diagnostic-information'.System will reboot! Continue?[Y/N]:y二、通过STelnet/Telnet登录交换机设置新的Console口登录密码# 以登录用户界面的认证方式为密码认证,密码为Huawei@123为例,配置如下。

华为交换机常用配置命令

华为交换机常用配置命令

华为交换机基本配置命令一、单交换机VLAN划分命令命令解释system 进入系统视图system-view 进入系统视图quit 退到系统视图undo vlan 20 删除vlan 20sysname 交换机命名disp vlan 显示vlanvlan 20 创建vlan(也可进入vlan 20)port e1/0/1 to e1/0/5 把端口1-5放入VLAN 20 中disp vlan 20 显示vlan里的端口20int e1/0/24 进入端口24port access vlan 20 把当前端口放入vlan 20undo port e1/0/10 表示删除当前VLAN端口10disp curr 显示当前配置二、配置交换机支持TELNETsystem 进入系统视图sysname 交换机命名int vlan 1 进入VLAN 1ip address 192.168.3.100 255.255.255.0 配置IP地址user-int vty 0 4 进入虚拟终端authentication-mode password (aut password) 设置口令模式set authentication password simple 222 (set aut pass sim 222) 设置口令user privilege level 3(use priv lev 3) 配置用户级别disp current-configuration (disp cur) 查看当前配置disp ip int 查看交换机VLAN IP配置删除配置必须退到用户模式reset saved-configuration(reset saved) 删除配置reboot 重启交换机三、跨交换机VLAN的通讯在sw1上:vlan 10 建立VLAN 10int e1/0/5 进入端口5port access vlan 10 把端口5加入vlan 10vlan 20 建立VLAN 20int e1/0/15 进入端口15port access vlan 20 把端口15加入VLAN 20int e1/0/24 进入端口24port link-type trunk 把24端口设为TRUNK端口port trunk permit vlan all 同上在SW2上:vlan 10 建立VLAN 10int e1/0/20 进入端口20port access vlan 10 把端口20放入VLAN 10int e1/0/24 进入端口24port link-type trunk 把24端口设为TRUNK端口port trunk permit vlan all (port trunk permit vlan 10 只能为vlan 10使用)24端口为所有VLAN使用disp int e1/0/24 查看端口24是否为TRUNKundo port trunk permit vlan all 删除该句四、路由的配置命令system 进入系统模式sysname 命名int e1/0 进入端口ip address 192.168.3.100 255.255.255.0 设置IPundo shutdown 打开端口disp ip int e1/0 查看IP接口情况disp ip int brief 查看IP接口情况user-int vty 0 4 进入口令模式authentication-mode password(auth pass) 进入口令模式set authentication password simple 222 37 设置口令user privilege level 3 进入3级特权save 保存配置reset saved-configuration 删除配置(用户模式下运行)undo shutdown 配置远程登陆密码int e1/4ip route 192.168.3.0(目标网段) 255.255.255.0 192.168.12.1(下一跳:下一路由器的接口)静态路由ip route 0.0.0.0 0.0.0.0 192.168.12.1 默认路由disp ip rout 显示路由列表sw1(三层交换机):int vlan 10 创建虚拟接口VLAN 10ip address 192.168.10.254 255.255.255.0 设置虚拟接口VLAN 10的地址int vlan 20 创建虚拟接口VLAN 20ip address 192.168.20.254 255.255.255.0 设置虚拟接口IP VLAN 20的地址注意:vlan 10里的计算机的网关设为 192.168.10.254vlan 20里的计算机的网关设为 192.168.20.254[S9306-GigabitEthernet2/0/42]dis this#interface GigabitEthernet2/0/42 原先的为trunk,port link-type trunkport trunk allow-pass vlan 2 to 4094Duplex {auto/half/full}Speed {auto/10/100/1000}#interface GigabitEthernet2/0/42 现在改为accessundo port trunk allow-pass vlan allport trunk allow-pass vlan 1port link-type accessport default vlan 10Stp enableStp priority 4096Stp root {primary/secondary}华为路由器交换机配置命令:路由器命令[Quidway]displayversion;显示版本信息[Quidway]displaycurrent-configuration;显示当前配置[Quidway]displayinterfaces;显示接口信息[Quidway]displayiproute;显示路由信息[Quidway]sysnameaabbcc;更改主机名[Quidway]superpasswrod123456;设置口令[Quidway]interfaceserial0;进入接口[Quidway-serial0]ipaddress;配置端口IP地址[Quidway-serial0]undoshutdown;激活端口配置ospf[S9300-A] router id 1.1.1.1[S9300-A] ospf 100[S9300-A-ospf-100] area 0[S9300-A-ospf-100-area-0.0.0.0] network 192.168.0.0 0.0.0.255 [S9300-A-ospf-100-area-0.0.0.0] quit[S9300-A-ospf-1] area 1[S9300-A-ospf-100-area-0.0.0.1] network 192.168.1.0 0.0.0.255 [S9300-A-ospf-100-area-0.0.0.1] quit[S9300-A-ospf-1] quit。

华为交换机命令大全

华为交换机命令大全

华为交换机基本配置命令详解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业务环回组。

华为交换机命令大全

华为交换机命令大全

华为交换机命令大全[Quidway]discur ;显示当前配置[Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息[Quidway]display vlan all ;显示路由信息[Quidway]displayversion ;显示版本信息[Quidway]superpassword ;修改特权用户密码[Quidway]sysname;交换机命名[Quidway]interface ethernet 0/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;三层交换支持[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 ethernet 0/1 ;进入端口模式[Quidway]inte0/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]port link-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 ethernet 0/1 ;在VLAN中增加端口[Quidway-vlan3]porte0/1 ;简写方式[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口[Quidway-vlan3]port e0/1 to e0/4 ;简写方式[Quidway]monitor-port <interface_type interface_num> ;指定镜像端口[Quidway]port mirror <interface_type interface_num> ;指定被镜像端口[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 ;始端口为通道号。

华为交换机基本命令

华为交换机基本命令

华为交换机配置常用命令一、配置软件和硬件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。

华为交换机命令大全

华为交换机命令大全

华为交换机命令大全system-view 进入系统视图quit 退到系统视图sysname 交换机命名vlan 20 创建vlan(进入vlan20)display vlan 显示vlanazundo vlan 20 删除vlan20display vlan 20 显示vlan里的端口20Interface e1/0/24 进入端口24portlink-type access vlan 20 把当前端口放入vlan20undo porte1/0/10 删除当前VLAN端口10display current-configuration 显示当前配置0 2配置交换机支持TELNETinterfacevlan 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重启交换机0 3跨交换机VLAN的通讯在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 删除该句0 4路由器的基础命令汇总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 查看路由表0 5telnet远程登陆配置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 设置验证方式aaa0 6配置Stelnet配置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~15 stelnet server enable 开启ssh功能display ssh user-information huawei1 查看ssh用户配置信息不指定用户默认查看所有用户display ssh server status 查看ssh服务器全局配置信息0 7STP配置和选路规则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为边缘端口不参与生成树的计算0 8配置MSTP多实例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中的根交换机0 9RIP路由协议配置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 + ip10OSPF单区域配置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配置OSPF区域明文认证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进程中发布默认路由17vrrp(虚拟路由器冗余协议)基本配置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配置VRRP多备份组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配置VRRP的跟踪接口及认证int g0/0/1vrrp vrid 1 track interface GigabitEthernet 0/0/0 reduced 50监视上行接口G0/0/0,当此接口断掉时,裁减优先级50,使优先级为70vrrp 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 查看设备上所有的访问控制列表。

华为交换机常用命令

华为交换机常用命令

交换机的24号端口为数据进口,禁忌作关闭操作1.进入交换机系模式:sys关闭端口:inter e 0/端口号shutdown开是undo shutdown2.查看单独的端口dis inter e 0/端口号dis mac 看MAC3.进入要改变带宽的端口inter e0/端口号line-rate in 37 (进)line-rate out 37 (出)下载和上传都是10M带宽的换算方式是N-2737-27=1010M=2720M=4730M=57以此类推4.通过IP查找端口ping 所查IPdis arpdis mac 该IP把对应的mac交换机命令~~~~~~~~~~[Quidway]dis cur ;显示当前配置[Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息[Quidway]display vlan all ;显示路由信息[Quidway]display version ;显示版本信息[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 ;配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Quidway]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 ethernet 0/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]port link-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]vlan 3 ;创建VLAN[Quidway-vlan3]port ethernet 0/1 ;在VLAN 中增加端口[Quidway-vlan3]port e0/1 ;简写方式[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN 中增加端口[Quidway-vlan3]port e0/1 to e0/4 ;简写方式[Quidway]monitor-port <interface_type interface_num> ;指定镜像端口[Quidway]port mirror <interface_type interface_num> ;指定被镜像端口[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 <x> secondary <list> ;设置主vlan包括的子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan <id> ;设置vlan的pvid[Quidway-Ethernet0/2]port hybrid pvid ;删除vlan的pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。

华为路由交换机命令大全

华为路由交换机命令大全

华为路由交换机命令大全华为路由交换命令大全华为一般模式(用户户级)命令:(每条命令都可以+?查看其配置参数)>?enable Turn on privileged commands 转入特权用户模式exit Exit from EXEC 退出配置help Description of the interactive help system 系统帮助简述language Switch language mode (English, Chinese) 语言模式切换ping Send echo messages 检查网络主机连接及主机是否可达show Show running system information 显示系统运行信息telnet Open a telnet connection 远程登录功能tracert Trace route to destination 跟踪到目的地经过了哪些路由器华为特权模式命令:#?clear Reset functions 清除各项统计信息clock Manage the system clock 管理系统时钟configure Enter configuration mode 进入全局配置模式copy Upload config file to tftp server 上载配置文件到TFTP服务器debug Debugging functions 开启调试开关disable Turn off privileged commands 返回普通用户模式download Download the new version config 下载新版本配置文件erase Erase the configuration file in flash or nvram 擦除FLASH或NVRAM中的配置文件exec-timeout Enable EXEC time out 打开EXEC超时退出开关exit Exit from EXEC 退出配置first-config Set or clear the first config flag 设置或清除初次配置标志get Download config file from tftp server 从TFTP服务器下载配置文件help Description of the interactive help system 系统帮助简述language Switch language mode (English, Chinese) 语言模式切换no Disable some parameter switchs 关闭某些参数开关ping Send echo messages 检查网络主机连接及主机是否可达reboot Reboot the router 路由器重启setup Run the SETUP command facility 配置路由器参数show Show running system information 显示系统运行信息telnet Open a telnet connection 远程登录功能tracert Trace route to destination 跟踪到目的地经过了哪些路由器write Write running configuration to flash or nvram 将当前配置参数保存至FLASH或NVRAM中华为全局配置模式命令:(config)#?aaa-enable Enable AAA(Authentication, Authorization and 使能配置AAA(认证,授权和计费)Accounting)access-list Configure structure of access-list 配置标准访问表arp Set a static ARP entry 设置静态ARP入口chat-script Define a modem chat script 生成一个用在modem 上的执行脚本crypto Config IPSec or crypto map 设置IPSec相关参数custom-list Build the custom queue list 创建定制队列列表dialer-list Create a dialer-list 创建dialer-listdlsw Configure dlsw 配置DLSwdram-wait Insert dram wait state 设置DRAM等待状态enable Modify enable password parameters 修改ENABLE口令exit Exit from configure mode 退出全局配置模式firewall Configure firewall status 配置防火墙状态flow-interval set time of flow control 设置流量控制时间间隔frame-relay global frame relay configuration commands 帧中继全局配置命令集ftp-server File transfer Protocol FTP 服务器help Description of the interactive help system 系统帮助命令简述host Add host's name and IP address 添加主机名称和其IP地址hostname Modify hostnamec 修改主机名ifquelen Change interface queue length 更改接口队列长度interface Select an interface to configure 选择配置接口ip Global ip configuration subcommands 全局IP配置命令子集ipx Novell IPX global configuration commands 全局IPX配置命令子集logging Logging configuration commands 全局Logging 配置命令logic-channel Select a logic-channel to configure 配置逻辑通道login Enable EXEC Authenticaion 启动EXEC登录验证multilink Set multi-link parameters 配置multilink 参数multilink-user Set multi-link bind interface by username 配置multilink 用户使用的接口nat config net address translation 配置地址转换no Disable some parameter switchs 关闭某些参数开关priority-list Build the priority queue list 创建优先级队列列表route-map Configure route-map 配置路由映射router Enable a routing process 启动路由处理settr Set time ranges 设置时间范围snmp-server Modify SNMP parameters 修改SNMP参数tcp Global TCP parameters 配置全局TCP参数terminal Set terminal line parameters 设置终端参数timerange Enable or disable time range 启动或关闭时间区域tty-server Huawei tty server 华为终端服务器user Add a user into system for ppp authentication use. 为PPP验证向系统中加入用户version Confirm current VRP version 确认配置VRP版本号和将当前VRP的版本是否相同vpdn Configure VPDN 设置VPDNvpdn-group Configure VPDN Group 设置VPDN组x25 X25 level 3 X.25协议分组层华为接口模式配置命令:(1)(config-if-Ethernet0)#?backup Modify dial-backup parameters 修改拨号备份参数bridge-group Join into DLSw Bridge-group 将以太网端口加入DLSw桥组crypto Apply crypto map to interface 在接口上应用crypto mapcustom-group Assign a custom queue list to an interface 将CQL应用到接口上description Ethernet interface specific description 设置以太网端口描述字串duplex Configure duplex operation mode 设置双向操作模式exit Exit from config interface mode 退出端口配置模式help Description of the interactive help system 随机帮助系统简述ip Interface Internet Protocol configure command IP协议配置命令集ipx Novell IPX interface subcommands IPX协议命令子集llc2 Modify LLC2 parameters 设置以太网端口的LLC2参数loopback Configure internal loopback on an interface 配置端口自环方式mtu Set ethernet interface Maximum Transmission Unit(MTU) 设置以太网MTUnat Network Address Translator 网络地址转换no Negate a command or set its defaults 取消命令或设置缺省值priority-group Assign a priority queue list to an interface 将PQL应用到接口上send-frame-type Set the format of the sending frames 设置传送帧格式shutdown Shutdown the selected interface 关闭所选端口standby Hot standby router config HSRP 热备份路由配置(2)(config-if-Serial0)#?backup Modify dial-backup parameters 修改备份口参数baudrate Set transmite and receive baudrate 配置发送、接收波特率bridge-group Join into DLSw Bridge-group 将本串口加入DLSw桥组clock-select Select transmit and receive clock comes from 选择发送、接收时钟来自本地远程local or remotecrypto Apply crypto map to interface 在接口上应用crypto mapcustom-group Assign a custom queue list to an interface 将CQL应用到接口上description interface specific description 设置端口描述字串detect Detect DSR or DTR signal on serial interface 在串口上监测DSR DTR 信号dialer Dial-On-Demand routing (DDR) command 拨号配置命令dialer-group Assign the interface to dialer-list 配置接口的dialer-list encapsulation Set encapsulation type for an interface 设置端口协议封装类型exit Exit from config interface mode 退出端口配置模式flowcontrol Auto flowcontrol or normal flowcontrol 设置流控制方式help Description of the interactive help system 随机帮助系统简述idle-mark Idle in mark mode 空闲为mark状态invert Invert Transmit clock 反转接收时钟ip Interface Internet Protocol configure command IP协议配置命令集ipx Novell IPX interface subcommands IPX协议命令子集keepalive Enable keepalive 使keepalive有效loopback Configure internal loopback on an interface 设置接口内部自环方式mtu Maximum transmission unit 最大传送单位nat Network Address Translator 网络地址转换no Negate a Command or Set its default 取消某命令或配置路由器缺省值nrzi-encoding Set line code to nrzi encoding mode 设置编码方式为NRZI模式peer Peer parameters for point-to-point interface PPP接口的端参数physical-layer Configure sync or async physical layer on serial 设置串口传输方式为同步异步interfaceppp Point-to-Point Protocol PPP协议priority-group Assign a priority queue list to an interface 将PQL应用到接口上-sdlc This command can be used when encapsulate SDLC 只有在封装了SDLC协议才可以使用此命令shutdown Shutdown the selected interface 关闭所选端口terminal Terminal source ip address bind. 终端源地址绑定tty Configure terminal server parameter 配置终端服务器参数配置路由器:(以下命令可减写)路由器基本操作:重启路由器特权模式:reboot 在特权模式下擦除配置信息:#erase 写入配置信息:write 查看命令:#show 重起端口:在端口模式关闭#shut 打开#no+shut (有些命令须重启才可生效)关闭超时退出功能:#no exec 设定主机名:(config)#hostnameDCE方应配置速率:在s0端口配置(config-if-Serial0)#baud 2048000 (注意: 在使用V.24电缆时波特率必须设置成不高于64Kbps!) 填加IP地址:在接口模式下#ip add+IP地址+掩码静态路由:在全局配置模式ip router+目的IP地址+掩码+网关(相邻机器IP地址)查看路由表:sh+ip+route封装协议:(电信DCE设备为发送方、本地DTE设备为接收方)在s0端口配置:(config-if-Serial0)#encap+ppp(任意协议)*ppp协议不适合恶劣介质*链路层PPP点到点协议有两种验证方式:PAP口令验证和CHAP 挑战口令验证(1)PAP验证方式配置:在DCE验证方:(config-if-Serial0)#ppp+auth验证方式+pap 验证方式建立用户:(config)#user+名字+pass+密码是否隐藏(7是/0否)+密码DTE被验证方:(config-if-Serial0)#ppp+pap+sent+名字+pass+密码是否隐藏(7是|0否)+密码*(用户名和密码DCE与DTE同相)*重起端口:在端口模式关闭#shut 再打开#no+shut (有些程序须重启才可生效)建立路由完成验证(2)先删除原来验证方式再配置CHAP验证方式:(可靠方式)在DCE验证方s0端口填加验证方式:(config-if-Serial0)#ppp+auth+chap在DCE验证方s0端口填加chap主机名:(config-if-Serial0)#ppp+chap+host+名字(任意)在DCE验证方填加验证方式:(config)#user+对方主机名字+pass+密码是否隐藏(7是/0否)+密码建立路由完成验证*(DCE与DTE相同)*重起端口:在端口模式关闭#shut 再打开#no+shutppp协议协商(自动协商)只有PPP协议可以自动生成路由项DTE:s0封装DCE:分配方 DTE被分配方配置方法:DCE:(config-if-Serial0)#ip add 50.50.50.1 255.0.0.0(config)#ip local pool 1 50.50.50.50(最低) 50.50.50.60(最高) 配置地址池(config-if-Serial0)#peer default ip add pool 1 分配对方IP地址DTE:(config-if-Serial0)#ip add nego自动获取地址特点:所获得地址没有子网路由x.25协议配置方法:DCE方:(config-if-Serial0)#encap x25 dce(config-if-Serial0)#x25 ltc 16 设置最小双向信道(config-if-Serial0)#x25 htc 16 设置最大双向信道(config-if-Serial0)#x25 nvc 4 设置链接信道条数(config-if-Serial0)#x25 mod 128设置窗口尺寸(config-if-Serial0)#x25 wout 8设置缺省发送窗口大小(config-if-Serial0)#x25 win 8 设置缺省接收窗口大小(config-if-Serial0)#x25 ips 1024 设置输入包长度(config-if-Serial0)#x25 ops 1024 设置输出包长度(config-if-Serial0)#x25 add (88888888) 任意x.25链路层地址(config-if-Serial0)#ip add (IP地址)给双方填加IP地址(config-if-Serial0)#x25 map ip (目标IP地址)(99999999 对端x.25链路层地址)+broadcast(支持广播)DTE方:同上 (DCE和DTE映射时必须指对方端地址)x.25具有寻址功能和纠错功能,它包括物理层、链路层、和网路层,它是一个协议集,支持流控帧中继协议(Frame-relay)配置方法:DCE方:先配置IP地址再打开帧中继交换(config)#frame switch(config-if-Serial0)#encap int dce 设置封装模式(config-if-Serial0)#frame local 18 定义虚电路号*DTE方:同上 (虚电路号发必须相同)当不允许逆向地址解析时,必须手动填加地址和虚电路对应*借用IP地址:DCE方:先设定e0IP地址(config-if-Serial0)#int s 0.1 point 设置子接口为点到点(config-if-Serial0)#frame inter 50 设置虚电路号(config-if-Serial0)#ip unnum eth0 指定IP借用(config)#ip route (下一跳网络号) (掩码)255.255.255.252 s 0.1 DTE方:同上设e0 IP地址(config)#ip route (下一跳地址) (掩码)255.255.255.255 s 0.1(config)#ip route 0.0.0.0 0.0.0.0 (下一跳地址)rip协议配置方法:(DCE和DTE相同)(config)#router rip 设置rip协议启动(config)#network all 把本机所有网段都参于路由交换(广播)(config)#no network (IP网段)单独取消某网段(config)#no network all 所有网段都关闭(config)#sh ip rip 查看路由信息如果想要静态路由也通过rip广播出去须借用路由:(config-router-rip)#redis static(引用路由) metric(静态路由度量值) 1(config-router-rip)#neighbor 对端IP地址OSPF协议配置方法:OSPF不能在x.25和frame frelay协议上进行广播DCE和DTE都封装(任意协议,例:x.25)(config)#router ospf enable 设置OSPF协议启动再进入单独端口启动OSPF:(config-if-Serial0)#ip ospf enable area 1或0(为骨干)(config-if-Ethernet0)#ip ospf enable area 1(config-if-Serial0)#ip ospf neighbor 对端IP地址(config)#ip route 目标网络号掩码下一跳IP 间接路由(config-router-ospf)#redis ospfase static metric 1(度量值默认为1)网络安全:用路由器做firewall(防火墙):(config)#firewall enable 打开防墙设置(config)#firewall default 设置默认规则(config)#access 101(任意号) sirt(指定自链顺序) auto(精度优先) 地址过滤:(config)#access 101 deny ip 70.70.70.2(源地址IP) 0.0.0.0(掩码255.255.255.255反码) 70.70.70.1(目的IP) 0.0.0.0(掩码255.255.255.255反码)定义一条规责不让70.70.70.1访问70.70.70.2(config-if-Ethernet0)#ip access 101 in (把101规责定义在e0口的输入方)(config)#no access 101(规则号) 删除一条链101(config)#sh access 101(规则号) 查看一条链101(config)#access 101 deny ip 70.70.70.0(源地址IP) 0.0.0.127(掩码255.255.255.128反码) 50.50.50.2 (目的IP)0.0.0.0(掩码255.255.255.255反码) 拒绝70.70.70.1-127网段访问允许某个地址访问:(config)#access 101 deny ip any 70.70.70.2(源地址IP) 0.0.0.0(掩码255.255.255.128反码) (config)#aceess 101 permit ip 70.70.70.64(源地址IP) 0.0.0.3(掩码255.255.255.252反码) any只允许70.70.70.64 - 67访问(config-if-Serial0)#ip access 101 in 在s0口加入101链端口过滤:(config)#access 101 deny ip tcp any(任何目标地址) 70.70.70.1(源地址IP) 0.0.0.0(掩码255.255.255.255反码) eq (23端口)或telnet 类型过滤别人ping不通你,你可ping通别人(config)#access special 101 deny ip tcp any(源任何地址) 70.70.70.1(目标IP地址)0.0.0.0(掩码255.255.255.255反码) eq telnet 对本机特定时间段拒绝telnet(config)#rimerange eable 开启时间段(config)#settr(范围)18:23(开始) - 18:25(结束) 时间段内生效链路集合:DCE:(config-if-Serial0)#peer default ip add 50.50.50.2 不定义地址池只有一端与其相连DTE:(config)#sh ip route 查看路由(config)#ip add nego 自动获取地址VPN(虚拟专用网):利用协议做一条专线让两个局域网通过互连网相连。

华为常用命令参考

华为常用命令参考

解释 明文 密文 host名字和ip地址对应 日志信息 封装链路层协议 显示版本 显示当前配置 显示全面的信息 显示已保存的配置 退回到系统视图 上一条命令 下一条命令 display cur display ip routing-table 取消所有debug命令
2.如何打开debug开关 debug是设备调试,排错中非常重要也非常有效的手段。需要对网络协议和Quidway 产品相对熟悉的情况下使用。 过程:首先输入 [Router]info-center enable 使用console配置口时,输入: [Router]info-center console [Router]info-center console debug 使用远程telnet时,输入: [Router]info-center monitor [Router]info-center monitor debug 此处以调试链路层协议ppp数据包为例 [Router]debugging ppp packet 『注意』 特权模式下debug;可以从display debug看出现在有哪些调试开关是打开的 调试开关打开,对路由器性能会有相应程度的影响,所以用后请及时关闭调试信息: [Router]undo debug all,或者ctrl+d亦可
擦除Flash Memoห้องสมุดไป่ตู้y中以太网交换机配置文件。 <Quidway> reset saved-configuration The saved configuration will be erased. Are you sure?[Y/N]
5.文件系统命令 5.1改变当前目录 【命令】 cd directory 【参数】 directory:目标目录名。 【描述】 cd命令用来修改以太网交换机的当前工作路径。 缺省目录为在配置用户启动时设置的工作路径。 【举例】 修改以太网交换机当前工作路径为flash。 <Quidway>cd flash: <Quidway>pwd flash:

华为交换机常用命令

华为交换机常用命令

华为交换机常用命令 The manuscript was revised on the evening of 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。

华为交换机常用命令

华为交换机常用命令
[R1]ip route-static 2.2.2.0 24 21.1.1.2 “华为静态路由默认preference 60”
[R1]dis ip routing-table protocol static “查看所有preference路由”
Route Flags: R - relay, D - download to fib
rsa local-key-pair create “生成密钥对”
客户端:
ssh client first-time enable “第一次连接服务端下载秘钥”
stelnet xx.xx.xx “直接给服务端ip”
静态路由:
[AR1]display ip routing-table “查看路由表”
[Ftp server-aaa]local-user huawei privilege level 3 “设置用户权限”
<Ftp server>dir “进入flash目录”
<Ftp server>mkdir ftp “创建共享目录”
[Ftp server]aaa
[Ftp server-aaa]local-user huawei ftp-directory flash:/ftp “指定huawei用户访问的目录”
[Huawei]display history-command “显示最近使用过的命令”
[Huawei]display user “显示正在连接的终端用户”
[Huawei]display this “查看当前接口、模式下的配置”
[Huawei]display save-configuration “查看已保存的配置”
RIP v1:
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
quit
允许多个vlan通过某个接口
sys
port gigabitethernet 0/0/1
port link-type trunk
port trunk allow-pass vlan all
5.配置VLAN聚合
6.配置VLAN映射
7.配置QINQ
8.配置MAC学习限制功能
2.4.
三、可靠性
3.1
quit
没有密码和使用密码认证同上
二、以太网
2.1
system-view
interface gigabitethernet 0/0/24
combo-port fiber/copper
netgotination auto
loopback-detect enable //环路检测
port-isolate enable //端口隔离
aaa
local-user huawei password simple huawei
local-user huawei service-type telnet
local-user huawei priority level 3
quit
user-interface vty 0 4
authentication-mode aaa
3.2
四、IP路由
4.1
配置默认静态路由
system-view
ip route-static 0.0.0.0 0.0.0.0 next-hop
配置静态路由
system-view
ip route-static 10.1.1.0 255.255.255.0 next-hop
4.2
五、IP业务
5.1
1.单一地址
2 配置用户认证域
aaa
domain system
radius-server radiusserver
3使能全局和接口下的802.1x功能
Dot1x
Interface ethernet 0/0/1
Dot1x
Sys
Vlan 2
Quit
Interface vlanif 2
Ip address 192.168.1.1 24
Quit
2.配置主从IP地址
system-view
interface vlanif 2
ip address 10.1.1.1 24
ip address 10.1.2.1 24 sub
5.2
Radius-server template radiusserver
Radius-server authentication 10.1.1.254 1812
Radius-server according 10.1.1.254 1813
Radius-server shared-key huawei
Undo radius-server user-name domain-included
snmp-agent trap enable
snmp-agent target-host trap address udp-domain 10.10.10.2 udp-port 5000 params securityname public
十、设备管理
10.1
十一、802.1X认证
1创建认证模板
设置认证服务器的IP地址和协议端口号、密钥
eth-trunk 1
2.3
1.创建单一vlan
sys
vlan 2
quit
2.创建批量vlan
syn 10 to vlan 20
quit
3.基于干道链路VLAN 实例
4.配置基于子网vlan
允许一个vlan通过某个接口Vlan 2
port gigabitethernet 0/0/1
1.基于全局的DHCP
2.DHCP中继
5.3
六、IGMP
七、QOS
基于端口限速的QOS
八、安全性
8.1
九、网络管理
9.1
system-view
snmp-agent sys-info version v3
snmp-agent community read public
snmp-agent community write private
华为交换机常用配置大全
2010-02-27
一、基础配置
1.1配置文件处理
导入配置文件
tftp x.x.x.x get vrpcfg.zip vrpcfg.zip
导出配置文件
tftp x.x.x.x put vrpcfg.zip vrpcfg.zip
1.2配置交换机远程管理
aaa 方式
system-view
qos lr cir 625 cbs 625000//端口限速
quit
端口隔离举例
2.2
system-view
interface eth-trunk 1
interface gigabitgibabitethernet0/0/1
eth-trunk 1
interface gigabitgibabitethernet0/0/2
相关文档
最新文档