华为交换机命令大全
华为路由器交换机配置命令大全
华为路由器交换机配置命令大全华为路由器交换机配置大全本文提供XXX路由器交换机的配置命令,包括计算机命令和交换机命令。
一、计算机命令以下是一些常用的计算机命令: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包;远程登录二、XXX路由器交换机配置命令以下是一些常用的XXX路由器交换机配置命令:Quidway]dis cur;显示当前配置Quidway]display n;显示当前配置Quidway]display interfaces;显示接口信息Quidway]display vlan;显示vlan信息Quidway]display n;显示版本信息Quidway]super password;修改特权用户密码Quidway]sysname;交换机命名Quidway]XXX;进入接口视图Quidway]interface vlan x;进入接口视图Quidway-Vlan-interface x]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 ftpQuidway]user-interface vty 0 4;进入虚拟终端S3026-ui-vty0-4]n-mode password;设置口令模式首先,这篇文章需要进行重新排版和编辑,以便更清晰地传达信息。
华为路由器交换机常用命令
华为路由器交换机常用命令一、设备管理命令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地质。
华为交换机常见命令
一、清空配置:<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为例,配置如下。
华为交换机命令大全
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章产品介绍1.1 产品简介随着Internet(因特网)的高速发展,人们对通信的需求已逐渐从传统的电话、传真、电报等低速业务向高速的Internet接入、可视电话、视频点播等宽带业务领域延伸,用户对上网速率的需求也越来越高。
在这种需求条件下,以太网接入因其成本低、速度高、使用简单而倍受市场的关注。
面对宽带网络建设的迅猛发展,华为公司根据不同的客户类型需求,推出了Quidway系列以太网交换机。
Quidway S2008B/Quidway S2016B/Quidway S2026B以太网交换机是华为公司自主开发的三款二层线速以太网交换产品,它除了能提供传统以太网的功能外,还针对楼道级交换机的特点,从软件、硬件及结构造型等方面进行了优化设计,因而特别适合于以太网宽带接入的要求。
Quidway S2008B/Quidway S2016B以太网交换机均为44mm高的盒式设备,可以壁挂安装。
S2008B以太网交换机提供8个固定的10/100Base-TX自适应端口,S2016B以太网交换机提供16个固定的10/100Base-TX自适应端口,此外两者都提供1个10/100Base-TX自适应上行端口及1个用于配置的Console口。
另外S2016B以太网交换机还提供1个扩展模块插槽,可选插100Base-FX多模光纤接口模块或100Base-FX单模光纤接口模块。
Quidway S2026B以太网交换机为42mm高的盒式设备,可以壁挂安装,也可以通过19英寸机架安装。
Quidway S2026B以太网交换机提供24个固定的10/100Base-TX自适应端口、1个100Base-TX上行端口(实际为1个100Base-TX上行端口复用为1个MDIX端口和1个MDI端口,同时只能有1个端口工作)、1个用于配置的Console口和1个扩展模块插槽,可选插100Base-FX多模光纤接口模块或100Base-FX单模光纤接口模块。
(完整版)华为交换机命令大全
华为交换机基本配置命令详解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并进入其视图。
华为路由器交换机配置命令大全
华为路由器交换机配置命令大全华为路由器交换机配置命令大全一、登录与认证命令1.Telnet 登录命令2.SSH 登录命令3.Console 登录命令4.用户认证命令二、设备管理命令1.设备信息查看命令2.设备参数配置命令3.设备重启命令4.设备保存配置命令三、接口配置命令1.查看接口状态命令2.配置接口描述命令3.配置接口IP地质命令4.配置接口MTU命令5.开启/关闭接口命令四、路由配置命令1.配置静态路由命令2.配置默认路由命令3.配置动态路由命令4.查看路由表命令5.清空路由表命令五、VLAN 配置命令1.配置VLAN命令2.配置端口VLAN命令3.配置VLAN接口命令六、交换机功能配置命令1.配置端口镜像命令2.配置链路聚合命令3.配置交换机端口安全命令4.配置交换机QoS命令七、安全配置命令1.配置访问控制列表命令2.配置NAT命令3.配置防火墙命令4.配置SSL VPN命令附录:附件:1.示例配置文件2.常见问题解答法律名词及注释:1.Telnet:一种远程登录协议,用于远程连接路由器或交换机进行管理和配置。
2.SSH:Secure Shell,一种用于远程登录的网络协议,提供安全的数据通信和用户认证方式。
3.Console:一种通过串口连接设备进行本地登录的方式。
4.VLAN:Virtual Local Area Network,虚拟局域网,将不同的物理分组划分到不同的逻辑分组中,实现逻辑分离。
5.MTU:Maximum Transmission Unit,最大传输单元,指数据链路层上一次发送的帧的最大长度。
6.NAT:Network Address Translation,网络地质转换,用于在私有网络和公共网络之间进行通信的转换技术。
7.QoS:Quality of Service,服务质量,用于在网络通信中对不同数据流进行优先级和带宽控制。
华为交换机基本命令
1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10 中12、p ort E1/0/2 to E1/0/5在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan 通过一、单交换机VLAN划分命令命令解释system 进入系统视图system-view 进入系统视图quit 退到系统视图undo vlan 20 删除vlan 20sysname 交换机命名进入端口 24user-int vty 04 进入虚拟终端authentication-mode password (aut password)令模式 set authentication password simple 222 (set aut pass sim 222)设置口令user privilege level 3(use priv lev 3)删除配置必须退到用户模式vlan 20 创建 vlan ( 也可进入 vlan 20) port e1/0/1 to e1/0/5 把端口 1-5 放入 VLAN 20 中 disp vlan 20 显示 vlan 里的端口 20port access vlan 20 把当前端口放入 vlan 20undo port e1/0/10 表示删除当前VLAN 端口 10 disp curr 显示当前配置 二、配置交换机支持 TELNET system 进入系统视图 sysname 交换机命名 int vlan 1 进入 VLAN 1 ip address 192.168.3.100 255.255.255.0 配置 IP 地址int e1/0/24 设置口配置用户级别disp current-configuration disp cur) 查看当前配置disp ip int查看交换机 VLAN IP 配置reset saved-configuration(reset saved) reboot 重启交换机三、跨交换机VLAN 的通讯建立 VLAN 10进入端口 5把端口 5 加入 vlan 10建立 VLAN 20进入端口 15把端口 15加入 VLAN 20进入端口 24把24端口设为TRUN 端口 同上建立 VLAN 10进入端口 20把端口 20放入 VLAN 10进入端口 24把24端口设为TRUN 端口port trunk permit vlan all (port trunkpermit vlan 10只能为vlan 10使用)24端口为所有VLAN 使用在 sw1 上:vlan 10 int e1/0/5 port access vlan 10 vlan 20 int e1/0/15 port access vlan 20 int e1/0/24 port link-type trunk port trunk permit vlan all 在 SW2上:vlan 10 int e1/0/20 port access vlan 10int e1/0/24port link-type trunk 删除配置disp int e1/0/24查看端口24 是否为TRUNK[S3026]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2[S3026]ip default-gateway 10.65.1.2 清除端口错误命令在>模式下,输入reset counters interface 口号欢迎您的下载,资料仅供参考!致力为企业和个人提供合同协议,策划案计划书,学习资料等等打造全网一站式需求。
华为命令大全
华为命令大全一、配置交换机的名称和密文密码:<Huawei> //用户视图<Huawei>system-view //进入系统视图配置[Huawei] //系统视图[Huawei]quit或return //退出系统视图模式[Huawei]sysname DTWLXY //设置主机名[Huawei]user-interface console 0 //进入控制台[Huawei-ui-console0]authentication-mode password[Huawei-ui-console0]set authentication password cipher huawei //配置密文密码二、配置交换机VLAN相关命令:[Huawei]vlan 10或[Huawei]vlan 20 //创建VLAN[Huawei-vlan10]deion dtwlxy //VLAN描述[Huawei]vlan batch 30 40 //创建多个VLAN[Huawei]int g0/0/1 //进入接口[Huawei-g0/0/1]port link-type access //访问口[Huawei-g0/0/1]port default vlan 10 //加入VLAN[Huawei-g0/0/2]port link-type trunk //干道口[Huawei-g0/0/2]port trunk allow-pass vlan 10 20允许[Huawei-g0/0/2]port trunk allow-pass vlan all //所有[Huawei]int e0/0/2 //进入接口[Huawei-E0/0/2]port link-type hybrid //混合口模式[Huawei-E0/0/2]undo port default vlan //删除默认vlan[Huawei-E0/0/2]port hybrid untagged vlan 20//去标签[Huawei-E0/0/2]port hybrid pvid vlan 2//设置默认vlan[Huawei-E0/0/2]port trunk allow-pass vlan 10 to 100[Huawei]dis port vlan //查看vlan[Huawei]display vlan //查看vlan三、配置交换机VLAN一致性GVRP:Normal模式:(类似cisco交换机服务器模式)[Huawei]gvrp //开启gvrp也是默认模式Fixed模式:(类似cisco交换机客户机模式)[Huawei-g0/0/2]gvrp registration fixedForbidden模式:(类似cisco交换机透明模式)[Huawei-g0/0/3]gvrp registration forbiddendis vlan summary //查看vlan汇总dis gvrp status //查看gvrp状态1四、配置路由器RIP协议:RIPv1 RIPv2[Huawei]rip //启用RIP默认v1[Huawei-rip-1]network 192.168.1.0 //发布直连网段[Huawei-rip-1]version 2 //配置v2版本[Huawei]dis rip //查看rip[Huawei]dis rip database //查看rip数据库[Huawei]dis ip routing-table //查看路由表五、配置静态路由[Huawei]ip route-static 192.168.50.0 24 10.0.12.2[Huawei]ip route-static 192.168.10.0 24 serial 0/0/1[Huawei]ip route-static 0.0.0.0 0 192.168.2.1 //默认[Huawei]dispaly ip routing-table //查看路由表六、配置路由器OSPF协议:[Huawei]ospf 1 //启用OSPF默认是进程1[Huawei-ospf-1]area 0 //进入区域0[Huawei-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255 //发布直连网段[Huawei-ospf-1]silent-interface g0/0/2 //被动接口[Huawei]dis ospf interface //查看ospf通告[Huawei]dis ospf peer //查看ospf邻居[Huawei]dis ip routing-table //查看路由表[Huawei]dis ospf routing //查看ospf路由表七、配置基于全局的DHCP协议:[Huawei]dhcp enable //开启dhcp[Huawei]ip pool dtwlxy //地址池名[Huawei-ip-pool-dtwlxy]network 192.168.1.0 //地址池[Huawei-ip-pool-dtwlxy]lease day 2 //租约默认1[Huawei-ip-pool-dtwlxy]gateway-list 192.168.1.254 //网关[Huawei-ip-pool-dtwlxy]excluded-ip-address192.168.1.250 192.168.1.253 //排除IP范围[Huawei-ip-pool-dtwlxy]dns-list 8.8.8.8 //DNS服务器[Huawei-G0/0/0]dhcp select global //基于全局八、配置基于接口的DHCP协议:[Huawei]dhcp enable //开启dhcp[Huawei]int g0/0/1 //进入接口[Huawei-G0/0/1]dhcp select interface //基于接口[Huawei-G0/0/1]dhcp server lease day 2 //租约默认1[Huawei-G0/0/1]dhcp serverexcluded-ip-address 192.168.1.1 192.168.1.10 //排除IP范围[Huawei-G0/0/1]dhcp server dns-list 8.8.8.8 //DNS[Huawei]dis ip pool //查看dhcp九、配置路由器基本ACL:2000-2999[Huawei]acl 2000 //配置基本acl[Huawei-acl-basic-2000]rule 5 permit source 1.1.1.1 0 //允许源IP(注意反掩码0,默认步长5) [Huawei-acl-basic-2000]rule 10 deny any //拒绝任意[Huawei]user-interface vty 0 4 //进入接口[Huawei-ui-vty0-4]acl 2000 inbound //应用acl[Huawei]dis acl all //查看所有acl[Huawei]dis acl 2000 //查看acl 2000十、配置路由器高级ACL:3000-3999[Huawei]acl 3000 //配置高级acl[Huawei-acl-adv-3000]rule permit ip source 1.1.1.1 0 destination 4.4.4.4 0 //允许访问[Huawei]user-interface vty 0 4 //进入虚拟接口[Huawei-ui-vty0-4]acl 3000 outbound //应用acl[Huawei]int g0/0/1 //进入接口[Huawei-G0/0/1]traffic-filter inbound acl 3000 //应用[Huawei]dis acl all //查看所有acl十一、静态NAT配置:<huawei>system-view[huawei]interface Ethernet 0/0/1 //进入端口视图[huawei-Ethernet0/0/1]ip address 192.1.1.1 30 //设置端口IP地址,网络号30位[huawei-Ethernet0/0/1]nat static global 192.1.1.2 inside 10.1.1.2 //静态NAT映射,私有地址10.1.1.2和公有地址192.1.1.2建立映射关系动态NAT配置:[huawei]nat address-group 1 192.1.1.2 192.1.1.4 //定义公有地址池[huawei]acl 2000[huawei-acl-basic-2000]rule permit source 10.1.1.0 0.0.0.255[huawei-acl-basic-2000]quit[huawei]interface Ethernet 0/0/1[huawei-Ethernet0/0/1]nat outbound 2000 address-group 1 //实现ACL2000中定义的IP可以与地址池中的地址进行NAT转换,这里默认配置的是NAPT,是多对一的关系,要配置Basic NAT,则需要加选项no-pat十二、配置三层交换机VLAN间路由:首先基本配置,IP、VLAN等。
华为路由器交换机配置命令大全
华为路由器交换机配置命令大全华为路由器交换机配置大全1XXX华为路由器交换机配置命令大全一、计算机命令#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;远程登录二、XXX路由器交换机配置命令:交换机命令[Quidway]dis cur;显示当前配置[Quidway]display current-configuration;表现当前配置[Quidway]display interfaces;显示接口信息[Quidway]display vlan;表现vlan信息[Quidway]display version;显示版本信息[Quidway]super password;修改特权用户密码[Quidway]sysname;交流机定名[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]vlan3;创建VLAN[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};设置为根或根的备份[SwitchA-vlanx]isolate-user-vlan enable;设置主vlan所以设置PVID为所属vlanid,设置可以互通的vlan为untagged.3、XXX路由器交流机配置敕令:路由器敕令[Quidway]display version;表现版本信息[Quidway]display current-configuration;表现当前配置[Quidway]display interfaces;显示接口信息[Quidway]display ip route;表现路由信息[Quidway]sysname aabbcc;变动主机名[Quidway]super password ;设置口令[Quidway]interface serial0;进入接口华为路由器交换机配置大全3[Quidway-serial0]ip address;配置端口IP地址[Quidway-serial0]undo shutdown;激活端口[Quidway]link-protocol hdlc;绑定hdlc协议[Quidway]user-interface vty 0 4[Quidway-ui-vty0-4]authentication-mode password[Quidway-ui-vty0-4]set authentication-mode password simple 222[Quidway-ui-vty0-4]user privilege level 3[Quidway-ui-vty0-4]quit[Quidway]debugging XXX;显示所有信息[Quidway]debugging XXX;调试事件信息[Quidway]debugging XXX;表现包的信息四、XXX路由器交换机配置命令:静态路由:[Quidway]ip route-static{interfacenumber|nexthop}[value][reject|blackhole]例如:[Quidway]ip route-static 129.1.0.0 16 10.0.0.2[Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2[Quidway]ip route-static 129.1.0.0 16 Serial2[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.0.0.25、XXX路由器交流机配置敕令:静态路由:[Quidway]rip;设置静态路由[Quidway]rip work;设置工作允许[Quidway]ri pinput;设置入口允许[Quidway]rip output;设置出口允许[Quidway-rip]network 1.0.0.0;设置交换路由网络[Quidway-rip]network all;设置与所有网络交换[Quidway-rip]peer ip-address;[Quidway-rip]summary;路由聚合[Quidway]rip version 1;设置事情在版本1[Quidway]rip version 2 multicast;设版本2,多播体式格局[Quidway-Ethernet0]rip split-horizon;水平分隔[Quidway]XXX;配置路由器的ID[Quidway]ospf enable;启动OSPF协议[Quidway-ospf]import-routedirect;引入直联路由[Quidway-Serial0]ospf enable area;配置OSPF地区六、XXX路由器交换机配置命令:标准访问列表命令格式如下:acl[match-orderconfig|auto];默许前者按次婚配。
华为交换机常用命令
华为交换机常用命令 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。
华为 路由交换机命令大全
华为路由交换命令大全华为一般模式(用户户级)命令:(每条命令都可以+?查看其配置参数)>?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.1DTE方:同上设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(虚拟专用网):利用协议做一条专线让两个局域网通过互连网相连。
常用的华为交换机命令
vlan 10
vlan 20
vlan 30
int e1/0/5
port access vlan 10
int e1/0/10
port access vlan 20
int e1/0/15
port access vlan 30
int vlan 10
ip address 192.168.10.1 255.255.255.0
int e1/0/24 进入24端口
port link-type trunk 把24端口设为TRUNK端口
port trunk permit vlan all (port trunk permit vlan 10 只能为vlan 10使用)24端口为所有VLAN使用
sw2:
vlan 10
int e1/0 进入e1/0端口
ip address 192.168.4.1 255.255.255.0 设置IP
int e2/0 进入e2/0端口
ip adress 192.168.5.2 255.255.255.0 设置IP
rip 设置动态路由
network 192.168.5.0 定义IP
注意:vlan 10里的计算机的网关设为 192.168.10.254
vlan 20里的计算机的网关设为 192.168.20.254
六、动态路由RIP
R1:
int e1/0 进入e1/0端口
ip address 192.168.3.1 255.255.255.0 设置IP
rule 2 permit source 192.168.3.0 0.0.0.255(允许地址192.168.3.0网段的数:
华为交换机常用命令配置介绍
华为交换机常用命令配置介绍华为交换机是一种常见的网络设备,用于构建大型网络。
配置华为交换机需要使用一些常用的命令,通过这些命令可以设置交换机的各种功能和参数。
本文将介绍一些常用的华为交换机配置命令,包括基本配置、端口配置和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 //重启设备以上是一些常用的华为交换机配置命令。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
华为交换机基本配置命令详解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业务环回组。
[Qw_A] interface ethernet 1/0/1 将以太网端口Ethernet1/0/1加入业务环回组。
[Qw_A-Ethernet1/0/1] undo stp[Qw_A-Ethernet1/0/1] port link-aggregation group 16、端口镜像[Quidway]monitor-port 指定镜像端口[Quidway]port mirror 指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num 指定镜像和被镜像7、VLAN配置[Quidway]vlan 4创建VLAN [Quidway-vlan4]port ethernet 1/0/1 to ethernet 1/0/4 在VLAN中增加端口①配置基于access的VLAN[Quidway-Ethernet1/0/2]port access vlan 4 当前端口加入到VLAN 注意:缺省情况下,端口的链路类型为Access类型,所有Access端口均属于且只属于VLAN1②配置基于trunk的VLAN[Quidway-Ethernet1/0/24]port link-type trunk 设置当前端口为trunk [Quidway-Ethernet1/0/24]port trunk permit vlan {ID|All} 设trunk允许的VLAN 注意:所有端口缺省情况下都是允许VLAN1的报文通过的[Quidway-Ethernet1/0/2]port trunk pvid vlan 34设置trunk端口的PVID ③配置基于Hybrid端口的VLAN[Quidway-Ethernet1/0/2]port link-type hybrid 配置端口的链路类型为Hybrid类型[Quidway-Ethernet1/0/2]port hybrid vlan vlan-id-list { tagged | untagged } 允许指定的VLAN通过当前Hybrid端口注意:缺省情况下,所有Hybrid端口只允许VLAN1通过[Quidway-Ethernet1/0/2]port hybrid pvid vlan vlan-id 设置Hybrid端口的缺省VLAN注意:缺省情况下,Hybrid端口的缺省VLAN为VLAN1④VLAN描述[Quidway]description string 指定VLAN描述字符[Quidway]undo description 删除VLAN描述字符[Quidway]display vlan [vlan_id] 查看VLAN设置⑤私有VLAN配置[Qw_A-vlanx]isolate-user-vlan enable 设置主vlan[Qw_A]Isolate-user-vlan secondary 设置主vlan包括的子vlan [Quidway-Ethernet1/0/2]port hybrid pvid vlan 设置vlan的pvid [Quidway-Ethernet1/0/2]port hybrid pvid 删除vlan的pvid [Quidway-Ethernet1/0/2]port hybrid vlan vlan_id_list untagged 设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.8、STP配置[Quidway]stp {enable|disable} 设置生成树,默认关闭[Quidway]stp mode rstp 设置生成树模式为rstp [Quidway]stp priority 8192设置交换机的优先级[Quidway]stp root {primary|secondary} 设置为根或根的备份[Quidway-Ethernet0/1]stp cost 200 设置交换机端口的花费MSTP配置:# 配置MST域名为info,MSTP修订级别为1,VLAN映射关系为VLAN2~VLAN10映射到生成树实例1上,VLAN20~VLAN30映射生成树实例2上。
system-view[Sysname] stp region-configuration[Sysname-mst-region] region-name info[Sysname-mst-region] instance 1 vlan 2 to 10[Sysname-mst-region] instance 2 vlan 20 to 30[Sysname-mst-region] revision-level 1[Sysname-mst-region] active region-configuration9、MAC地址表的操作①在系统视图下添加MAC地址表项[Quidway]mac-address { static | dynamic | blackhole } mac-address interface interfac e-type interface-number vlan vlan-id ;添加MAC地址表项在添加MAC地址表项时,命令中interface参数指定的端口必须属于vlan参数指定的VLAN,否则将添加失败。
如果vlan参数指定的VLAN是动态VLAN,在添加静态MAC地址之后,会自动变为静态VLAN。
②在以太网端口视图下添加MAC地址表项[Quidway-Ethernet1/0/2]mac-address { static | dynamic | blackhole } mac-address vla n vlan-id在添加MAC地址表项时,当前的端口必须属于命令中vlan参数指定的VLAN,否则将添加失败;如果vlan参数指定的VLAN是动态VLAN,在添加静态MAC地址之后,会自动变为静态VLAN。
[Quidway]mac-address timer { aging age | no-aging } 设置MAC地址表项的老化时间注意:缺省情况下,MAC地址表项的老化时间为300秒,使用参数no-aging时表示不对MAC地址表项进行老化。
③MAC地址老化时间的配置对所有端口都生效,但地址老化功能只对动态的(学习到的或者用户配置可老化的)MAC地址表项起作用。
[Quidway-Ethernet1/0/2]mac-address max-mac-count count 设置端口最多可以学习到的MAC地址数量;注意:缺省情况下,没有配置对端口学习MAC地址数量的限制。
反之,如果端口启动了MAC地址认证和端口安全功能,则不能配置该端口的最大MAC地址学习个数。
[Quidway-Ethernet1/0/2]port-mac start-mac-address 配置以太网端口MAC地址的起始值在缺省情况下,E126/E126A交换机的以太网端口是没有配置MAC地址的,因此当交换机在发送二层协议报文(例如STP)时,由于无法取用发送端口的MAC 地址,将使用该协议预置的MAC地址作为源地址填充到报文中进行发送。