2022年2022年华为设备命令

上传人:re****.1 文档编号:567384659 上传时间:2024-07-20 格式:PDF 页数:9 大小:73.04KB
返回 下载 相关 举报
2022年2022年华为设备命令_第1页
第1页 / 共9页
2022年2022年华为设备命令_第2页
第2页 / 共9页
2022年2022年华为设备命令_第3页
第3页 / 共9页
2022年2022年华为设备命令_第4页
第4页 / 共9页
2022年2022年华为设备命令_第5页
第5页 / 共9页
点击查看更多>>
资源描述

《2022年2022年华为设备命令》由会员分享,可在线阅读,更多相关《2022年2022年华为设备命令(9页珍藏版)》请在金锄头文库上搜索。

1、交换机命令 Quidwaydis cur ;显示当前配置Quidwaydisplay current-configuration ;显示当前配置Quidwaydisplay interfaces ;显示接口信息Quidwaydisplay vlan all ;显示路由信息Quidwaydisplay version ;显示版本信息Quidwaysuper password ; 修改特权用户密码Quidwaysysname ;交换机命名Quidwayinterface ethernet 0/1 ;进入接口视图Quidwayinterface vlan x ;进入接口视图Quidway-Vlan-

2、interfacexip address 10.65.1.1 255.255.0.0 ;配置 VLAN的 IP 地址Quidwayip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由网关Quidwayrip ;三层交换支持Quidwaylocal-user ftp Quidwayuser-interface vty 0 4 ;进入虚拟终端S3026-ui-vty0-4authentication-mode password ;设置口令模式S3026-ui-vty0-4set authentication-mode password simple 222

3、 ;设置口令S3026-ui-vty0-4user privilege level 3 ;用户级别Quidwayinterface ethernet 0/1 ;进入端口模式Quidwayint e0/1 ;进入端口模式Quidway-Ethernet0/1duplex half|full|auto ;配置端口工作状态Quidway-Ethernet0/1speed 10|100|auto ;配置端口工作速率Quidway-Ethernet0/1flow-control ;配置端口流控Quidway-Ethernet0/1mdi across|auto|normal ;配置端口平接扭接Quidw

4、ay-Ethernet0/1port link-type trunk|access|hybrid ;设置端口工作模式Quidway-Ethernet0/1port access vlan 3 ; 当前端口加入到VLAN Quidway-Ethernet0/2port trunk permit vlan ID|All ;设 trunk 允许的 VLAN Quidway-Ethernet0/3port trunk pvid vlan 3 ;设置 trunk 端口的 PVID Quidway-Ethernet0/1undo shutdown ;激活端口Quidway-Ethernet0/1shutd

5、own ;关闭端口Quidway-Ethernet0/1quit ;返回Quidwayvlan 3 ;创建 VLAN Quidway-vlan3port ethernet 0/1 ;在 VLAN 中增加端口Quidway-vlan3port e0/1 ;简写方式Quidway-vlan3port ethernet 0/1 to ethernet 0/4 ;在 VLAN中增加端口Quidway-vlan3port e0/1 to e0/4 ;简写方式名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - -

6、- - 第 1 页,共 9 页 - - - - - - - - - Quidwaymonitor-port ;指定镜像端口Quidwayport mirror ;指定被镜像端口Quidwayport mirror int_list observing-port int_type int_num ;指定镜像和被镜像Quidwaydescription string ;指定 VLAN 描述字符Quidwaydescription ;删除 VLAN 描述字符Quidwaydisplay vlan vlan_id ;查看 VLAN 设置Quidwaystp enable|disable ;设置生成树,

7、默认关闭Quidwaystp priority 4096 ;设置交换机的优先级Quidwaystp root primary|secondary ;设置为根或根的备份Quidway-Ethernet0/1stp cost 200 ;设置交换机端口的花费Quidwaylink-aggregation e0/1 to e0/4 ingress|both ;端口的聚合Quidwayundo link-aggregation e0/1|all ; 始端口为通道号SwitchA-vlanxisolate-user-vlan enable ;设置主 vlan SwitchAisolate-user-vla

8、n secondary ;设置主vlan 包括的子 vlan Quidway-Ethernet0/2port hybrid pvid vlan ;设置 vlan 的 pvid Quidway-Ethernet0/2port hybrid pvid ;删除 vlan 的 pvid Quidway-Ethernet0/2port hybrid vlan vlan_id_list untagged ;设置无标识的vlan 如果包的vlan id 与 PVId 一致,则去掉vlan 信息 . 默认 PVID=1 。所以设置 PVID 为所属 vlan id, 设置可以互通的vlan 为 untagge

9、d. 路由器命令 Quidwaydisplay version ;显示版本信息Quidwaydisplay current-configuration ;显示当前配置Quidwaydisplay interfaces ;显示接口信息Quidwaydisplay ip route ;显示路由信息Quidwaysysname aabbcc ;更改主机名Quidwaysuper passwrod 123456 ;设置口令Quidwayinterface serial0 ;进入接口Quidway-serial0ip address ;配置端口IP 地址Quidway-serial0undo shutd

10、own ;激活端口Quidwaylink-protocol hdlc ;绑定 hdlc 协议Quidwayuser-interface vty 0 4 Quidway-ui-vty0-4authentication-mode password Quidway-ui-vty0-4set authentication-mode password simple 222 Quidway-ui-vty0-4user privilege level 3 Quidway-ui-vty0-4quit 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - -

11、- 名师精心整理 - - - - - - - 第 2 页,共 9 页 - - - - - - - - - Quidwaydebugging hdlc all serial0 ;显示所有信息Quidwaydebugging hdlc event serial0 ;调试事件信息Quidwaydebugging hdlc packet serial0 ;显示包的信息静态路由:Quidwayip route-static interface number|nexthopvaluereject|blackhole 例如:Quidwayip route-static 129.1.0.0 16 10.0.0

12、.2 Quidwayip route-static 129.1.0.0 255.255.0.0 10.0.0.2 Quidwayip route-static 129.1.0.0 16 Serial 2 Quidwayip route-static 0.0.0.0 0.0.0.0 10.0.0.2 动态路由:Quidwayrip ;设置动态路由Quidwayrip work ;设置工作允许Quidwayrip input ;设置入口允许Quidwayrip output ;设置出口允许Quidway-ripnetwork 1.0.0.0 ;设置交换路由网络Quidway-ripnetwork

13、all ;设置与所有网络交换Quidway-rippeer ip-address ;Quidway-ripsummary ;路由聚合Quidwayrip version 1 ;设置工作在版本1 Quidwayrip version 2 multicast ;设版本2,多播方式Quidway-Ethernet0rip split-horizon ;水平分隔Quidwayrouter id A.B.C.D ;配置路由器的ID Quidwayospf enable ;启动 OSPF 协议Quidway-ospfimport-route direct ;引入直联路由Quidway-Serial0osp

14、f enable area ;配置 OSPF 区域标准访问列表命令格式如下:acl match-order config|auto ;默认前者顺序匹配。rule normal|specialpermit|deny source source-addr source-wildcard|any 例:Quidwayacl 10 Quidway-acl-10rule normal permit source 10.0.0.0 0.0.0.255 Quidway-acl-10rule normal deny source any 扩展访问控制列表配置命令配置 TCP/UDP 协议的扩展访问列表:rule

15、 normal|specialpermit|denytcp|udpsource |anydestination |any operate 配置 ICMP 协议的扩展访问列表:名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 9 页 - - - - - - - - - rule normal|specialpermit|denyicmp source |anydestination |any icmp-code logging 扩展访问控制列表操作符的含义equal port

16、number ;等于greater-than portnumber ;大于less-than portnumber ;小于not-equal portnumber ;不等range portnumber1 portnumber2 ;区间扩展访问控制列表举例Quidwayacl 101 Quidway-acl-101rule deny souce any destination any Quidway-acl-101rule permit icmp source any destination any icmp-type echo Quidway-acl-101rule permit icmp

17、source any destination any icmp-type echo-reply Quidwayacl 102 Quidway-acl-102rule permit ip source 10.0.0.1 0.0.0.0 destination 202.0.0.1 0.0.0.0 Quidway-acl-102rule deny ip source any destination any Quidwayacl 103 Quidway-acl-103rule permit tcp source any destination 10.0.0.1 0.0.0.0 destination-

18、port equal ftp Quidway-acl-103rule permit tcp source any destination 10.0.0.2 0.0.0.0 destination-port equal www Quidwayfirewall enable Quidwayfirewall default permit|deny Quidwayint e0 Quidway-Ethernet0firewall packet-filter 101 inbound|outbound 地址转换配置举例Quidwayfirewall enable Quidwayfirewall defaul

19、t permit Quidwayacl 101 ;内部指定主机可以进入e0 Quidway-acl-101rule deny ip source any destination any Quidway-acl-101rule permit ip source 129.38.1.1 0 destination any Quidway-acl-101rule permit ip source 129.38.1.2 0 destination any Quidway-acl-101rule permit ip source 129.38.1.3 0 destination any Quidway-a

20、cl-101rule permit ip source 129.38.1.4 0 destination any Quidway-acl-101quit Quidwayint e0 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 9 页 - - - - - - - - - Quidway-Ethernet0firewall packet-filter 101 inbound Quidwayacl 102 ;外部特定主机和大于1024 端口的数据包允许进入S0 Quidwa

21、y-acl-102rule deny ip source any destination any Quidway-acl-102rule permit tcp source 202.39.2.3 0 destination 202.38.160.1 0 Quidway-acl-102rule permit tcp source any destination 202.38.160.1 0 destination-port great-than 1024 Quidway-acl-102quit Quidwayint s0 Quidway-Serial0firewall packet-filter

22、 102 inbound ;设 202.38.160.1 是路由器出口IP。Quidway-Serial0nat outbound 101 interface ;是 Easy ip, 将 acl 101 允许的 IP 从本接口出时变换源地址。内部服务器地址转换配置命令(静态 nat):nat server global port inside port protocol ;global_port不写时使用inside_port Quidway-Serial0nat server global 202.38.160.1 inside 129.38.1.1 ftp tcp Quidway-Seri

23、al0nat server global 202.38.160.1 inside 129.38.1.2 telnet tcp Quidway-Serial0nat server global 202.38.160.1 inside 129.38.1.3 www tcp 设有公网IP:202.38.160.101202.38.160.103 可以使用。;对外访问 (原例题 ) Quidwaynat address-group 202.38.160.101 202.38.160.103 pool1 ;建立地址池Quidwayacl 1 Quidway-acl-1rule permit source

24、 10.110.10.0 0.0.0.255 ;指定允许的内部网络Quidway-acl-1rule deny source any Quidway-acl-1int serial 0 Quidway-Serial0nat outbound 1 address-group pool1 ;在 s0口从地址池取出IP对外访问Quidway-Serial0nat server global 202.38.160.101 inside 10.110.10.1 ftp tcp Quidway-Serial0nat server global 202.38.160.102 inside 10.110.10

25、.2 www tcp Quidway-Serial0nat server global 202.38.160.102 8080 inside 10.110.10.3 www tcp Quidway-Serial0nat server global 202.38.160.103 inside 10.110.10.4 smtp udp PPP设置:Quidway-s0link-protocol ppp ;默认的协议PPP验证:主验方: pap|chap Quidwaylocal-user q2 password simple|cipher hello ;路由器 1 名师资料总结 - - -精品资料

26、欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 9 页 - - - - - - - - - Quidwayinterface serial 0 Quidway-serial0ppp authentication-mode pap|chap Quidway-serial0ppp chap user q1 ;pap 时,没有此句pap被验方:Quidwayinterface serial 0 ;路由器 2 Quidway-serial0ppp pap local-user q2 password simpl

27、e|cipher hello chap 被验方:Quidwayinterface serial 0 ;路由器 2 Quidway-serial0ppp chap user q2 ;自己路由器名Quidway-serial0local-user q1 password simple|cipher hello ;对方路由器名帧中继 frame-relay (二分册 6-61) q1fr switching q1int s1 q1-Serial1ip address 192.168.34.51 255.255.255.0 q1-Serial1link-protocol fr ;封装帧中继协议q1-S

28、erial1fr interface-type dce q1-Serial1fr dlci 100 q1-Serial1fr inarp q1-Serial1fr map ip 192.168.34.52 dlci 100 q2int s1 q2-Serial1ip address 192.168.34.52 255.255.255.0 q2-Serial1link-protocol fr q2-Serial1fr interface-type dte q2-Serial1fr dlci 100 q2-Serial1fr inarp q2-Serial1fr map ip 192.168.34

29、.51 dlci 100 帧中继监测q1display fr lmi-infointerface type number q1display fr map q1display fr pvc-infoserial interface-numberdlci dlci-number q1display fr dlci-switch q1display fr interface q1reset fr inarp-info q1debugging fr allinterface type number q1debugging fr arpinterface type number q1debugging

30、 fr eventinterface type number q1debugging fr lmiinterface type number 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 9 页 - - - - - - - - - 启动 ftp 服务:Quidwaylocal-user ftp password simple|cipher aaa service-type ftp Quidwayftp server enable 十条华为交换机命令最基本的用法,下面例举

31、了十条最基本的命令,比如:华为交换机命令在基于IOS的交换机上设置登录口令,华为交换机命令在基于IOS 的交换机上设置主机名/系统名等。华为交换机命令在基于IOS 的交换机上设置主机名/ 系统名 : switch(config)# hostname hostname 在基于 CLI 的交换机上设置主机名/ 系统名 : switch(enable) set system name name-string 华为交换机命令在基于IOS 的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于 CLI 的交换机上设置登录口令:

32、switch(enable) set password switch(enable) set enalbepass 华为交换机命令在基于IOS 的交换机上设置远程访问: switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于 CLI 的交换机上设置远程访问: switch(enable) set interface sc0 ip-address netmask broadcast-a

33、ddress switch(enable) set interface sc0 vlan switch(enable) set ip route default gateway 华为交换机命令在基于IOS 的交换机上启用和浏览CDP信息 : switch(config-if)# cdp enable 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 9 页 - - - - - - - - - switch(config-if)# no cdp enable 为了查看 Cis

34、co 邻接设备的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 neighborsmodule/port vlan|duplex|capabilities|detail 华为交换机命令基于

35、IOS 的交换机的端口描述: switch(config-if)# description description-string 基于 CLI 的交换机的端口描述: switch(enable)set port name module/number description-string 在基于 IOS 的交换机上设置端口速度: switch(config-if)# speed10|100|auto 在基于 CLI 的交换机上设置端口速度: switch(enable) set port speed moudle/number 10|100|auto switch(enable) set por

36、t speed moudle/number 4|16|auto 在基于 IOS 的交换机上设置以太网的链路模式: switch(config-if)# duplex auto|full|half 在基于 CLI 的交换机上设置以太网的链路模式: switch(enable) set port duplex module/number full|half 华为交换机命令在基于IOS 的交换机上配置静态VLAN: switch# vlan database switch(vlan)# vlan vlan-num name vla 名师资料总结 - - -精品资料欢迎下载 - - - - - - -

37、 - - - - - - - - - - - 名师精心整理 - - - - - - - 第 8 页,共 9 页 - - - - - - - - - switch(vlan)# exit switch# configure teriminal switch(config)# interface interface module/number switch(config-if)# switchport mode access switch(config-if)# switchport access vlan vlan-num switch(config-if)# end 在基于 CLI 的交换机上

38、配置静态VLAN: switch(enable) set vlan vlan-num name name switch(enable) set vlan vlan-num mod-num/port-list 在基于 IOS 的交换机上配置VLAN中继线 : switch(config)# interface interface mod/port switch(config-if)# switchport mode trunk switch(config-if)# switchport trunk encapsulation isl|dotlq switch(config-if)# switch

39、port trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list 在基于 CLI 的交换机上配置VLAN中继线 : switch(enable) set trunk module/port on|off|desirable|auto|nonegotiate Vlan-range isl|dotlq|dotl0|lane|negotiate 华为交换机命令在基于IOS 的交换机上配置VTP管理域 : switch# vlan database switch(vlan)# vtp domain domain-name 在基于 CLI 的交换机上配置VTP管理域 : switch(enable) set vtp domain domain-name 责任编辑 :王巧玲 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 9 页,共 9 页 - - - - - - - - -

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号