零基础华为认证HCNA配置命令
- 格式:docx
- 大小:41.99 KB
- 文档页数:28
华为路由器配置命令华为路由器配置命令大全学习华为交换机,就要记得配置基本命令,下面yjbys为大家分享的是华为路由器基本配置命令,希望对大家学习华为有所帮助!一、计算机命令PCAlogin:root;使用root用户password:linux;口令是linux#shutdown-hnow;关机#init0;关机#logout;用户注销#login;用户登录#ifconfig;显示IP地址#ifconfigeth0netmask;设置IP地址#ifconfigeht0netmaskdown;禁用IP地址#routeadd0.0.0.0gw;设置网关#routedel0.0.0.0gw;删除网关#routeadddefaultgw;设置网关#routedeldefaultgw;删除网关#route;显示网关#ping;发ECHO包#telnet;远程登录二、华为路由器交换机配置命令:交换机命令[Quidway]discur;显示当前配置[Quidway]displaycurrent-configuration;显示当前配置[Quidway]displayinterfaces;显示接口信息[Quidway]displayvlanall;显示路由信息[Quidway]displayversion;显示版本信息[Quidway]superpassword;修改特权用户密码[Quidway]sysname;交换机命名[Quidway]interfaceethernet0/1;进入接口视图[Quidway]interfacevlanx;进入接口视图[Quidway-Vlan-interfacex]ipaddress10.65.1.1255.255.0.0;配置VLAN的IP地址[Quidway]iproute-static0.0.0.00.0.0.010.65.1.2;静态路由=网关[Quidway]rip;三层交换支持[Quidway]local-userftp[Quidway]user-interfacevty04;进入虚拟终端[S3026-ui-vty0-4]authentication-modepassword;设置口令模式[S3026-ui-vty0-4]setauthentication-modepasswordsimple222;设置口令[S3026-ui-vty0-4]userprivilegelevel3;用户级别[Quidway]interfaceethernet0/1;进入端口模式[Quidway]inte0/1;进入端口模式[Quidway-Ethernet0/1]duplex{half|full|auto};配置端口工作状态[Quidway-Ethernet0/1]speed{10|100|auto};配置端口工作速率[Quidway-Ethernet0/1]flow-control;配置端口流控[Quidway-Ethernet0/1]mdi{across|auto|normal};配置端口平接扭接[Quidway-Ethernet0/1]portlink-type{trunk|access|hybrid};设置端口工作模式[Quidway-Ethernet0/1]portaccessvlan3;当前端口加入到VLAN [Quidway-Ethernet0/2]porttrunkpermitvlan{ID|All};设trunk 允许的VLAN[Quidway-Ethernet0/3]porttrunkpvidvlan3;设置trunk端口的PVID[Quidway-Ethernet0/1]undoshutdown;激活端口[Quidway-Ethernet0/1]shutdown;关闭端口[Quidway-Ethernet0/1]quit;返回[Quidway]vlan3;创建VLAN[Quidway-vlan3]portethernet0/1;在VLAN中增加端口[Quidway-vlan3]porte0/1;简写方式[Quidway-vlan3]portethernet0/1toethernet0/4;在VLAN中增加端口[Quidway-vlan3]porte0/1toe0/4;简写方式[Quidway]monitor-port;指定镜像端口[Quidway]portmirror;指定被镜像端口[Quidway]portmirrorint_listobserving-portint_typeint_num;指定镜像和被镜像[Quidway]descriptionstring;指定VLAN描述字符[Quidway]description;删除VLAN描述字符[Quidway]displayvlan[vlan_id];查看VLAN设置[Quidway]stp{enable|disable};设置生成树,默认关闭[Quidway]stppriority4096;设置交换机的优先级[Quidway]stproot{primary|secondary};设置为根或根的备份[Quidway-Ethernet0/1]stpcost200;设置交换机端口的花费[Quidway]link-aggregatione0/1toe0/4ingress|both;端口的`聚合[Quidway]undolink-aggregatione0/1|all;始端口为通道号[SwitchA-vlanx]isolate-user-vlanenable;设置主vlan[SwitchA]isolate-user-vlansecondary;设置主vlan包括的子vlan[Quidway-Ethernet0/2]porthybridpvidvlan;设置vlan的pvid [Quidway-Ethernet0/2]porthybridpvid;删除vlan的pvid[Quidway-Ethernet0/2]porthybridvlanvlan_id_listuntagged;设置无标识的vlan如果包的vlanid与PVId一致,则去掉vlan信息.默认PVID=1。
华为交换机配置命令总结1、配置文件相关命令[Quidway]display current-configuration 显示当前生效的配置[Quidway]display saved-configuration 显示flash中配置文件,即下次上电启动时所用的配置文件reset saved-configuration 檫除旧的配置文件reboot 交换机重启display version 显示系统版本信息2、基本配置[Quidway]super password 修改特权用户密码[Quidway]sysname 交换机命名[Quidway]interface ethernet 1/0/1 进入接口视图[Quidway]interface vlan 1 进入接口视图[Quidway-Vlan-interfacex]ip address 10.1.1.11 255.255.0.0 配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1 静态路由=网关3、telnet配置[Quidway]user-interface vty 0 4 进入虚拟终端[S3026-ui-vty0-4]authentication-mode password 设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple xmws123 设置口令[S3026-ui-vty0-4]user privilege level 3 用户级别4、端口配置[Quidway-Ethernet1/0/1]duplex {half|full|auto} 配置端口工作状态[Quidway-Ethernet1/0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet1/0/1]flow-control 配置端口流控[Quidway-Ethernet1/0/1]mdi {across|auto|normal} 配置端口平接扭接[Quidway-Ethernet1/0/1]port link-type {trunk|access|hybrid} 设置端口工作模式[Quidway-Ethernet1/0/1]undo shutdown 激活端口[Quidway-Ethernet1/0/2]quit 退出系统视图5、链路聚合配置[DeviceA] link-aggregation group 1 mode manual 创建手工聚合组1[Qw_A] interface ethernet 1/0/1 将以太网端口Ethernet1/0/1加入聚合组1[Qw_A-Ethernet1/0/1] port link-aggregation group 1[Qw_A-Ethernet1/0/1] interface ethernet 1/0/2 将以太网端口Ethernet1/0/1加入聚合组1[Qw_A-Ethernet1/0/2] port link-aggregation group 1[Qw_A] link-aggregation group 1 service-type tunnel # 在手工聚合组的基础上创建tunnel业务环回组。
华为交换机配置命令大全华为交换机是一种高性能、高可靠的数据通信设备,广泛应用于各种网络环境中。
为了更好地使用华为交换机,我们需要了解一些基本的配置命令。
本文将为大家详细介绍华为交换机的配置命令大全,帮助大家更好地了解和使用华为交换机。
1. 登录华为交换机。
首先,我们需要登录华为交换机进行配置。
一般来说,我们可以通过串口、Telnet或SSH方式登录交换机。
以SSH方式登录为例,我们可以使用以下命令:```shell。
ssh -l username 192.168.1.1。
```。
其中,username为登录用户名,192.168.1.1为交换机的IP地址。
登录成功后,我们需要输入密码进行验证。
2. 查看交换机当前配置。
在登录成功后,我们可以使用以下命令查看交换机的当前配置信息:```shell。
display current-configuration。
```。
这条命令可以显示出交换机当前的全部配置信息,包括接口配置、VLAN配置、路由配置等。
3. 配置交换机接口。
接下来,我们可以对交换机的接口进行配置。
比如,我们可以通过以下命令配置一个VLAN接口:```shell。
interface Vlanif1。
ip address 192.168.1.1 255.255.255.0。
```。
这条命令将为VLAN接口Vlanif1配置IP地址为192.168.1.1,子网掩码为255.255.255.0。
4. 配置交换机VLAN。
除了配置接口,我们还可以对交换机的VLAN进行配置。
比如,我们可以使用以下命令创建一个VLAN:```shell。
vlan 10。
```。
这条命令将创建一个VLAN ID为10的VLAN。
5. 配置交换机路由。
在需要进行路由配置时,我们可以使用以下命令添加静态路由:```shell。
ip route-static 0.0.0.0 0.0.0.0 192.168.1.254。
```。
Stpstp mode 配置交换机模式stp priority 配置设备优先级stp pathcost-standard 配置交换机上的路径开销stp edged-port enable 配置边缘端口stp root-protection 配置根保护stp bpdu-protection 配置bpdu保护stp loop-protection 配置环路保护静态路由ip route-static 目的网段掩码下一跳负载分担(目的网段和掩码一样)缺省路由(目的网段和掩码为全0)Ripripversion 2network 自然网段rip metricin 加rip metricout 改rip split-horizon 水平分割rip poison-reverse 毒性逆转undo rip output 禁止发送undo rip input禁止接受silent-interface 抑制接口OSPFospf router-id 1.1.1.1area 0network 网段反掩码DHCP接口dhcp enableinterface g 0/0/0dhcp select interface全局dhcp enableip pool pool2network 地址池下的网段地址mask24 gateway-list 出口网关地址int g 0/0/0dhcp select globalFTPftp server enableaaalocal-user 用户名password cipher 密码local-user 用户名service-type ftplocal-user 用户名ftp-directory flash: local-user 用户名privilege level 3 Telnet密码模式user-interface vty 0 4authentication-mode passwordset authentication password cipher 密码AAA模式aaalocal-user 用户名password cipher 密码local-user 用户名service-type telnet local-user 用户名privilege 3 authentication-mode aaa链路聚合二层int eth-trunk 1int g 0/0/0eth-trunk 1int g 0/0/1eth-trunk 1三层int eth-trunk 1undo portswitchip addressint g 0/0/0eth-trunk 1int g 0/0/1eth-trunk 1VLANAccessvlan batchport link-type accessport default vlanTrunkvlan batchport link-type trunkport trunk allow-pass vlan port trunk pvid vlan Hybridport link-type hybridport hybrid pvid vlanport hybrid untagged vlan port hybrid tagged vlan单臂路由交换机上的配置vlan batch 2 3int g 0/0/0port link-type trunkport trunk allow-pass vlan 2 3int g 0/0/1port link-type accessport access default vlan 2路由上的配置int g 0/0/0.1dot1q termination vid 2ip addressarp broadcast enable三层交换vlan batch 2 3int g 0/0/0port link-type trunkport access default vlan 2int g 0/0/1port link-type accessport access default vlan 3int vlanif 2ip addressint vlanif 3ip addressHDLCint s0/0/0link-protocol hdlcip address unnumbered interface loopback 0PAP认证认证方aaalocal-user 用户名password cipher 密码local-user 用户名password service-type pppint s0/0/0link-protocol pppppp authentication-mode papip address被认证方int s0/0/0link-protocol pppppp pap local-user 用户名password cipher 密码ip addressCHAP认证认证方aaalocal-user 用户名password cipher 密码local-user 用户名password service-type pppint s0/0/0link-protocol pppppp authentication-mode chapip address被认证方int s0/0/0link-protocol pppppp pap local-user 用户名ppp chap password cipher 密码帧中继(FR)动态映射int s 0/0/0link-protocol frfr interface-type dte/dcefr inarp静态映射int s 0/0/0link-protocol frfr interface-type dte/dceundo fr inarpfr map ip网络地址转换(NAT)静态NATint g 0/0/0ip addressnat static global 公网地址inside 私网地址动态NATnat address-group 1acl 2000rule permit source 网段通配符int s0/0/0outbound 2000 address-group 1 no patEasy IPacl 2000rule permit source 网段通配符int s 0/0/0nat outbound 2000NAT服务器int s 0/0/0ip addressnat server protocol tcp global 公网地址www inside 私网地址访问控制列表(ACL)基本ACLacl 2000rule deny source 网段通配符int g 0/0/0traffic-filter outbound acl 2000高级ACLacl 3000rule deny tcp source 源网段destination 目的网段destination-port eq端口号rule permit iptraffic-filter outbound acl 3000AAAaaaauthentication-scheme auth1 认证方案authentication-mode local 认证方式authorization-scheme auth2 授权方案authorization-mode local 授权方式domain域名authentication-scheme auth1authorization-scheme auth2aaalocal-user 用户名@域名password cipher 密码local-user 用户名@域名service-type telnetlocal-user 用户名@域名privilege level 3user-interface vty 0 4authentication-mode aaaIPSec VPNacl number 3000rule permit ip source 源网段destination 目的网段ipsec proposal 123esp authentication-algorithm sha1ipsec policy p1 10 manualsecurity acl 3000proposal 123tunnel remote 对端ip地址tunnel local 本段ip地址sa spi outbound esp 54321 出方向sa spi inbound esp 12345 进方向sa string-key outbound esp simple 密码sa string-key inbound esp simple 密码int g 0/0/0ipsec policy p1 接口调用GREint tunnel 0/0/1ip ad 虚拟地址tunnel-protocol gresource 源地址destination 目的地址ip router-static 目的网段掩码tunnel 0/0/1int tunnel 0/0/1keepalive period 3 启用keepalive检测功能dis ipsec statistics esp 查找GRE隧道是否加密。
为QuidWay交换机配置命令手册:1、开始建立本地配置环境,将主机的串口通过配置电缆与以太网交换机的Console 口连接。
在主机上运行终端仿真程序(如Windows的超级终端等),设置终端通信参数为:波特率为9600bit/s、8位数据位、1位停止位、无校验和无流控,并选择终端类型为VT100。
以太网交换机上电,终端上显示以太网交换机自检信息,自检结束后提示用户键入回车,之后将出现命令行提示符(如<Quidway>)。
键入命令,配置以太网交换机或查看以太网交换机运行状态。
需要帮助可以随时键入“?“2、命令视图(1)用户视图(查看交换机的简单运行状态和统计信息)<Quidway>:与交换机建立连接即进入(2)系统视图(配置系统参数)[Quidway]:在用户视图下键入system-view(3)以太网端口视图(配置以太网端口参数在系统视图下键入(4)VLAN视图(配置VLAN参数)[Quidway-Vlan1]:在系统视图下键入vlan 1(5)VLAN接口视图(配置VLAN和VLAN汇聚对应的IP接口参数)[Quidway-Vlan-interface1]:在系统视图下键入interface vlan-interface 1(6)本地用户视图(配置本地用户参数)[Quidway-luser-user1]:在系统视图下键入local-useruser1(7)用户界面视图(配置用户界面参数)[Quidway-ui0]:在系统视图下键入user-interface3、其他命令设置系统时间和时区<Quidway>clock time Beijing add 8设置交换机的名称[Quidway]sysname TRAIN-3026-1[TRAIN-3026-1]配置用户登录[Quidway]user-interface vty 0 4[Quidway-ui-vty0]authentication-mode scheme创建本地用户[Quidway]local-user huawei[Quidway-luser-huawei]password simple huawei[Quidway-luser-huawei] service-type telnet level 34、VLAN配置方法『配置环境参数』SwitchA端口属于VLAN2,属于VLAN3『组网需求』把交换机端口加入到VLAN2,加入到VLAN3数据配置步骤『VLAN配置流程』(1)缺省情况下所有端口都属于VLAN 1,并且端口是access端口,一个access端口只能属于一个vlan;(2)如果端口是access端口,则把端口加入到另外一个vlan的同时,系统自动把该端口从原来的vlan中删除掉;(3)除了VLAN1,如果VLAN XX不存在,在系统视图下键入VLAN XX,则创建VLANXX并进入VLAN视图;如果VLAN XX已经存在,则进入VLAN视图。
华为交换机基本配置命令详解1、配置文件相关命令[Quidway]display current-configuration 显示当前生效的配置[Quidway]display saved-configuration显示flash中配置文件,即下次上电启动时所用的配置文件reset saved-configuration 檫除旧的配置文件reboot 交换机重启display version 显示系统版本信息2、基本配置[Quidway]super password 修改特权用户密码[Quidway]sysname 交换机命名[Quidway]interface ethernet 1/0/1 进入接口视图[Quidway]interface vlan 1进入接口视图[Quidway-Vlan-interfacex]ip address 10.1.1.11 255.255.0.0配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1静态路由=网关3、telnet配置[Quidway]user-interface vty 0 4 进入虚拟终端[S3026-ui-vty0-4]authentication-mode password 设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple xmws123设置口令[S3026-ui-vty0-4]user privilege level 3 用户级别4、端口配置[Quidway-Ethernet1/0/1]duplex {half|full|auto} 配置端口工作状态[Quidway-Ethernet1/0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet1/0/1]flow-control 配置端口流控[Quidway-Ethernet1/0/1]mdi {across|auto|normal} 配置端口平接扭接[Quidway-Ethernet1/0/1]port link-type {trunk|access|hybrid} 设置端口工作模式[Quidway-Ethernet1/0/1]undo shutdown 激活端口[Quidway-Ethernet1/0/2]quit 退出系统视图5、链路聚合配置[DeviceA] link-aggregation group 1 mode manual 创建手工聚合组1[Qw_A] interface ethernet 1/0/1 将以太网端口Ethernet1/0/1加入聚合组1 [Qw_A-Ethernet1/0/1] port link-aggregation group 1[Qw_A-Ethernet1/0/1] interface ethernet 1/0/2 将以太网端口Ethernet1/0/1加入聚合组1[Qw_A-Ethernet1/0/2] port link-aggregation group 1[Qw_A] link-aggregation group 1 service-type tunnel # 在手工聚合组的基础上创建t unnel业务环回组。
华为认证系列教程HCNA-HNTD入门华为网络技术与设备实验指导书华为技术有限公司版权声明版权所有© 华为技术有限公司2016。
保留一切权利。
本书所有内容受版权法保护,华为拥有所有版权,但注明引用其他方的内容除外。
未经华为技术有限公司事先书面许可,任何人、任何组织不得将本书的任何内容以任何方式进行复制、经销、翻印、存储于信息检索系统或使用于任何其他任何商业目的。
版权所有侵权必究。
商标声明和其他华为商标均为华为技术有限公司的商标。
本文档提及的其他所有商标或注册商标,由各自的所有人拥有。
华为认证系列教程HCNA-HNTD华为网络技术与设备实验指导书第2.2版本华为认证体系介绍华为认证是华为凭借多年信息通信技术人才培养经验及对行业发展的深刻理解,基于ICT产业链人才职业发展生命周期,以学院化的职业技术认证为指引,搭载华为“云-管-端”融合技术,推出覆盖IP、IT、CT技术领域的认证体系,是业界唯一的ICT全技术领域认证体系。
基于IP、IT、CT技术,华为公司提供了工程师、资深工程师和专家三类技术认证等级,为ICT从业者提供了层次化的培训认证。
华为认证包括10个领域,12个技术方向的认证,是业界唯一覆盖ICT全技术领域的认证体系。
HCNA是对企业网络初级知识和技能的认证。
证明您具备配置和维护小型企业网络的能力。
HCNA认证考查工程师协助设计、部署小型企业网络和基本网络运维的能力。
目的是考察企业网络工程师使用华为网络设备搭建小型企业路由交换网络的能力,使之能承载基本的语音、无线、云、安全和存储等网络应用,满足企业对网络的使用需求。
HCNA定位于企业网络技术领域具备初级知识和技能水平的专业人士。
侧重于对初级企业网络技术的考察和认证。
具备HCNA 证书的工程师是公认的具备小型企业网络通用技术和基本设计能力的专业人士。
HCNP-R&S是对企业网络高级知识和技能的认证。
目的是帮助企业网络工程师使用华为网络设备搭建完整的中小型企业网络,并支撑企业所需的语音、无线、云、安全和存储等应用全面地集成到网络之中,满足企业各种应用对网络的使用需求,并提供较高的安全性、可用性和可靠性。
STP的基本配置SW1配置<Huawei><Huawei>sy<Huawei>system-view (进入全局模式)Enter system view, return user view with Ctrl+Z.[Huawei][Huawei]sy[Huawei]sysname SW1 (更改设备名称)[SW1][SW1]stp en[SW1]stp enable (打开STP)[SW1][SW1]stp mo[SW1]stp mode stp 进入stp 模式Info: This operation may take a few seconds. Please wait for a moment...done. [SW1] [SW1]stp pri[SW1]stp priority 0 (在STP模式下更改BID优先级)BID=Bridge ID(桥ID)[SW1][SW1]dis[SW1]display this (查询当前配置)#sysname SW1#stp mode stpstp instance 0 priority 0# cluster enable ntdp enable ndp enable#drop illegal-mac alarm# return[SW1][SW1]dis[SW1]display s[SW1]display stp (查询STP)------ [CIST Global Info][Mode STP]CIST Bridge :0 .4c1f-cc38-7c04 (桥ID 优先级和MAC)Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 CIST Root/ERPC :0 .4c1f-cc38-7c04 / 0CIST RegRoot/IRPC :0 .4c1f-cc38-7c04 / 0CIST RootPortId :0.0BPDU-Protection :DisabledTC or TCN received :7TC count per hello :0STP Converge Mode :NormalTime since last TC :0 days 0h:1m:1sNumber of TC :7Last TC occurred :GigabitEthernet0/0/2[Port1(Ethernet0/0/1)][DOWN]Port ProtocolPort RolePort PriorityPort Cost(Dot1T ):Enabled:Disabled Port:128:Config=auto / Active=200000000Designated Bridge/Port :0.4c1f-cc38-7c04 / 128.1Port Edged Point-to-point Transit Limit Protection Type:Config=default /Active=disabled :Config=auto / Active=false :147 packets/hello-time :NonePort STP Mode :MSTP Port Protocol Type :Config=auto / Active=dot1sBPDU EncapsulationPortTimesTC or TCN sendTC or TCN received:Config=stp / Active=stp :Hello 2s MaxAge 20s FwDly 15s RemHop 20 :0 :0 BPDU Sent :0TCN: 0, Config: 0, RST: 0, MST: 0BPDU Received :0TCN: 0, Config: 0, RST: 0, MST: 0--- [Port2(Ethernet0/0/2)][DOWN] ----Port Protocol TC or TCN send :0TC or TCN received :0 :EnabledPort Role:Disabled Port Port PriorityPort Cost(Dot1T )Designated Bridge/Port Port Edged Point-to-point Transit Limit :128 :Config=auto / Active=200000000 :0.4c1f-cc38-7c04/ 128.2 :Config=default / Active=disabled Protection Type Port STP ModePort Protocol TypeBPDU EncapsulationPortTimes TC or TCNsend TC or TCNreceived:Config=auto / Active=false :147packets/hello-time:None:MSTP :Config=auto / Active=dot1s :Config=stp / Active=stp :Hello 2s MaxAge 20s FwDly 15s RemHop 20 :0 :0 BPDU Sent :0 TCN: 0, Config: 0, RST: 0, MST: 0BPDU Received :0Port ProtocolPort RolePort PriorityPort Cost(Dot1T ):Enabled :Disabled Port :128 :Config=auto / Active=200000000 Port Edged Point-to-point Transit LimitProtection Type Port STP Mode PortProtocol Type:Config=default / Active=disabled :Config=auto / Active=false :147 packets/hello-time :None :MSTP :Config=auto / Active=dot1s PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 20TCN: 0, Config: 0, RST: 0, MST: 0[Port3(Ethernet0/0/3)][DOWN] ----Designated Bridge/Port :0.4c1f-cc38-7c04 / 128.3BPDU Encapsulation :Config=stp / Active=stpBPDU Sent :0TCN: 0, Config: 0, RST: 0, MST: 0[SW1][SW1]q<SW1><SW1>save (保存配置)The current configuration will be written to the device.Are you sure to continue?[Y/N]yInfo: Please input the ( *.cfg, *.zip ) [vrpcfg.zip]:Mar 15 2017 19:47:02-08:00 SW1 %%01CFM/4/SAVE(l)[0]:The user chose Y when decidi ng whether to save the configuration to the device.<SW1>SW2配置<Huawei><Huawei>sy<Huawei>system-viewEnter system view, return user view with Ctrl+Z. [Huawei][Huawei]sy[Huawei]sysname SW2[SW2][SW2]stp en[SW2]stp enable[SW2][SW2]stp mode st[SW2]stp mode stpInfo: This operation may take a few seconds. Please wait for a moment...done. [SW2] [SW2]stp pri[SW2]stp priority 4096[SW2][SW2]dis[SW2]display this# sysname SW2# stp mode stp stp instance 0 priority 4096# cluster enable ntdp enable ndp enable#drop illegal-mac alarm# return [SW2] [SW2] [SW2]dis[SW2]display st[SW2]display stp------ [CIST Global Info][Mode STP]CIST BridgeConfig TimesActive TimesCIST Root/ERPC CIST RegRoot/IRPC CIST RootPortId BPDU-Protection TC or TCN received TC count per hello :4096 .4c1f-cc3a-0520:Hello 2s MaxAge 20s FwDly 15s MaxHop 20 :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 :0 .4c1f-cc38-7c04 / 20000:4096 .4c1f-cc3a-0520 / 0:128.23:Disabled:42:0STP Converge Mode :NormalTime since last TC :0 days 0h:1m:41sNumber of TC Last TC occurred:10:GigabitEthernet0/0/1[Port1(Ethernet0/0/1)][DOWN]Port Protocol Port RolePort Priority Port Cost(Dot1T ):Enabled:Disabled Port:128:Config=auto / Active=200000000Designated Bridge/Port :4096.4c1f-cc3a-0520 / 128.1Port Edged Point-to-point Transit Limit Protection Type:Config=default /Active=disabled :Config=auto / Active=false :147 packets/hello-time :NoneSW3配置<Huawei>sy<Huawei>system-viewEnter system view, return user view with Ctrl+Z.[Huawei][Huawei]sy[Huawei]sysname SW3[SW3][SW3]stp en[SW3]stp enable[SW3][SW3]stp mo[SW3]stp mode st[SW3]stp mode stpInfo: This operation may take a few seconds. Please wait for a moment...done. [SW3] [SW3]stp pri[SW3]stp priority 8192[SW3][SW3]dis[SW3]display this# sysname SW3#stp mode stpstp instance 0 priority 8192#cluster enablentdp enablendp enable#drop illegal-mac alarm#return[SW3][SW3]q<SW3><SW3><SW3><SW3>saThe current configuration will be written to the device.Are you sure to continue?[Y/N]yInfo: Please input the ( *.cfg, *.zip ) [vrpcfg.zip]:Mar 15 2017 20:22:45-08:00 SW3 %%01CFM/4/SAVE(l)[0]:The user chose Y when decidi ng whether to save the configuration to the device.Now saving the current configuration to the slot 0.Save the configuration successfully.<SW3><SW3>。
用户视图<Huawei>?显示VRP版本<Huawei>display version系统视图<Huawei>system-view[Huawei]更改路由器名称[Huawei]sysname R1退出系统视图[Huawei]quitctr+Z查看命令后面的参数<R1>clock ?显示时间<R1>display clock设置时区<R1>clock timezone BJ add 08:00设置时间<R1>clock datetime 11:20:10 2017-12-09配置路由器接口[R1]interface Vlanif 1[R1-Vlanif1]ip address 192.168.80.254 255.255.255.0添加多个地址[R1-Vlanif1]ip address 192.168.8.252 24 sub查看接口配置[R1-Vlanif1]display this删除接口所有地址[R1-Vlanif1]undo ip address删除特定地址[R1-Vlanif1]undo ip address 192.168.8.252 24 sub关闭端口[R1-Vlanif1]shutdown启用接口[R1-Vlanif1]undo shutdown登录路由器的提示语[R1]header login information "This is officel Router"进去路由器的提示语[R1]header shell information "Welcome to Huawei router VRP lab" 配置Console口登录认证方式[R1]user-interface console ?[R1]user-interface console 0[R1-ui-console0]authentication-mode passwordPlease configure the login password (maximum length 6):huawei 重设密码[R1-ui-console0]set authentication password cipher 91xueit设置登录超时的时间[R1-ui-console0]idle-timeout 20[R1-ui-console0]display this设置用户级别为3[R1-ui-console0]user privilege level 3配置路由器允许telnet远程管理[R1]user-interface vty 0 ?[R1]user-interface vty 0 4[R1-ui-vty0-4]authentication-mode passwordPlease configure the login password (maximum length 16):51cto [R1-ui-vty0-4]idle-timeout 10设置telnet用户级别为2[R1-ui-vty0-4]user privilege level 2查看连接过来的用户[R1]display users查看全部用户接口[R1]display user-interface命令分级0 级网络诊断命令 ping tracert telnet 等1 级系统维护命令 display current-configuration2 级配置命令 sysname R13 级设计系统基本运行的命令文件系统 FTP 配置文件切换用户管理命令连接到路由器的用户分级0-15级0级别用户执行0级别命令1级别用户执行0、1级别命令2级别用户执行0、1、2级别命令3-15级别用户执行0、1、2、3级别的命令通过console口用户级别是3级通过telnet接口用户级别是0级恢复telnet默认用户级别[R11-ui-vty0-4]undo user privilege level使用用户名和密码验证用户 AAA身份验证AAA是验证、授权和记账(Authentication、Authorization、Accounting)三个英文单词han 用户级别1admin 用户级别3创建用户的命令[R11]aaa[R11-aaa]local-user admin password cipher privilege level 3 [R11-aaa]local-user admin service-type telnet创建一个用户级别是1的用户[R11-aaa]local-user han password cipher [R11-aaa]local-user han privilege level 1[R11-aaa]local-user han service-type telnet创建一个用户允许console连接[R11-aaa]local-user admin1 password cipher 91xueit@com privilege level 3 [R11-aaa]local-user admin service-type terminal显示创建的用户[R11-aaa]display local-user显示aaa的配置[R11-aaa]display this更改telnet接口身份验证模式为aaa[R11]user-interface vty 0 4[R11-ui-vty0-4]authentication-mode aaa查看连接过来的用户设置文件管理列出当前目录中的文件和文件夹<RA>dir创建文件夹<RA>dir flash:/backup/拷贝文件到backup目录<RA>copy vrpcfg.zip flash:/backup/vrpcfgbackup.zip将vrp1.zip移动到backup目录<RA>move vrp1.zip flash:/backup/vrp1.zip切换到backup目录<RA>cd backup/查看所在的目录<RA>pwdflash:/backup使用move在同一个目录下相当于重命名<RA>move vrp1.zip vrp2.zip重命名的命令<RA>rename vrp2.zip vrp3.zip删除文件,实质上放到回收站<RA>delete vrp2.zip还可以加参数看到删除的文件,带中括号的就是删除的文件<RA>dir /allDirectory of flash:/backup/Idx Attr Size(Byte) Date Time(LMT) FileName0 -rw- 787 Jan 09 2018 23:01:21 vrpcfgbackup.zip1 -rw- 783 Jan 09 2018 23:14:32 [vrp2.zip]恢复删除的文件<RA>undelete vrp2.zip彻底删除且不带提示不能恢复了<RA>delete /unreserved /force vrp2.zip清空回收站<RA>reset recycle-bin把flash中的文件备份到计算机TFTP服务UDP 69端口不可靠传输把flash中的文件上传到TFTP<RA>tftp 192.168.80.1 put flash:/vrpcfg.zip vrpcfg.zip把TFTP服务器上的文件下载到flash的backup目录<RA>tftp 192.168.80.1 get vrpcfg2.zip flash:/backup/vrpcfg2.zip把flash中的文件拷贝到FTPTCP的21端口支持身份验证可靠传输 TCP<RA>ftp 192.168.80.1User(192.168.80.1:(none)):hanlg从FTP下载[RA-ftp]get worklog.txt flash:/backup/worklog2.txt上传到FTP[RA-ftp]put vrpcfg.zip vrpcfg.zip设置系统启动文件设置系统启动文件<RA>startup system-software 指定保存配置的文件<RA>startup saved-configuration vrpcfg1.zip查看下次启动使用的系统文件和配置文件以及当前使用的系统文件和配置文件<RA>display startup重启路由器reboot实验1:静态路由<AR1>display ip routing-table[AR2]ip route-static 192.168.1.0 24 172.16.1.2跟踪数据包路径tracert 192.168.1.2显示全部路由[AR2]display ip routing-table只显示静态路由[AR2]display ip routing-table protocol static添加路由下一跳可以写到达目标网络的沿途中的地址删除路由[AR1]undo ip route-static 192.168.1.0 24[AR1]undo ip route-static 192.168.1.0 24 172.16.1.1[AR1]ip route-static 192.168.1.0 24 172.16.1.2点到点链路静态路由下一跳可以写出口AR1]ip route-static 192.168.1.0 24 Serial 2/0/0路由器上两张表路由表和转发表显示转发表[AR1]display fib添加到某个主机的静态路由[AR1]ip route-static 192.168.1.3 32 Serial 2/0/0网络规划和路由汇总CIDR可以汇总2个4个8个连续的子网全球最大的网段0.0.0.0 0.0.0.00.0.0.0/0默认路由[R1]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2[R1]ip route-static 0.0.0.0 0 10.0.0.2添加静态路由[AR1]ip route-static 172.16.1.0 24 172.16.0.2[AR1]ip route-static 172.16.1.0 255.255.255.0 172.16.0.2 显示全部路由[AR1]display ip routing-table只显示静态路由[AR1]display ip routing-table protocol static删除静态路由[AR1]undo ip route-static 172.16.1.0 24静态路由缺点网络中增加网段删除网段修改网段不会自动更新路由配置RIP协议[AR1]rip ?[AR1]rip 1[AR1-rip-1]network 192.168.0.0[AR1-rip-1]network 10.0.0.0显示RIP协议学到的路由<AR1>display ip routing-table protocol rip显示RIP协议学到的路由<AR4>display rip 1 route显示运行RIP协议的接口<AR4>display rip 1 interface查看RIP协议活动<AR4>terminal monitor<AR4>terminal debugging显示所有接口发送和接收的RIP包<AR4>debugging rip 1 packet只显示G0/0/0接口发送和接收的RIP包<AR4>debugging rip 1 packet GigabitEthernet 0/0/0关闭所有诊断输出<AR4>undo debugging all创建不连续子网实验环境删除配置文件<AR1>delete vrpcfg.zip重启路由<AR1>rebootny[Huawei]sysname AR1[AR1]vlan 2[AR1-vlan2]quit[AR1]port-group vlan2ports[AR1-port-group-vlan2ports]group-member Ethernet 0/0/4 to Ethernet 0/0/7 [AR1-port-group-vlan2ports]port link-type access[AR1-port-group-vlan2ports]port default vlan 2[AR1]interface Vlanif 2[AR1-Vlanif2]ip address 192.168.10.65 26[AR1-GigabitEthernet0/0/0]ip address 172.16.0.1 30[AR1]rip[AR1-rip-1]version 2[AR1-rip-1]network 192.168.10.0[AR1-rip-1]network 172.16.0.0默认时在有类网络的边界自动汇总,但可以关闭汇总。