(完整word版)华为交换机常用命令集合

合集下载

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

(完整版)华为交换机常用命令大全
华为交换机常用配置大全
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地质。

华为交换机设备基础命令大全,拿走不谢!

华为交换机设备基础命令大全,拿走不谢!

华为交换机设备基础命令大全,拿走不谢!终将渡过成长的海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 查看设备上所有的访问控制列表。

华为交换机命令大全

华为交换机命令大全
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

华为交换机命令.docx

华为交换机命令.docx

华为交换机命令返回上一级命令:quit 配置保存命令:save 华为交换机命令<>sys 进入配置模式[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 址[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[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} [Quidway-Ethernet0/3]port trunk pvid vlan 3 [Quidway-Ethernet0/1]undo shutdown[Quidway-Ethernet0/1]shutdown [Quidway-Ethernet0/1]quit [Quidway]vlan 3[Quidway-vlan3]port ethernet 0/1 [Quidway-vlan3]port e0/1 [Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 [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;显示当前配置;显示当前配置;显示接口信息;显示路由信息;显示版本信息;修改特权用户密码;交换机命名;进入接口视图;进入接口视图;配置VLAN的IP地;静态路由=网关;三层交换支持;进入虚拟终端;设置口令模式;设置口令;用户级别;进入端口模式;进入端口模式;配置端口工作状态;配置端口工作速率;配置端口流控;配置端口平接扭接;设置端口工作模式;当前端口加入到VLAN ;设trunk 允许的VLAN ;设置trunk端口的PVID ;激活端口;关闭端口;返回;创建VLAN;在VLAN中增加端口;简写方式;在VLAN中增加端口;简写方式 ;指定镜像端口 ;指定被镜像端口;指定镜像和被镜像[Quidway]description string[Quidway]description[Quidway]display vlan [vlan_id][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 [SwitchA]isolate-user-vlan <x> secondary <list> 子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan <id> [Quidway-Ethernet0/2]port hybrid pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged如果包的vlan id 与PVId 一致,则去掉vlan 信息. 默认PVID=1。

华为路由器交换机命令大全

华为路由器交换机命令大全

华为路由器交换机配置命令大合集华为路由器交换机配置命令:计算机命令PCAlogin:root;使用root用户password:linux;口令是linux#shutdown-hnow;关机#init0;关机#logout;用户注销#login;用户登录#ifconfig;显示IP地址#ifconfigeth0netmask;设置IP地址#ifconfigeht0netmaskdown;禁用IP地址#routeadd0.0.0.0gw;设置网关#routedel0.0.0.0gw;删除网关#routeadddefaultgw;设置网关#routedeldefaultgw;删除网关#route;显示网关#ping;发ECHO包#telnet;远程登录华为路由器交换机配置命令:交换机命令[Quidway]discur;显示当前配置[Quidway]displaycurrent-configuration;显示当前配置[Quidway]displayinterfaces;显示接口信息[Quidway]displayvlanall;显示路由信息[Quidway]displayversion;显示版本信息[Quidway]superpassword;修改特权用户密码[Quidway]sysname;交换机命名[Quidway]interfaceethernet0/1;进入接口视图[Quidway]interfacevlanx;进入接口视图[Quidway-Vlan-interfacex]ipaddress10.65.1.1255.255.0.0;配置VLAN的IP地址[Quidway]iproute-static0.0.0.00.0.0.010.65.1.2;静态路由=网关[Quidway]rip;三层交换支持[Quidway]local-userftp[Quidway]user-interfacevty04;进入虚拟终端[S3026-ui-vty0-4]authentication-modepassword;设置口令模式[S3026-ui-vty0-4]setauthentication-modepasswordsimple222;设置口令[S3026-ui-vty0-4]userprivilegelevel3;用户级别[Quidway]interfaceethernet0/1;进入端口模式[Quidway]inte0/1;进入端口模式[Quidway-Ethernet0/1]duplex;配置端口工作状态[Quidway-Ethernet0/1]speed;配置端口工作速率[Quidway-Ethernet0/1]flow-control;配置端口流控[Quidway-Ethernet0/1]mdi;配置端口平接扭接[Quidway-Ethernet0/1]portlink-type;设置端口工作模式[Quidway-Ethernet0/1]portaccessvlan3;当前端口加入到VLAN[Quidway-Ethernet0/2]porttrunkpermitvlan;设trunk允许的VLAN[Quidway-Ethernet0/3]porttrunkpvidvlan3;设置trunk端口的PVID[Quidway-Ethernet0/1]undoshutdown;激活端口[Quidway-Ethernet0/1]shutdown;关闭端口[Quidway-Ethernet0/1]quit;返回[Quidway]vlan3;创建VLAN[Quidway-vlan3]portethernet0/1;在VLAN中增加端口[Quidway-vlan3]porte0/1;简写方式[Quidway-vlan3]portethernet0/1toethernet0/4;在VLAN中增加端口[Quidway-vlan3]porte0/1toe0/4;简写方式[Quidway]monitor-port;指定镜像端口[Quidway]portmirror;指定被镜像端口[Quidway]portmirrorint_listobserving-portint_typeint_num;指定镜像和被镜像[Quidway]descriptionstring;指定VLAN描述字符[Quidway]description;删除VLAN描述字符[Quidway]displayvlan[vlan_id];查看VLAN设置[Quidway]stp;设置生成树,默认关闭[Quidway]stppriority4096;设置交换机的优先级[Quidway]stproot;设置为根或根的备份[Quidway-Ethernet0/1]stpcost200;设置交换机端口的花费[Quidway]link-aggregatione0/1toe0/4ingress|both;端口的聚合[Quidway]undolink-aggregatione0/1|all;始端口为通道号[SwitchA-vlanx]isolate-user-vlanenable;设置主vlan[SwitchA]isolate-user-vlansecondary;设置主vlan包括的子vlan[Quidway-Ethernet0/2]porthybridpvidvlan;设置vlan的pvid[Quidway-Ethernet0/2]porthybridpvid;删除vlan的pvid[Quidway-Ethernet0/2]porthybridvlanvlan_id_listuntagged;设置无标识的vlan 如果包的vlanid与PVId一致,则去掉vlan信息.默认PVID=1。

华为交换机命令大全

华为交换机命令大全

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

华为交换机常用命令

华为交换机常用命令
route-static 192.168.2.0 255.255.255.0 xx.xx.xx.xx “指定目标网络的下一跳地址”
注意“ route-static 192.168.2.0 255.255.255.0 g0/0/0 MA型不可指定去目标网络出口”
[Huawei]int LoopBack 0 “创建回环口测试使用可充当pc”
[Huawei-ui-vty0-4]authentication-mode password cipher huawei 或"set au pa ci huawei"
“dis this”可查看目前配置情况
[Huawei-ui-vty0-4]user privilege level 3
telnet 配置:
<Huawei>sys
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 12.1.1.1 255.255.255.0
[Huawei-GigabitEthernet0/0/0]qu
[Huawei]user-interface vty 0 4
常用命令:
[Huawei]return “返回用户视图”
[Huawei]sysname “命名”
[Huawei]save “保存当前配置”
[Huawei]reset saved-configuration “擦除存储设备中路由器配置文件”
[Huawei]compare configuration “比较配置文件”
[AR3-rip-1]vers
[AR3-rip-1]version 2
display rip 查看rip信息

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

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

华为路由器交换机常用命令华为路由器交换机常用命令文档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、设备登陆配置我中心维护汇聚和热点交换机,交换机类型为5300、2300和GPON,交换机使用secure CRT软件登录。

交换机使用之前需要刷机,使用secureCRT配置:协议是serial,端口com12,波特流9600,流控制不配置。

刷交换机所需要的信息:在3a模式下用户名和密码;snmp 为网络管理协议,配置网管所需的指令,固定不变; telnet配置——远程登陆配置信息。

登陆汇聚和热点交换机首先93-5交换机(核心交换机),登录协议选择ssh登录,登陆其它交换机在93-5上使用telnet(远程登陆)命令跳转,只能单向。

核心交换机登陆用户名:hanxu69309,密码:Hx#9309。

华为汇聚和热点交换机的登陆用户名和密码都为huaweitest。

其他核心交换机的登录地址:(交换机型号为9312)(交换机型号为6500)(交换机型号为6500)(交换机型号为8500)(交换机型号为8500)(交换机型号为9306)2、交换机配置思路:➢配置设备名称。

➢管理AP所需要配置的信息➢管理交换机配置的信息➢在3a模式下配置,配置以下用户名和密码。

(配置固定)➢snmp为网络管理协议,下面为加入网管所配置的指令,固定不变。

➢telnet配置——远程登陆配置信息3、数据准备:➢管理VLAN的ID。

➢交换机的管理IP。

➢交换机连接其他交换机的接口号。

➢验证方式、用户名和密码。

二、5300交换机开站指令1、交换机简介5300系列交换机,包括5328和5324等,不能给AP供电。

下面介绍的指令为5328,是5300系列的一种,共有28个端口。

532853242、开站指令➢配置设备名称。

System //进入配置模式sysname SDJN-WLAN-SW-ZRSJGC-1-S5328 //给交换机命名vlan 1 2001 2101 2126 to 2127 2218 2501 //创建vlanbpdu-tunnel reserved03 group-mac 0100-5e99-9999 //交换机支持sim认证使用,网维提供的。

华为交换机命令大全(可编辑修改word版)

华为交换机命令大全(可编辑修改word版)

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

华为路由交换机命令大全

华为路由交换机命令大全

华为路由交换机命令大全华为路由交换命令大全华为一般模式(用户户级)命令:(每条命令都可以+?查看其配置参数)>?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(虚拟专用网):利用协议做一条专线让两个局域网通过互连网相连。

华为交换机常用命令

华为交换机常用命令

华为交换机常用命令关于华为交换机常用命令关于华为交换机常用命令[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&nbsp;用户级别[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;指定镜像端口[Quidway]port mirror;指定被镜像端口[Quidway]port mirror int_list observing-portint_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-vlansecondary;设置主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如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。

华为交换机常用命令

华为交换机常用命令
[Quidway-vlan2] port ethernet0/1 ethernet0/2
创建VLAN3并进入其视图。
[Quidway-vlan2] vlan 3
向VLAN3中加入端口Ethernet0/3和Ethernet0/4。
[Quidway-vlan3] port ethernet0/3 ethernet0/4
16.擦除交换机命令:reset saved-configuration
17.重启命令:reboot
9.开打/关闭以太网端口
在以太网端口视图下:
关闭:shutdown
打开:undo shutdown
10.端口描述:description text
删除端口描述:undo description text
11.设置端口双工状态:
duplex {auto / full / half }
恢复缺省值:undo duplex
d. Hybrid端口和Trunk端口的不同之处在于Hybrid端口可以允许多个VLAN的报文发送时不打标签,而Trunk端口只允许缺省VLAN报文发送时不打标签。
设置端口为Access端口:port link-type access
设置端口为Hybrid端口:port link-type Hybrid
8. 为指定的VLAN增加以太网端口: port interface_list
删除指定的VLAN的某些以太网端口: undo port interface_list
创建VLAN2并进入其视图。
[Quidway] vlan 2
向VLAN2中加入端口Ethernet0/1和Ethernet0/2。
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

System-view 进去系统视图模式,可以简写为sysSysname xxx 给设备命名为xxxQuit 退出当前模式一..配置文件相关命令:[]------->视图模式下1.Display current-configuration 显示当前生效的配置,可以简写为dis cursysname jcg 设备名字jcg#vlan batch 10 20 批量创建vlan(虚拟局域网),这里是创建vlan10和vlan20,如果是10 to 20 或者10-20就是创建vlan10,vlan11......vlan20#stp disable STP(Spanning Tree Protocol)是生成树协议的英文缩写。

该协议可应用于在网络中建立树形拓扑,消除网络中的环路,并且可以通过一定的方法实现路径冗余,但不是一定可以实现路径冗余#multicast routing-enable 启用组播(在发送者和每一接收者之间实现点对多点网络连接)#cluster enable 主要是用来开启HGMP协议的。

1.HGMP就是Huawei Group Management Protocol的缩写,即华为组管理协议,它是华为的私有协议,对该协议有解释权和修改权。

2.一种实现管理进程对代理进程下的进行集中管理和二层多播组控制的通信协议。

其主要结构是:一个管理进程,同时管理其下的许多代理进程。

在管理进程和代理进程上同时都运行HGMP协议。

HGMP协议不支持存在环路的网络。

ntdp enable NTDP是用来收集网络拓扑信息的协议。

NTDP 为集群管理提供可加入集群的设备信息,收集指定跳数内的交换机的拓扑信息。

ndp enable NDP(neighbor discovery protocol)是用来发现邻接点相关信息的协议。

ndp运行在数据链路层,因此可以支持不同的网络层协议。

#drop illegal-mac alarm 投下非法mac的警报#diffserv domain default 命令用来创建一个DiffServ域并进入对应的DS域视图,或进入已存在的DS域视图(这里是创建系统预先设定的缺省DiffServ域)diffserv domain { default | ds-domain-name }undo diffserv domain ds-domain-name(指定DiffServ域的名称)#drop-profile default#aaa 一般是用来给网络设备认证用的,可以提供设备的安全性authentication-scheme default 验证authorization-scheme default 授权accounting-scheme default 记账domain default // 普通用户的默认域domain default_admin // 管理人员的默认域local-user admin password simple admin 本地用户admin密码adminlocal-user admin service-type http 本地用户admin服务类型http#interface Vlanif1 进入VLAN1的逻辑接口#interface Vlanif10 进入VLAN10的逻辑接口ip address 1.1.1.1 255.255.255.0pim sm 协议无关组播#interface Vlanif20ip address 2.2.2.1 255.255.255.0pim smigmp enable Internet 组管理协议#interface MEth0/0/1 表示这个端口是设备主控板上面的管理网口,是个百兆的端口#interface GigabitEthernet0/0/1 千兆接口port hybrid pvid vlan 10 端口的虚拟局域网ID:10,模式为hybrid模式port hybrid untagged vlan 10 untaged及taged是交换机将包发出去时是否加上vlan号作为标识access模式的端口只属于某一个vlan,用于连接电脑trunk模式的端口可以传输多个vlan的信息,用着交换机连交换机,或交换机连路由器hybrid模式的端口既可以连电脑,也可以连交换机和路由器(是access模式和trunk模式的集合)#interface GigabitEthernet0/0/2port hybrid pvid vlan 20port hybrid untagged vlan 20#interface GigabitEthernet0/0/3port hybrid pvid vlan 20port hybrid untagged vlan 20#interface GigabitEthernet0/0/4port hybrid pvid vlan 20port hybrid untagged vlan 20#interface GigabitEthernet0/0/5port hybrid pvid vlan 20port hybrid untagged vlan 20#interface GigabitEthernet0/0/6 port hybrid pvid vlan 20port hybrid untagged vlan 20 #interface GigabitEthernet0/0/7 #interface GigabitEthernet0/0/8 #interface GigabitEthernet0/0/9 #interface GigabitEthernet0/0/10 #interface GigabitEthernet0/0/11 #interface GigabitEthernet0/0/12 #interface GigabitEthernet0/0/13 #interface GigabitEthernet0/0/14 #interface GigabitEthernet0/0/15 #interface GigabitEthernet0/0/16 #interface GigabitEthernet0/0/17 #interface GigabitEthernet0/0/18 #interface GigabitEthernet0/0/19 #interface GigabitEthernet0/0/20 #interface GigabitEthernet0/0/21 #interface GigabitEthernet0/0/22 #interface GigabitEthernet0/0/23 #interface GigabitEthernet0/0/24 #interface NULL0#igmptimer query 300 定时查询时间为300#pimc-rp Vlanif10#user-interface con 0 用户接口con 0user-interface vty 0 4 vty 0 4代表有5条VTY线路由0到4(vty:虚拟终端,一种网络设备的连接方式)#return2.display saved-configuration 显示当前flash配置文件,即下次上电启动时所用的配置文件3.reset saved-configuration 擦除旧的配置文件4.reboot 交换机重启5.display version 显示系统版本信息二.基本配置1.[jcg]Super password xxx? 修改特权用户密码2.[jcg]sysname xxx 交换机命名3.[jcg]interface xxx 进去接口视图xx:Eth-Trunk Ethernet-Trunk interfaceGigabitEthernet GigabitEthernet interfaceLoopBack LoopBack interfaceMEth MEth interfaceNULL NULL interfaceTunnel Tunnel interfaceVlanif Vlan interface4.[jcg]interface vlan xx 进入接口视图5.[jcg-vlan-interfacex]ip address 192.168.10.2 255.255.255.0 配置vlan的ip地址6.[jcg]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 静态路由====网关用户视图<> 与交换机建立连接即进入系统视图[] 敲system-view 进入系统视图。

以太网端口视图[Quidway-Ethernet0/1]:在系统视图下键入interface?ethernet?0/1。

display version 显示版本信息display cpu-usage 查看cpu的使用率display memory-usage 查看内存使用率display int g0/0/1 查看具体某一个接口的信息display int brief 查看各接口运行状态display current-configuration 查看当前配置信息display vlan 查看vlan 信息display acl all 查看访问控制列表信息display logbuffer 查询日志信息display?environment 查看温度信息display ndp 显示交换机端口的详细配置信息。

display arp 查看arp表display snmp-agent community 检查SNMP默认通信字符串有否修改display ip routing-table 显示路由信息。

相关文档
最新文档