2022年2022年华为配置命令表

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

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

1、配置命令表计算机命令 PCA login: root ;使用 root用户password: linux ;口令是linux # shutdown -h now ;关机# init 0 ;关机# logout ;用户注销# login ;用户登录# ifconfig ;显示 IP 地址# ifconfig eth0 netmask ;设置 IP 地址# ifconfig eht0 netmask down ;禁用 IP 地址# route add 0.0.0.0 gw ;设置网关# route del 0.0.0.0 gw ;删除网关# route add default gw ;设置网关#

2、route del default gw ;删除网关# route ;显示网关# ping ;发 ECHO 包# telnet ;远程登录名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 15 页 - - - - - - - - - 交换机命令 Quidwaydis cur ;显示当前配置Quidwaydisplay current-configuration ;显示当前配置Quidwaydisplay interfaces ;显示接口信息Quidwaydisplay vl

3、an all ;显示路由信息Quidwaydisplay version ;显示版本信息Quidwaysuper password ; 修改特权用户密码Quidwaysysname ;交换机命名Quidwayinterface ethernet 0/1 ;进入接口视图Quidwayinterface vlan x ;进入接口视图Quidway-Vlan-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 ;静态路由网关Quidway

4、rip ;三层交换支持Quidwaylocal-user ftp 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 15 页 - - - - - - - - - Quidwayuser-interface vty 0 4 ;进入虚拟终端S3026-ui-vty0-4authentication-mode password ;设置口令模式S3026-ui-vty0-4set authentication-mode password simple 222 ;设置口令S3026-

5、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 ;配置端口平接扭接Quidway-Ethernet0

6、/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/1shutdown ;关闭端口名师资料总结 - -

7、 -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 15 页 - - - - - - - - - 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 e

8、0/1 to e0/4 ;简写方式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 ; 设置生成树 ,默认关闭名师资料总结 - -

9、 -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 15 页 - - - - - - - - - Quidwaystp priority 4096 ;设置交换机的优先级Quidwaystp root primary|secondary ;设置为根或根的备份Quidway-Ethernet0/1stp cost 200 ;设置交换机端口的花费Quidwaylink-aggregation e0/1 to e0/4 ingress|both ; 端口的聚合Quidwayundo link-aggre

10、gation e0/1|all ; 始端口为通道号SwitchA-vlanxisolate-user-vlan enable ;设置主vlan SwitchAisolate-user-vlan 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 ;设置无

11、标识的vlan 如果包的vlan id与 PVId 一致,则去掉vlan 信息 . 默认 PVID=1 。所以设置 PVID 为所属 vlan id, 设置可以互通的vlan 为 untagged. 路由器命令名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 15 页 - - - - - - - - - Quidwaydisplay version ;显示版本信息Quidwaydisplay current-configuration ;显示当前配置Quidwaydispl

12、ay interfaces ;显示接口信息Quidwaydisplay ip route ;显示路由信息Quidwaysysname aabbcc ;更改主机名Quidwaysuper passwrod 123456 ;设置口令Quidwayinterface serial0 ;进入接口Quidway-serial0ip address ;配置端口IP 地址Quidway-serial0undo shutdown ;激活端口Quidwaylink-protocol hdlc ;绑定 hdlc 协议Quidwayuser-interface vty 0 4 Quidway-ui-vty0-4au

13、thentication-mode password Quidway-ui-vty0-4set authentication-mode password simple 222 Quidway-ui-vty0-4user privilege level 3 Quidway-ui-vty0-4quit Quidwaydebugging hdlc all serial0 ;显示所有信息Quidwaydebugging hdlc event serial0 ;调试事件信息Quidwaydebugging hdlc packet serial0 ;显示包的信息名师资料总结 - - -精品资料欢迎下载 -

14、 - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 15 页 - - - - - - - - - 静态路由:Quidwayip route-static interface number|nexthopvaluereject|blackhole 例如:Quidwayip route-static 129.1.0.0 16 10.0.0.2 Quidwayip route-static 129.1.0.0 255.255.0.0 10.0.0.2 Quidwayip route-static 129.1.0.0 16 S

15、erial 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 all ;设置与所有网络交换Quidway-rippeer ip-address ;Quidway-ripsummary ;路由聚合Quidwayrip version 1 ;设置工作在版

16、本1 Quidwayrip version 2 multicast ;设版本 2,多播方名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 15 页 - - - - - - - - - 式Quidway-Ethernet0rip split-horizon ;水平分隔Quidwayrouter id A.B.C.D ;配置路由器的ID Quidwayospf enable ;启动 OSPF 协议Quidway-ospfimport-route direct ;引入直联路由Qu

17、idway-Serial0ospf 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/UD

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

19、操作符的含义equal portnumber ;等于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-101r

20、ule permit icmp 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 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 9 页,共 15 页 - - - - - - - - - Quidway-acl-102rule deny ip

21、source any destination any Quidwayacl 103 Quidway-acl-103rule permit tcp source any destination 10.0.0.1 0.0.0.0 destination-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 Qui

22、dwayint e0 Quidway-Ethernet0firewall packet-filter 101 inbound|outbound 地址转换配置举例Quidwayfirewall enable Quidwayfirewall default 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-101r

23、ule permit ip source 129.38.1.2 0 destination any 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 10 页,共 15 页 - - - - - - - - - Quidway-acl-101rule permit ip source 129.38.1.3 0 destination any Quidway-acl-101rule permit ip source 129.38.1.4 0 destination any Quidway-

24、acl-101quit Quidwayint e0 Quidway-Ethernet0firewall packet-filter 101 inbound Quidwayacl 102 ;外部特定主机和大于1024 端口的数据包允许进入S0 Quidway-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 dest

25、ination 202.38.160.1 0 destination-port great-than 1024 Quidway-acl-102quit Quidwayint s0 Quidway-Serial0firewall packet-filter 102 inbound ;设 202.38.160.1是路由器出口 IP。Quidway-Serial0nat outbound 101 interface ;是 Easy ip ,将 acl 101允许的 IP 从本接口出时变换源地址。内部服务器地址转换配置命令(静态 nat) :名师资料总结 - - -精品资料欢迎下载 - - - - -

26、 - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 11 页,共 15 页 - - - - - - - - - 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-Serial0nat server global 202.38.160.1 inside 129.38.1.2 telnet tcp

27、 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 10.110.10.0 0.0.0.255 ;指定允许的内部网络Quidway-acl-1rule deny source

28、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.2 www tcp Quidway-Serial0nat server global 202.38.160.102 80

29、80 inside 10.110.10.3 www tcp 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 12 页,共 15 页 - - - - - - - - - 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 p

30、assword simple|cipher hello ;路由器 1 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 simple|cipher hello chap 被验方:Quidwayinterface serial 0 ;路由器 2

31、 Quidway-serial0ppp chap user q2 ;自己路由器名Quidway-serial0local-user q1 password simple|cipher hello ;对方路由器名名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 13 页,共 15 页 - - - - - - - - - 帧中继 frame-relay (二分册 6-61) q1fr switching q1int s1 q1-Serial1ip address 192.168.34.51

32、 255.255.255.0 q1-Serial1link-protocol fr ;封装帧中继协议q1-Serial1fr 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

33、 100 q2-Serial1fr inarp q2-Serial1fr map ip 192.168.34.51 dlci 100 帧中继监测q1display fr lmi-infointerface type number q1display fr map q1display fr pvc-infoserial interface-numberdlci dlci-number 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 14 页,共 15 页 - - - - - - - -

34、 - q1display fr dlci-switch q1display fr interface q1reset fr inarp-info q1debugging fr allinterface type number q1debugging fr arpinterface type number q1debugging fr eventinterface type number q1debugging fr lmiinterface type number 启动 ftp 服务:Quidwaylocal-user ftp password simple|cipher aaa service-type ftp Quidwayftp server enable 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 15 页,共 15 页 - - - - - - - - -

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

最新文档


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

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