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

上传人:无*** 文档编号:69895081 上传时间:2022-04-06 格式:DOC 页数:8 大小:71KB
收藏 版权申诉 举报 下载
华为交换机路由器常用命令_第1页
第1页 / 共8页
华为交换机路由器常用命令_第2页
第2页 / 共8页
华为交换机路由器常用命令_第3页
第3页 / 共8页
资源描述:

《华为交换机路由器常用命令》由会员分享,可在线阅读,更多相关《华为交换机路由器常用命令(8页珍藏版)》请在装配图网上搜索。

1、华为交换机路由器常用命令网络技术 /wangzhijun1743 发表于2007-03-24, 12:25 交换机命令Quidwaydis cur ;显示当前配置Quidwaydisplay current-configuration ;显示当前配置Quidwaydisplay interfaces ;显示接口信息Quidwaydisplay vlan all ;显示路由信息Quidwaydisplay version ;显示版本信息Quidwaysuper password ;修改特权用户密码Quidwaysysname ;交换机命名Quidwayinterface ethernet 0/1

2、 ;进入接口视图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 ;静态路由网关Quidwayrip ;三层交换支持Quidwaylocal-user ftpQuidwayuser-interface vty 0 4 ;进入虚拟终端S3026-ui-vty0-4authentication-mode password ;设置口令模式S3026-ui-vt

3、y0-4set authentication-mode password simple 222 ;设置口令S3026-ui-vty0-4user privilege level 3 ;用户级别Quidwayinterface ethernet 0/1 ;进入端口模式Quidwayinte0/1 ;进入端口Quidway-Ethernet0/1duplex half|full|auto ;配置端口工作状态Quidway-Ethernet0/1speed 10|100|auto ;配置端口工作速率Quidway-Ethernet0/1flow-control ;配置端口流控Quidway-Ethe

4、rnet0/1mdi across|auto|normal ;配置端口平接扭接Quidway-Ethernet0/1port link-type trunk|access|hybrid ;设置端口工作模式Quidway-Ethernet0/1port access vlan 3 ;当前端口加入到VLANQuidway-Ethernet0/2port trunk permit vlan ID|All ;设trunk允许的VLANQuidway-Ethernet0/3port trunk pvid vlan 3;设置trunk端口的PVIDQuidway-Ethernet0/1undo shutd

5、own ;激活端口Quidway-Ethernet0/1shutdown ;关闭端口Quidway-Ethernet0/1quit ;返回Quidwayvlan 3 ;创建VLANQuidway-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 ;简写方式Quidwaymonitor-port ;指定镜像端口Quidwayport mirror ;

6、指定被镜像端口Quidwayport mirror int_list observing-port int_type int_num ;指定镜像和被镜像Quidwaydescription string ;指定VLAN描述字符Quidwaydescription ;删除VLAN描述字符Quidwaydisplay vlan vlan_id ;查看VLAN设置Quidwaystp enable|disable ;设置生成树,默认关闭Quidwaystp priority 4096 ;设置交换机的优先级Quidwaystp root primary|secondary ;设置为根或根的备份Quid

7、way-Ethernet0/1stp cost 200 ;设置交换机端口的花费Quidwaylink-aggregation e0/1 to e0/4 ingress|both ;端口的聚合Quidwayundo link-aggregation e0/1|all ; 始端口为通道号SwitchA-vlanxisolate-user-vlan enable ;设置主vlanSwitchAisolate-user-vlan secondary ;设置主vlan包括的子vlanQuidway-Ethernet0/2port hybrid pvid vlan ;设置vlan的pvidQuidway-

8、Ethernet0/2port hybrid pvid ;删除vlan的pvidQuidway-Ethernet0/2port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.路由器命令Quidwaydisplay version ;显示版本信息Quidwaydisplay current-configuration ;显示当前配置Quidwaydisplay interfaces ;显示接口信

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

10、dQuidway-ui-vty0-4set authentication-mode password simple 222Quidway-ui-vty0-4user privilege level 3Quidway-ui-vty0-4quitQuidwaydebugging hdlc all serial0 ;显示所有信息Quidwaydebugging hdlc event serial0 ;调试事件信息Quidwaydebugging hdlc packet serial0 ;显示包的信息静态路由:Quidwayip route-static interface number|nextho

11、pvaluereject|blackhole例如:Quidwayip route-static 129.1.0.0 16 10.0.0.2Quidwayip route-static 129.1.0.0 255.255.0.0 10.0.0.2Quidwayip route-static 129.1.0.0 16 Serial 2Quidwayip route-static 0.0.0.0 0.0.0.0 10.0.0.2动态路由:Quidwayrip ;设置动态路由Quidwayrip work ;设置工作允许Quidwayrip input ;设置入口允许Quidwayrip output

12、 ;设置出口允许Quidway-ripnetwork 1.0.0.0 ;设置交换路由网络Quidway-ripnetwork all ;设置与所有网络交换Quidway-rippeer ip-address ;Quidway-ripsummary ;路由聚合Quidwayrip version 1 ;设置工作在版本1Quidwayrip version 2 multicast ;设版本2,多播方式Quidway-Ethernet0rip split-horizon ;水平分隔Quidwayrouter id A.B.C.D ;配置路由器的IDQuidwayospf enable ;启动OSPF

13、协议Quidway-ospfimport-route direct ;引入直联路由Quidway-Serial0ospf enable area ;配置OSPF区域标准访问列表命令格式如下:acl match-order config|auto ;默认前者顺序匹配。rule normal|specialpermit|deny source source-addr source-wildcard|any例:Quidwayacl 10Quidway-acl-10rule normal permit source 10.0.0.0 0.0.0.255Quidway-acl-10rule normal

14、 deny source any扩展访问控制列表配置命令配置TCP/UDP协议的扩展访问列表:rule normal|specialpermit|denytcp|udpsource |anydestination |anyoperate配置ICMP协议的扩展访问列表:rule normal|specialpermit|denyicmp source |anydestination |anyicmp-code logging扩展访问控制列表操作符的含义equal portnumber ;等于greater-than portnumber ;大于less-than portnumber ;小于no

15、t-equal portnumber ;不等Range portnumber1 portnumber2 ;区间扩展访问控制列表举例Quidwayacl 101Quidway-acl-101rule deny souce any destination anyQuidway-acl-101rule permit icmp source any destination any icmp-type echoQuidway-acl-101rule permit icmp source any destination any icmp-type echo-replyQuidwayacl 102Quidw

16、ay-acl-102rule permit ip source 10.0.0.1 0.0.0.0 destination 202.0.0.1 0.0.0.0Quidway-acl-102rule deny ip source any destination anyQuidwayacl 103Quidway-acl-103rule permit tcp source any destination 10.0.0.1 0.0.0.0 destination-port equal ftpQuidway-acl-103rule permit tcp source any destination 10.

17、0.0.2 0.0.0.0 destination-port equal wwwQuidwayfirewall enableQuidwayfirewall default permit|denyQuidwayint e0Quidway-Ethernet0firewall packet-filter 101 inbound|outbound地址转换配置举例Quidwayfirewall enableQuidwayfirewall default permitQuidwayacl 101 ;内部指定主机可以进入e0Quidway-acl-101rule deny ip source any des

18、tination anyQuidway-acl-101rule permit ip source 129.38.1.1 0 destination anyQuidway-acl-101rule permit ip source 129.38.1.2 0 destination anyQuidway-acl-101rule permit ip source 129.38.1.3 0 destination anyQuidway-acl-101rule permit ip source 129.38.1.4 0 destination anyQuidway-acl-101quitQuidwayin

19、t e0Quidway-Ethernet0firewall packet-filter 101 inboundQuidwayacl 102 ;外部特定主机和大于1024端口的数据包允许进入S0Quidway-acl-102rule deny ip source any destination anyQuidway-acl-102rule permit tcp source 202.39.2.3 0 destination 202.38.160.1 0Quidway-acl-102rule permit tcp source any destination 202.38.160.1 0 dest

20、ination-port great-than1024Quidway-acl-102quitQuidwayint s0Quidway-Serial0firewall packet-filter 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_po

21、rtQuidway-Serial0nat server global 202.38.160.1 inside 129.38.1.1 ftp tcpQuidway-Serial0nat server global 202.38.160.1 inside 129.38.1.2 telnet tcpQuidway-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.3

22、8.160.101 202.38.160.103 pool1 ;建立地址池Quidwayacl 1Quidway-acl-1rule permit source 10.110.10.0 0.0.0.255 ;指定允许的内部网络Quidway-acl-1rule deny source anyQuidway-acl-1int serial 0Quidway-Serial0nat outbound 1 address-group pool1 ;在s0口从地址池取出IP对外访问Quidway-Serial0nat server global 202.38.160.101 inside 10.110.

23、10.1 ftp tcpQuidway-Serial0nat server global 202.38.160.102 inside 10.110.10.2 www tcpQuidway-Serial0nat server global 202.38.160.102 8080 inside 10.110.10.3 www tcpQuidway-Serial0nat server global 202.38.160.103 inside 10.110.10.4 smtp udpPPP设置:Quidway-s0link-protocol ppp ;默认的协议PPP验证:主验方:pap|chapQu

24、idwaylocal-user q2 password simple|cipher hello ;路由器1Quidwayinterface serial 0Quidway-serial0ppp authentication-mode pap|chapQuidway-serial0ppp chap user q1 ;pap时,没有此句pap被验方:Quidwayinterface serial 0 ;路由器2Quidway-serial0ppp pap local-user q2 password simple|cipher hellochap被验方:Quidwayinterface seria

25、l 0 ;路由器2Quidway-serial0ppp chap user q2 ;自己路由器名Quidway-serial0local-user q1 password simple|cipher hello ;对方路由器名帧中继frame-relay (二分册6-61)q1fr switchingq1int s1q1-Serial1ip address 192.168.34.51 255.255.255.0q1-Serial1link-protocol fr ;封装帧中继协议q1-Serial1fr interface-type dceq1-Serial1fr dlci 100q1-Ser

26、ial1fr inarpq1-Serial1fr map ip 192.168.34.52 dlci 100q2int s1q2-Serial1ip address 192.168.34.52 255.255.255.0q2-Serial1link-protocol frq2-Serial1fr interface-type dteq2-Serial1fr dlci 100q2-Serial1fr inarpq2-Serial1fr map ip 192.168.34.51 dlci 100帧中继监测q1display fr lmi-infointerface type numberq1dis

27、play fr mapq1display fr pvc-infoserial interface-numberdlci dlci-numberq1display fr dlci-switchq1display fr interfaceq1reset fr inarp-infoq1debugging fr allinterface type numberq1debugging fr arpinterface type numberq1debugging fr eventinterface type numberq1debugging fr lmiinterface type number启动ftp服务:Quidwaylocal-user ftp password simple|cipher aaa service-type ftpQuidwayftp server enable

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!