华为S5700基础配置命令以下配置中,红色字体是需要自定义的.#清除设备配置Quidwayresetsaved-configurationWarning:Theactionwilldeletethesavedconfigurationinthedevice.Theconfigurationwillbeerasedtoreconfigure.Continue?[Y/N]:YQuidwayrebootWarning:Alltheconfigurationwillbesavedtotheconfigurationfileforthenextstartup:flash:/vrpcfg.zip,Continue?[Y/N]:NSystemwillreboot!Continue?[Y/N]:Y#设置设备的名称为GSH-FZ-FrontQuidwaysystem-view[Quidway]sysnameQuidway#设置查看设备的时区,时间QuidwayclocktimezoneBJadd8Quidwayclockdatetime18:20:302012-02-08Quidwaydisplayclock#telnet远程登录Quidwaysystem-view[Quidway]aaa//////[Quidway-aaa]local-userccssoftpasswordcipherp@ssw0rdprivilegelevel15[Quidway-aaa]local-userccssoftpasswordsimpleccssoft[Quidway-aaa]local-userccssoftservice-typetelnet[Quidway-aaa]local-userccssoftprivilegelevel15//特权等级设置[Quidway-aaa]quit[Quidway]user-interfacevty04//设置5个虚拟终端,也就是说最多有5个终端同时连接[Quidway-vty0-4]authentication-modeaaa//验证方式设置[Quidway-ui-vty0-4]quit#ssh远程登录步骤1在服务器端生成本地密钥对Quidwaysystem-view[Quidway]sysnameSSHServer[SSHServer]rsalocal-key-paircreateThekeynamewillbe:Quidway_HostTherangeofpublickeysizeis(512~2048).NOTES:Ifthekeymodulusisgreaterthan512,Itwilltakeafewminutes.Inputthebitsinthemodulus[default=512]:768Generatingkeys..........++++++++++++..........++++++++++++...................................++++++++......++++++++步骤2在服务器端配置VTY用户界面[SSHServer]user-interfacevty04[SSHServer-ui-vty0-4]authentication-modeaaa[SSHServer-ui-vty0-4]protocolinboundssh[SSHServer-ui-vty0-4]quit说明若配置登录协议为SSH,则S5700设备将自动禁止Telnet功能。步骤3在服务器端配置SSH用户的用户名和密码[SSHServer]aaa[SSHServer-aaa]local-userclient001passwordcipherhuawei[SSHServer-aaa]local-userclient001privilegelevel3[SSHServer-aaa]local-userclient001service-typessh[SSHServer-aaa]quit步骤4使能STelent功能,并配置用户的服务类型为STelnet[SSHServer]stelnetserverenable[SSHServer]sshauthentication-typedefaultpassword#添加VLANQuidwaysystem-view[Quidway]vlan10[Quidway-vlan10]quit#改Vlan1IP:Quidwaysystem-view[Quidway]interfacevlanif1[Quidway]ipaddress192.168.1.200255.255.255.0#设定端口模式Quidwaysystem-view[Quidway]intgigabitethernet0/0/1[Quidway-GigabitEthernet0/0/1]portlink-typeaccess[Quidway-GigabitEthernet0/0/1]quit#将端口加入VlanQuidwaysystem-view[Quidway]vlan131[Quidway-vlan131]portgigabitethernet0/0/21to0/0/22[Quidway-Vlan131]quit#设置TrunkQuidwaysystem-view[Quidway]interfaceGigabitEthernet0/0/23[Quidway-GigabitEthernet0/0/23]portlink-typetrunk[Quidway-GigabitEthernet0/0/23]porttrunkallow-passvlan128131#设置STP|RSTP|MSTPQuidwaysystem-view[Quidway]stpmode{stp|rstp|mstp}[Quidway]stpenable#设置VLANIP(管理IP)Quidwaysystem-view[Quidway]interfacevlanif131[Quidway-Vlanif131]ipaddress192.168.0.253255.255.255.0[Quidway-Vlanif131]shutdown[Quidway-Vlanif131]undoshutdown#设置默认路由Quidwaysystem-view[Quidway]iproute-static0.0.0.00.0.0.0192.168.0.254#设定NTP(NetworkTimeProtocol)Quidwaysystem-view[Quidway]ntp-serviceunicast-peer192.168.0.254#关闭WEBServer,dhcpQuidwaysystem-view[Quidway]undohttpserverenable[Quidway]undodhcpenable#保存配置Quidwaysave#相关查看命令Quidwaydisplayversion//显示VRP版本号Quidwaydisplaysystname//显示设备名称Quidwaydisplaycurrent-configuration//显示系统运行配置信息Quidwaydisplaysaved-configuration//显示保存的配置信息Quidwaydisplayinterfacegigabitethernet0/0/1//查看接口配置是否正确Quidwaydisplayinterfacesbrief//显示接口配置信息Quidwaydisplaymac-address//查看设备上学习到的MAC表项以及MAC学习的源物理端口的对应关系Quidwaydisplayiprouting-table[X.X.X.X]//显示路由表Quidwaydisplayarp[|includeX.X.X.X]//查看设备上的arp信息Quidwaydisplaystpbrief//查看物理端口的二层协议状态QuidwaydisplaytrafficpolicystatisticsinterfaceGigabitEthernetX/X/Xinbound//查看物理端口X/X/X上入方向的流量统计信息结果QuidwaydisplaytrafficpolicystatisticsinterfaceGigabitEthernetX/X/Xoutbound查看物理端口X/X/X上出方向的流量统计信息结果#清除端口统计信息的命令是Quidwayresetcountersinterfacegigabitethernet0/0/11、执行resetcountersinterface[interface-type[interface-number]]命令,清除指定接口的统计信息。2、执行resetcountersif-mibinterface[interface-type[interface-number]]命令,清除网管的接口流量统计信息。3、执行resetstatistics-peakinterfaceinterface-typeinterface-number命令,清除接口的速率峰值记录。4、执行resetvirtual-cable-test{interface-typeinterface-number|all}命令,清除接口的电缆检测结果。#删除vlan,先删除3层口,再删除2层vlan[Quidway]undointerfaceVlanif20[Quidway]undovlan20#增加/删除静态路由[Quidway]iproute-static0.0.0.00.0.0.0192.168.0.254//命令用来配置静态路由,[Quidway]undoiproute-static0.0.0.00.0.0.0192.168.0.254//命令用来删除静态路由#开启http服务QuidwaydirDirectoryofflash:/IdxAttrSize(Byte)DateTimeFileName0-rw-955Feb09201216:16:09privat-data.txt1-rw-1089840Jan01197000:02:05S5700SI-V100R005C01SPC100.web2-rw-10215068Oct01200800:02:28S5700SI-V100R005C01SPC100.cc3-rw-626426Jan01197000:03:17s27_37_57-v100r005sph008.pat4-rw-12240Jan01197000:03:19$_patchstate_reboot5-rw-706Feb09201217:33:05vrpcfg.zip31,620KBtotal(19,928KBfree)Quidwaysystem-view[Quidway]httpserverloadS5700SI-V100R005C01SPC100.web.zip[Quidway]httpserverenable检测方法:浏览器打开:adminPwd:admin#重启[Quidway]reboot#流控自适应:Quidwaysystem-view[Quidway]interfaceg0/0/13[Quidway-GigabitEthernet0/0/13]flow-controlnegotiation打开千兆以太网接口的流量控制自协商功能[Quidway-GigabitEthernet0/0/13]displayinterfaceg0/0/13查看pause#端口使能、去使能Quidwaysystem-view[Quidway]in