华为数通设备常用诊断命令(建议收藏)_第1页
华为数通设备常用诊断命令(建议收藏)_第2页
华为数通设备常用诊断命令(建议收藏)_第3页
华为数通设备常用诊断命令(建议收藏)_第4页
华为数通设备常用诊断命令(建议收藏)_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

华为数通设备常用诊断命令(建议收藏)目录Telnet配置FTP配置路由IP配置VLAN配置Eth-trunk配置STP配置DHCP配置帧中继配置单臂路由配置RIP配置OSPF配置VRRP配置HDLC配置PPP配置以太网接口配置防火墙配置链路技术其他配置设备版本升级Telnet配置1、密码登录[Huawei]user-interfaceconsole0//进入管理控制口

[Huawei-ui-console0]authentication-modepassword

Pleaseconfiguretheloginpassword(maximumlength16):输入密码

[Huawei-ui-console0]userprivilegelevel?//设置特权等级

[Huawei-ui-console0]idle-timeout200//设置空闲超时时间为20分钟,默认为10分钟2、用户和密码登录[Huawei]user-interfaceconsole0//进入管理控制口

[Huawei-ui-console0]authentication-modeaaa

[Huawei-ui-console0]quit

[Huawei]aaa

[Huawei-aaa]local-userhuaweipasswordcipherhw(密码)

[Huawei-aaa]local-userhuaweiservice-typeterminal//从终端登录3、PC通过以太网口远程登录配置#AAA模式远程登录

[R1]user-interfacevty04

[R1-ui-vty0-4]authentication-modeaaa

[R1]aaa//进入认证、授权、计费模式(简称AAA模式)

[R1-aaa]local-useradminpasswordcipher123456//配置本地用户和密码

[R1-aaa]local-useradminservice-typetelnet//选择授权用户的服务类型

[R1-aaa]local-useradminprivilegelevel3//设置管理员用户级别

#仅密码远程登录

[R2]user-interfacevty04//虚拟用户终端接口

[R2-ui-vty0-4]authentication-modepassword//配置用户终端的认证模式

[R2-ui-vty0-4]setauthenticationpasswordsimple123456//设置登录用户密码

[R2-ui-vty0-4]userprivilegelevel3//设置用户等级

[R2-ui-vty0-4]usernetwork-admin//设置登录用户的参数4、设置超级密码[Huawei]superpasswordlevel3cipher123456(作用?)FTP配置1、将路由器作为FTP服务器[R1]ftpserverenable

[R1]aaa

[R1-aaa]local-userwindapasswordcipheraqx123456(字母与数字的组合)

[R1-aaa]local-userwindaprivilegelevel15

[R1-aaa]local-userwindaservice-typeftp

[R1-aaa]local-userwindaftp-directoryflash://指定目录2、登录FTP服务器,并传送文件ftp

User(:(none)):huawei

331Passwordrequiredforhuawei.

Enterpassword:

230Userloggedin.

[R1-ftp]putportalpage.zip//上传文件

[R1-ftp]getportalpage.zipportal.zip//下载文件并改名字

delete/unreservedportal.zip//彻底删除该文件其它配置配置登录标语[R1]headershellinformation"WelcometoHuaWei"指定下次启动装载的配置文件startupsaved-configurationiascfg.zip指定下次启动装载的配置文件factory-configurationreset设置下次启动用的文件startupsaved-configuration文件名删除保存的配置文件resetsaved-configuration

reboot

Warning:Alltheconfigurationwillbesavedtothenextstartupconfiguration.

Continue?[y/n]:n关闭消息提示功能[R1]undoinfo-centerenable//关闭提示信息,提高配置时的视觉

undoterminalmonitor//关闭日志提示消息(很烦人的一个东西)路由IP配置浮动静态路由[Huawei]iproute-static24(目标网络)(下一跳IP)preference80描述接口[R1-Serial1/0/0]descriptionthisportconnecttoR2-S1/0/0默认(缺省)路由[R1]iproute-static使用带源参数的ping命令[R2]ping-a配置从IP地址(解决RIPv1不连续子网)[R1-Serial1/0/0]ipaddsub静态路由与BFD联动#激活BFD功能

[R1]bfd

[R1-bfd]quit

#创建BFD会话,名称为ab(自定义),对端的IP地址为

[R1]bfdabbindpeer-ipVLAN配置端口类型配置配置端口为access[Huawei]vlan10//创建vlan10

[Huawei]interfaceGigabitEthernet0/0/2//进入g0/0/2端口

[Huawei-GigabitEthernet0/0/2]portlink-typeaccess//选择端口类型

[Huawei-GigabitEthernet0/0/2]portdefaultvlan10//划分VLAN

技巧:[S2]vlanbatch3to5//创建VLAN3、4、5配置端口的Hybrid类型[SW1]vlan10

[SW1-GigabitEthernet0/0/1]porthybridpvidvlan10

[SW1-GigabitEthernet0/0/1]porthybriduntaggedvlan1030//对VLAN10和30去标签配置端口的Trunk类型[SW1]interfaceg0/0/24

[SW1-GigabitEthernet0/0/24]portlink-typetrunk

[SW1-GigabitEthernet0/0/24]porttrunkallow-passvlanall//允许所有VLAN通过更改Trunk端口的PVID[SW1-GigabitEthernet0/0/24]porttrunkpvidvlan10Eth-trunk配置创建Eth-trunk1,并将接口加入Eth-trunk1[S1]interfaceEth-Trunk1

[S1]intg0/0/9

[S1-GigabitEthernet0/0/9]eth-trunk1

[S1]interfaceEth-Trunk1

[S1-Eth-Trunk1]trunkportg0/0/9配置Eth-trunk1链路配置为access[S1]interfaceEth-Trunk1

[S1-Eth-Trunk1]portlink-typeaccess

[S1-Eth-Trunk1]portdefaultvlan5STP配置STP配置#修改桥优先级

[S1]stppriority4096//数值越小优先级越高

#修改端口优先级

[S1-GigabitEthernet0/0/9]stpportpriority32//默认为128,数值越小优先级越高

#配置边缘端口(使端口快速进入转发状态)

[S3]interfaceEthernet0/0/3

[S3-Ethernet0/0/3]stpedged-portenable

[S3-Ethernet0/0/3]stpcost//设置路径开销值

[根交换机]stptimerforward-delay//设置延迟时间

[根交换机]stpedged-portenable//设置网络直径配置MSTP[SW1]stpregion-configuration//进入MST域

[SW1-mst-region]region-namehuawei//配置域名

[SW1-mst-region]revision-level1//配置修订级别为1

[SW1-mst-region]instance1vlan10//制定MSTI1与VLAN10的映射查看STP#各接口简要STP状态

[S1]disstpbrief

#具体接口详细STP信息

[S1]disstpinterfaceg0/0/10

#查看当前根桥信息

[S1]disstp

#查看实例1的信息

[SW1]disstpinstance1briefDHCP配置基于接口配置DHCP功能[R1]dhcpenable//开启DHCP功能

[R1-GigabitEthernet0/0/0]dhcpselectinterface//开启接口DHCP功能

[R1-GigabitEthernet0/0/0]dhcpserverleaseday2【可选】//设置租用有效期限为2天

[R1-GigabitEthernet0/0/0]dhcpserverdns-list//为PC自动分配DNS服务器地址

[R1-GigabitEthernet0/0/1]dhcpserverexcluded-ip-address5053//配置不参与自动分配的IP地址范围基于全局配置DHCP[R1]dhcpenable//开启DHCP功能

[R1]ippoolhuawei1//配置全局地址池

[R1-ip-pool-huawei1]network//指定地址池范围

[R1-ip-pool-huawei1]leaseday2【可选】//租期为2天,默认1天

[R1-ip-pool-huawei1]gateway-list54//出口网关地址

[R1-ip-pool-huawei1]excluded-ip-address5053//不参与自动分配

[R1-ip-pool-huawei1]dns-list//配置DNS服务器地址

[R1-GigabitEthernet0/0/0]dhcpselectglobal//开启接口的DHCP功能查看disippool//查看地址池地址分配情况DHCP中继[R1]dhcpenable//开启DHCP功能

#面向PC的接口:

[R1-Ethernet0/0/0]dhcpselectrelay

[R1-Ethernet0/0/0]dhcprelayserver-ip//指定DHCP服务器IP地址

#面向PC的接口下调用全局定义的DHCP服务器组:

[R1]dhcpservergroupdhcp-group

[R1-dhcp-server-group-dhcp-group]dhcp-server

[R1-Ethernet0/0/0]dhcpselectrelay

[R1-Ethernet0/0/0]dhcprelayserver-selectdhcp-group帧中继配置DCE配置[R1]interfaces1/0/0

[R1-Serial1/0/0]link-protocolfr

[R1-Serial1/0/0]frinterface-typedce//接口类型

[R1-Serial1/0/0]frdlci100

[R1-Serial1/0/0]ipadd24DTE配置[R2]interfaces1/0/0

[R2-Serial1/0/0]link-protocolfr

[R2-Serial1/0/0]frinterface-typedte其它配置查看PVC

[R1]disfrpvc-info

#查看映射

[R1]disfrmap-info

#静态映射

[R2-Serial1/0/0]undofrinarp

[R1-Serial1/0/0]frmapip100broadcast

//OSPF中使用组播的网络类型时,应在映射后面加Broadcast单臂路由配置配置路由器[R1]intg0/0/0.1//创建并进入g0/0/0的0.1子接口

[R1-GigabitEthernet0/0/0.1]dot1qterminationvid10//封装dot1q协议

[R1-GigabitEthernet0/0/0.1]ipaddress5424//配置IP地址

[R1-GigabitEthernet0/0/0.1]arpbroadcastenable//开启arp广播

[R1-GigabitEthernet0/0/0.1]dhcpselectglobal//开启DHCP全局模式

[R1-GigabitEthernet0/0/0.1]intg0/0/0.2

[R1-GigabitEthernet0/0/0.2]dot1qterminationvid20

[R1-GigabitEthernet0/0/0.2]ipaddress5424

[R1-GigabitEthernet0/0/0.2]arpbroadcastenable

[R1-GigabitEthernet0/0/0.2]dhcpselectglobal配置交换机[SW1]vlanbatch1020//创建vlan10和vlan20

[SW1-GigabitEthernet0/0/1]intg0/0/1//进入g0/0/1接口

[SW1-GigabitEthernet0/0/1]portlink-typeaccess//修改端口为access模式

[SW1-GigabitEthernet0/0/1]portdefaultvlan10//将端口划分到vlan10中

[SW1-GigabitEthernet0/0/1]intg0/0/2

[SW1-GigabitEthernet0/0/2]portlink-typeaccess

[SW1-GigabitEthernet0/0/2]portdefaultvlan20

[SW1-GigabitEthernet0/0/2]intg0/0/24//交换机与路由器相连的接口需要修改为trunk模式

[SW1-GigabitEthernet0/0/24]portlink-typetrunk//修改端口为trunk模式

[SW1-GigabitEthernet0/0/24]porttrunkallow-passvlan1020//允许vlan10和vlan20的数据通过RIP配置基本配置[Huawei]rip1//启动RIP进程

[Huawei-rip-1]version2//选择版本(可选)

[Huawei-rip-1]net(通告自然网段)其它配置[Huawei-rip-1]summaryalways//使能自动汇总[V2默认开启,但不生效]

[接口]undoripsplit-horizon//关闭接口水平分割

[Huawei-GigabitEthernet0/0/0]ripsummary-address聚合后网络子网掩码//手动汇总

#接口附加度量值

[接口]ripmetricinx//cost=原来的值+x

[接口]ripmetricoutx//cost=0+x

#认证

[R2-Serial1/0/0]ripauthentication-modesimplehuawei//明文

[R2-Serial2/0/0]ripauthentication-modemd5usualhuawei//MD5#开启RIP调试

debugrip1

terminaldebugging

Info:Currentterminaldebuggingison.

terminalmonitor

#抑制接口(只收不发)

[R1-GigabitEthernet0/0/0]undoripoutput//不能使用单播通信

[R2-rip-1]silent-interfaceE0/0/0//优先级高于前者[R2-rip-1]peerIP地址//单播通信

[R2-rip-1]preferencex//修改优先级(只在本地有效)

[R2-rip-1]timersrip2012060//修改定时器

[R3]iproute-static0LoopBack2//发布默认路由

[R3-rip-1]default-routeoriginate//不需创建默认路由,也能发布

resetrip1statistics//刷新RIP统计信息

resetiprouting-tablestatisticsprotocolrip//清除RIP学到的路由信息

[R2]undorip1//删除RIP

[R1]ripversion2multicase//配置版本1的也能发送RIPv2报文OSPF配置配置OSPF[R1]ospfRouter-id//配置环回口IP地址

[R1-ospf-1]area0

[R1-ospf-1-area-]network55引入路由[R3-ospf-1]import-routedirect//引入直连路由

[R1-ospf-1]import-routerip1cost100//引入RIP路由发布默认路由[R3]iproute-static0LoopBack2

[R3]ospf100

[R3-ospf-100]default-route-advertise

[R3-ospf-100]default-route-advertisealways//自动发布默认路由OSPF验证#接口认证明文:

[R1-Serial1/0/0]ospfauthentication-modesimpleplainhuawei

#区域认证密文:

[R1-ospf-1]area1

[R1-ospf-1-area-]authentication-modemd51cipherhuawei抑制接口(不收不发)R2-ospf-1]silent-interfaceE0/0/0

[R2-ospf-1]peerIP地址//单播通信查看[R1]disospfpeerbrief//查看邻居

[R1]disospfinterface//查看DR、BDR

[R1]resetospfprocess//重置OSPF进程

[R1]disiprouting-tableprotocolospf//查看OSPF学到的路由

[R1]displayospflsdbase//显示链路状态数据库的外接路由信息

[R1]disospfintG0/0/0//查看接口的OSPF信息查看LSA信息[R1]disospflsdbrouter//查看一类LSA

[R1]disospflsdbnetword//查看二类LSA

[R1]disospflsdbsummary//查看三类LSA

[R1]disospflsdbasbr//查看四类LSA

[R1]disospflsdbase//查看五类LSA

[R1]disospflsdbnssa//查看七类LSA其它修改Hello和Dead时间[R1-GigabitEthernet0/0/0]ospftimerhello15

[R1-GigabitEthernet0/0/0]ospftimerdead60修改DR优先级[R1-GigabitEthernet0/0/0]ospfdr-priority200(越大优先级越高)注:由于DR/BDR选举默认为不抢占模式,因此在修改了路由器优先级后不会自动重新选举DR,需要重置OSPF进程。修改网络类型为广播[R2-Serial2/0/0]ospfnetwork-typebroadcast修改开销值、带宽参考值[接口]ospfcostx

[R3-ospf-1]bandwidth-referencexVRRP配置[SW1-Vlanif10]vrrpvrid1virtual-ip54//配置虚拟网关

[SW1-Vlanif10]vrrpvrid1priority150//更改优先级

[SW1-Vlanif10]vrrpvrid1preempt-modedisable//关闭抢占模式

[SW1-Vlanif10]vrrpvrid1trackinterfaceg0/0/24reduced60//跟踪上层端口

[R1-Serial2/0/0]ospfnetwork-typep2mp//配置接口的网络类型为Point-to-multipoint

[S1]displayvrrp//查看VRRP信息HDLC配置[R1-Serial1/0/0]ipaddressunnumberedinterfaceLoopBack0//IP地址借用

[R1]iproute-static24Serial1/0/0

[R1-Serial1/0/0]link-protocolhdlc//将接口改为HDLC类型PPP配置认证方[R1]aaa

[R1-aaa]local-userhuaweipasswordcipher123456

[R1-aaa]local-userhuaweiservice-typeppp

[R1-Serial0]pppauthentication-modepap(CHAP)被认证方#PAP:

[R2-Serial0]ppppaplocal-userhuaweipasswordcipher123456

#CHAP:

[R2-Serial0]pppchapuserhuawei

[R2-Serial0]pppchappasswordcipher123456使用CHAP建立PPP连接的协商过程debuggingpppchapall

terminaldebugging以太网接口配置[S1-G0/0/9]undonegotiationauto//更改接口的速率和双工模式前应先关闭接口的自动协商功能

[S1-G0/0/9]speed100//设置为100M速率

[S1-G0/0/9]duplexfull//全双工模式

[S1]diseth-trunk1//查看Eth-trunk1配置结果防火墙配置#登录不需要用户名和密码

[FW]user-interfaceconsole0

[FW-ui-console0]authentication-modenone

#定义时区:

clocktimezone1add08:00:00链路技术链路聚合[S1]interfaceEth-Trunk1//聚合交换机之间的Eth-Trunk端口编号相等

[S1-Eth-Trunk1]modelacp-static//lacp模式

[S1-Eth-Trunk1]trunkportGigabitEthernet0/0/1to0/0/2//将成员端口加入到聚合端口中

[S1-Eth-Trunk1]maxactive-linknumber2//设置活动上限阀值

[S1-Eth-Trunk1]portlink-typetrunk

[S1-Eth-Trunk1]porttrunkallow-passvlanall

[S1-Eth-Trunk1]diseth-trunk1verbose//查看聚合端口的信息

[S1]lacppriority100//配置系统优先级使其成为主控端

[S1-G0/0/1]lacppriority100//配置活动链路优先级

[S1-G0/0/2]lacppriority100//配置活动链路优先级SmartLink[S1-G0/0/1]stpdisable//关掉相关接口的STP

[S1]smart-linkgroup1

[S1-smlk-group1]portGigabitEthernet0/0/1master//设置主端口

[S1-smlk-group1]portg0/0/2slave//设置从端口

[S1-smlk-group1]flushsendcontrol-vlan10passwordsimple123//使能smartlink组1发送Flush帧的功能,携带的控制VLAN编号为10,密码是:123

[S1-smlk-group1]restoreenable//开启回切功能

[S1-smlk-group1]timerwtr30//回切时间为30秒

[S1-smlk-group1]smart-linkenable//使能SmartLink组1的功能

[S1-smlk-group1]dissmart-linkgroup1//查看SmartLink组1的信息

[S2-GigabitEthernet0/0/1]smart-linkflushreceivecontrol-vlan10passwordsimple123//设置其他交换机可以接收和处理携带控制VLAN编号是10的Flush帧其他配置自动保存#自动保存

autosaveintervalon

autosaveinterval120//每隔120分钟自动保存

#定点保存

autosavetimeon

autosavetime23:00:00//到23点自动保存端口镜像[R1]observe-port1interfaceEthernet4/0/1//设置观察端口

[接口]mirrortoobserve-port1both//将镜像端口映射到观察端口端口绑定[Huawei]user-bindstaticmac-address5489-988B-5157inte0/0/1//绑定MAC地址

[Huawei]user-bindstaticip-address//绑定IP地址端口安全[接口]port-securityenable//启用端口安全

[接口]port-securitymax-mac-num2//自动学习MAC地址的最大数量

[接口]port-securityprotect-actionshutdown//保护行为为关闭端口前缀列表[R1]ipip-prefix1deny25greater-equal25less-equal25//在RIP里面过滤掉/25

[R1]ipip-prefix1permit0less-equal32

[R1-rip-1]filter-policyip-prefix1importIPv6配置[R1]ipv6//开启全局IPv6功能

[R1-E0/0/0]ipv6enable//在接口(连接PC)下开启IPv6功能

[R1-E0/0/0]ipv6addressautolink-local//自动生成链路本地地址

[R1-G0/0/0]ipv6enable//在接口(连接路由器)下开启IPv6功能

[R1-G0/0/0]ipv6add2031:0:130F::164//配置全球单播地址

[R1-E0/0/0]ipv6add2001:3:FD::64eui-64//用EUI-64配置地址设备版本升级检查设备剩余空间是否大于新的软件包大小<H07_S5720_BMC-05>dirflash:

Directoryofflash:/

IdxAttrSize(Byte)DateTimeFileName

0drw--Oct30201903:37:16dhcp

1drw--Oct30201903:19:15user

2-rw-13,432Oct30201903:37:25default_ca.cer

3-rw-36Oct30201903:38:18$_patchstate_reboot

4-rw-3,684Oct30201903:38:18$_patch_history

5-rw-1,903Oct30201903:37:31default_local.cer

6drw--Oct30201903:37:42logfile

7-rw-1,111Apr08202017:03:35vrpcfg.z

温馨提示

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

评论

0/150

提交评论