华为配置命令表.docx

上传人:小飞机 文档编号:3345506 上传时间:2023-03-12 格式:DOCX 页数:13 大小:40.24KB
返回 下载 相关 举报
华为配置命令表.docx_第1页
第1页 / 共13页
华为配置命令表.docx_第2页
第2页 / 共13页
华为配置命令表.docx_第3页
第3页 / 共13页
华为配置命令表.docx_第4页
第4页 / 共13页
华为配置命令表.docx_第5页
第5页 / 共13页
亲,该文档总共13页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《华为配置命令表.docx》由会员分享,可在线阅读,更多相关《华为配置命令表.docx(13页珍藏版)》请在三一办公上搜索。

1、华为配置命令表配置命令表 计算机命令 PCA login: root password: linux # shutdown -h now # init 0 # logout # login # ifconfig # ifconfig eth0 netmask # ifconfig eht0 netmask down # route add 0.0.0.0 gw # route del 0.0.0.0 gw # route add default gw # route del default gw # route # ping # telnet ;使用root用户 ;口令是linux ;关机 ;

2、用户注销 ;用户登录 IP地址 ;设置IP地址 ;禁用IP地址 ;设置网关 ;设置网关 ;删除网关 ;显示网关 ;发ECHO包 ;远程登录 ;关机 ;显示 ;删除网关 交换机命令 Quidwaydis cur Quidwaydisplay current-configuration Quidwaydisplay interfaces Quidwaydisplay vlan all Quidwaydisplay version Quidwaysuper password 密码 Quidwaysysname Quidwayinterface ethernet 0/1 Quidwayinterfac

3、e vlan x Quidway-Vlan-interfacexip address 10.65.1.1 255.255.0.0 址 Quidwayip route-static 0.0.0.0 0.0.0.0 10.65.1.2 Quidwayrip Quidwaylocal-user ftp ;显示当前配置 ;显示当前配置 ;显示接口信息 ;显示路由信息 ;显示版本信息 ;修改特权用户 ;进入接口视图 ;配置VLAN的IP地 ;三层交换支持 ;交换机命名 ;进入接口视图 ;静态路由网关 Quidwayuser-interface vty 0 4 ;进入虚拟终端 S3026-ui-vty0-

4、4authentication-mode password ;设置口令模式 S3026-ui-vty0-4set authentication-mode password simple 222 ;设置口令 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-contr

5、ol Quidway-Ethernet0/1mdi across|auto|normal 接 Quidway-Ethernet0/1port link-type trunk|access|hybrid Quidway-Ethernet0/1port access vlan 3 VLAN Quidway-Ethernet0/2port trunk permit vlan ID|All VLAN Quidway-Ethernet0/3port trunk pvid vlan 3 PVID Quidway-Ethernet0/1undo shutdown Quidway-Ethernet0/1shu

6、tdown ;进入端口模式 ;进入端口模式 ;配置端口工作状态 ;配置端口平接扭 ;设置端口工作模式 ;当前端口加入到 ;设trunk允许的;设置trunk端口的 ;激活端口 ;关闭端口 ;配置端口工作速率 ;配置端口流控 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

7、-vlan3port e0/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 ;设置生成树,默认关闭

8、 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-v

9、lan 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为untagged. 路由器命令 Quidwayd

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

11、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 Quidwaydebugging hdlc all serial0 ;显示所有信息 Quidwaydebugging hdlc e

12、vent serial0 ;调试事件信息 Quidwaydebugging hdlc packet serial0 ;显示包的信息 静态路由: Quidwayip route-static 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 Serial 2 Quidwayip route-stati

13、c 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 Quidwayrip version 2 multicast interface ;设置动态路由 ;设置工作允许 ;设置入口允许 ;设置出口允许 ;设置交换路由网络 ;设置

14、与所有网络交 ; ;路由聚合 ;设置工作在版本1 ;设版本2,多播方 式 Quidway-Ethernet0rip split-horizon ;水平分隔 Quidwayrouter id A.B.C.D ;配置路由器的ID Quidwayospf enable ;启动OSPF协议 Quidway-ospfimport-route direct ;引入直联路由 Quidway-Serial0ospf enable area ;配置OSPF区域 标准访问列表命令格式如下: acl match-order config|auto ;默认前者顺序匹配。 rule normal|specialperm

15、it|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 normal|specialpermit|denytcp|udpsource |anydestination |any operate 配置ICMP协议的扩展访问列表: rule normal|

16、specialpermit|denyicmp source |anydestination |any icmp-code logging 扩展访问控制列表操作符的含义 equal portnumber ;等于 greater-than portnumber ;大于 less-than portnumber ;小于 not-equal portnumber ;不等 range portnumber1 portnumber2 ;区间 扩展访问控制列表举例 Quidwayacl 101 Quidway-acl-101rule deny souce any destination any Quidwa

17、y-acl-101rule permit icmp source any destination any icmp-type echo Quidway-acl-101rule 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 Quidway-acl-102rule deny ip source any destination an

18、y 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 destination-port equal www Quidwayfirewall enable Quidwayfirewall default permit|deny Quidwayint e0 Quidway-Ethernet0firew

19、all 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-101rule permit ip source 129.38.1.2

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

21、2rule 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 102 inb

22、ound ;设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-Serial0nat server

23、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 10.110.10.0 0

24、.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.2 www tcp Qu

25、idway-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 Quidwayinterface serial 0 Qu

26、idway-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 Quidway-serial0ppp chap user q2 ;自己路由器名 Quidway-serial0local-use

27、r 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-Serial1fr interface-type dce q1-Serial1fr dlci 100 q1-Serial1fr inarp q1-Serial1fr map ip 192.168.34.52 dlci 100 q2int s1

28、 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.51 dlci 100 帧中继监测 q1display fr lmi-infointerface type number q1display fr map q1display fr pvc-infoserial interface-num

29、berdlci dlci-number 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

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号