2022年2022年华为交换机路由器配置命令表 .pdf

上传人:C****o 文档编号:33370300 上传时间:2022-08-10 格式:PDF 页数:7 大小:56.08KB
返回 下载 相关 举报
2022年2022年华为交换机路由器配置命令表 .pdf_第1页
第1页 / 共7页
2022年2022年华为交换机路由器配置命令表 .pdf_第2页
第2页 / 共7页
点击查看更多>>
资源描述

《2022年2022年华为交换机路由器配置命令表 .pdf》由会员分享,可在线阅读,更多相关《2022年2022年华为交换机路由器配置命令表 .pdf(7页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。

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 ;设置网关# route del d

2、efault gw ;删除网关# route ;显示网关# ping ;发 ECHO 包# telnet ;远程登录交换机命令Quidwaydis cur ;缩写显示当前配置Quidwaydisplay current-configuration ;显示当前配置Quidwaydisplay interfaces ;显示接口信息Quidwaydisplay vlan all ;显示路由信息Quidwaydisplay version ;显示版本信息Quidwaysuper password ;修改特权用户密码Quidwaysysname ;交换机命名Quidwayinterface ethern

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

4、式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 ;配置端口工作速率名师资料总结 - - -精品资料欢迎下载 - - - - - -

5、 - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 7 页 - - - - - - - - - Quidway-Ethernet0/1flow-control ;配置端口流控Quidway-Ethernet0/1mdi across|auto|normal ;配置端口平接扭接Quidway-Ethernet0/1port link-type trunk|access|hybrid ;设置端口工作模式Quidway-Ethernet0/1port access vlan 3 ;当前端口加入到VLAN Quidway-Ethernet0/2p

6、ort trunk permit vlan ID|All ;设 trunk允许的 VLAN Quidway-Ethernet0/3port trunk pvid vlan 3 ;设置 trunk端口的 PVID Quidway-Ethernet0/1undo shutdown ;激活端口Quidway-Ethernet0/1shutdown ;关闭端口Quidway-Ethernet0/1quit ;返回Quidwayvlan 3 ;创建 VLAN Quidway-vlan3port ethernet 0/1 ;在 VLAN 中增加端口Quidway-vlan3port e0/1 ;简写方式Q

7、uidway-vlan3port ethernet 0/1 to ethernet 0/4 ;在 VLAN 中增加端口Quidway-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 描述字符Quidwaydisp

8、lay vlan vlan_id ;查看 VLAN 设置Quidwaystp enable|disable ;设置生成树 ,默认关闭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-

9、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 ;设置无标识的vlan 如果包的 vlan id与 PVId 一致,则去掉v

10、lan 信息 . 默认 PVID=1 。所以设置 PVID 为所属 vlan id, 设置可以互通的vlan 为 untagged. 路由器命令Quidwaydisplay version ;显示版本信息Quidwaydisplay current-configuration ;显示当前配置Quidwaydisplay interfaces ;显示接口信息名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 7 页 - - - - - - - - - Quidwaydispla

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

12、ty0-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 ;显示包的信息静态路由:Quidwayip route-static interface number|nexthopvaluereje

13、ct|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-static 0.0.0.0 0.0.0.0 10.0.0.2 动态路由:Quidwayrip ;设置动态路由Quidwayrip work ;设置工作允许Quidwayrip input ;设置入口允许Quidwayrip output ;设置出

14、口允许Quidway-ripnetwork 1.0.0.0 ;设置交换路由网络Quidway-ripnetwork 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

15、协议Quidway-ospfimport-route direct ;引入直联路由Quidway-Serial0ospf enable area ;配置 OSPF 区域名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 7 页 - - - - - - - - - 标准访问列表命令格式如下:acl match-order config|auto ;默认前者顺序匹配。rule normal|specialpermit|deny source source-addr source-

16、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|specialpermit|denyicmp source |any

17、destination |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 Quidway-acl-101rule permit icmp source any dest

18、ination 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 any Quidwayacl 103 Quidway-acl-103rule perm

19、it 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 Quidwayint e0 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - -

20、- 名师精心整理 - - - - - - - 第 4 页,共 7 页 - - - - - - - - - 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

21、.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-acl-101rule permit ip source 129.38.1.4 0 destination any Quidway-acl-101quit Quidwayint e0 Quidway-Ethernet0firewall packet-filter 10

22、1 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 destination 202.38.160.1 0 destination-port great-than 1024 Quidway-acl-

23、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) :nat server global port inside port protocol ;global_port不 写 时 使 用inside_port Quidway-Serial0nat se

24、rver 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 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.

25、160.103 pool1 ;建立地址池Quidwayacl 1 Quidway-acl-1rule permit source 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 对外名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - -

26、 - 第 5 页,共 7 页 - - - - - - - - - 访问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 8080 inside 10.110.10.3 www tcp Quidway-Serial0nat server global 20

27、2.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 Quidway-serial0ppp authentication-mode pap|chap Quidway-serial0ppp chap user q1 ;pap 时,没有此句pap 被验方:Quidwayinterfac

28、e 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-user q1 password simple|cipher hello ;对方路由器名帧中继 frame-relay (二分册 6-61) q1fr switching q1int s1 q1-Serial1ip addres

29、s 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 q2-Serial1ip address 192.168.34.52 255.255.255.0 q2-Serial1link-protocol fr q2-Serial1fr interface-type dte q2

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

31、lci 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 该信息表属于为本人学习后,参照其他根据自己理解,修改版本名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 7 页 - - - - - - - - -

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 高考资料

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

工信部备案号:黑ICP备15003705号-8 |  经营许可证:黑B2-20190332号 |   黑公网安备:91230400333293403D

© 2020-2023 www.deliwenku.com 得利文库. All Rights Reserved 黑龙江转换宝科技有限公司 

黑龙江省互联网违法和不良信息举报
举报电话:0468-3380021 邮箱:hgswwxb@163.com