H3C虚拟实验室实验命令汇总

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

H3C虚拟实验室实验命令汇总计算机命令~~~~~~~~~~PCAlogin:root;使用root用户password:linux;口令是linux#shutdown-hnow;关机#init0;关机#logout;用户注销#login;用户登录#ifconfig;显示IP地址#ifconfigeth0ipaddressnetmasknetmask;设置IP地址#ifconfigeht0ipaddressnetmasknetmaskdown;禁用IP地址#routeadd0.0.0.0gwip;设置网关#routedel0.0.0.0gwip;删除网关#routeadddefaultgwip;设置网关#routedeldefaultgwip;删除网关#route;显示网关#pingip;发ECHO包#telnetip;远程登录----------------------------------------交换机命令~~~~~~~~~~[Quidway]discur;显示当前配置[Quidway]displaycurrent-configuration;显示当前配置[Quidway]displayinterfaces;显示接口信息[Quidway]displayvlanall;显示路由信息[Quidway]displayversion;显示版本信息[Quidway]superpasswordsimplepassword;修改特权用户密码[Quidway]sysnamename;交换机命名[Quidway]interfaceethernet0/1;进入接口视图[Quidway]inte0/1;简写方式[Quidway]interfacevlan-interfacen;进入接口视图[Quidway]intvlann;简写方式,n6[Quidway-Vlan-interfacen]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;建立ftp用户[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/1]porttrunkpermitvlan{ID|All};设trunk允许的VLAN[Quidway-Ethernet0/1]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-portinterface;指定镜像端口[Quidway]portmirrorinterface;指定被镜像端口[Quidway]portmirrorif_listobserving-portifterface;指定镜像和被镜像例如:[Quidway]portmirrore0/1toe0/4observing-porte0/7;指定镜像和被镜像[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-vlannsecondarylist;设主vlan包括的子vlan[Quidway-Ethernet0/2]porthybridpvidvlanid;设置vlan的pvid[Quidway-Ethernet0/2]undoporthybridpvid;删除vlan的pvid[Quidway-Ethernet0/2]porthybridvlanvlan_id_listuntagged;设置无标识的vlan如果数据包的vlanid与PVId一致,则去掉vlan信息.默认PVID=1。所以设置PVID为所属vlanid,设置可以互通的vlan为untagged。----------------------------------------路由器命令~~~~~~~~~~[Quidway]displayversion;显示版本信息[Quidway]displaycurrent-configuration;显示当前配置[Quidway]displayinterfaces;显示接口信息[Quidway]displayiproute;显示路由信息[Quidway]sysnamehostname;更改主机名[Quidway]superpasswrodpassword;设置口令[Quidway]ints0/0;进入接口[Quidway-serial0/0]clockrate64000;设置同步时钟[Quidway-serial0/0]ipaddressipmask|mask_len;配置端口IP地址例:[Quidway-serial0/0]ipaddress10.65.1.1255.255.0.0;或[Quidway-serial0/0]ipaddress10.65.1.116;[Quidway-serial0/0]undoshutdown;激活端口[Quidway]link-protocolhdlc;绑定hdlc协议[Quidway]user-interfacevty04[Quidway-ui-vty0-4]authentication-modepassword[Quidway-ui-vty0-4]setauthentication-modepasswordsimple222[Quidway-ui-vty0-4]userprivilegelevel3[Quidway-ui-vty0-4]quit[Quidway]debugginghdlcallserial0;显示所有信息[Quidway]debugginghdlceventserial0;调试事件信息[Quidway]debugginghdlcpacketserial0;显示包的信息静态路由:[Quidway]iproute-staticipmask{interfacenumber|nexthop}[value][reject|blackhole]例如:[Quidway]iproute-static129.1.0.01610.0.0.2[Quidway]iproute-static129.1.0.0255.255.0.010.0.0.2[Quidway]iproute-static129.1.0.016Serial2[Quidway]iproute-static0.0.0.00.0.0.010.0.0.2动态路由:[Quidway]rip;设置动态路由[Quidway]ripwork;设置工作允许[Quidway]ripinput;设置入口允许[Quidway]ripoutput;设置出口允许[Quidway-rip]network10.0.0.0;设置交换路由网络[Quidway-rip]networkall;设置与所有网络交换[Quidway-rip]peerip-address;指定交换点[Quidway-rip]summary;路由聚合[Quidway]ripversion1;设置工作在版本1[Quidway]ripversion2multicast;设版本2,多播方式[Quidway-Ethernet0/0]ripsplit-horizon;水平分隔[Quidway]routeridA.B.C.D;配置路由器的ID[Quidway]ospfenable;启动OSPF协议[Quidway-ospf]import-routedirect;引入直联路由[Quidway-Serial0/0]ospfenableareaarea_id;配置OSPF区域标准访问列表命令格式如下:aclnumberacl-number[match-orderconfig|auto];默认前者顺序匹配。rule[normal|special]{permit|deny}sources_ips-wildcard|any]例:[Quidway]aclnumber2001[Quidway-acl-basic-2001]rulenormalpermitsource10.0.0.00.0.0.255[Quidway-acl-basic-2001]rulenormaldenysourceany扩展访问控制列表配置命令配置TCP/UDP协议的扩展访问列表:rule{normal|special}{permit|deny}{tcp|udp}source{ipwild|any}destinationipwild|any}[operate]配置ICMP协议的扩展访问列表:rule{normal|special}{permit|deny}icmpsource{ipwild|any]destination{ipwild|any][icmp-code][logging]扩展访问控制列表操作符的含义equalportnumber;等于greater-thanpo

1 / 7
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功