华为交换机路由器常用命令

合集下载

华为路由器命令

华为路由器命令

华为华为路由器交换机配置命令大全一、计算机命令PCAlogin:root 使用root用户password:linux 口令是linux#shutdown-hnow 关机#init 0 关机#logout 用户注销#login 用户登录#ifconfig 显示IP地址# ifconfig eth0 <ip address> netmask掩码<netmask> 设置IP地址# ifconfig eht0 <ip address> netmask <netmask> down 禁用IP地址# route add 0.0.0.0 gw <ip> 设置网关# route del 0.0.0.0 gw <ip> 删除网关# route add default gw <ip> 设置网关# route del default gw <ip> 删除网关# route 显示网关# ping <ip> 发ECHO包# telnet <ip> 远程登录二、华为路由器交换机配置命令:交换机命令[Quidway]dis cur;显示当前配置[Quidway]display current-configuration;显示当前配置[Quidway]display interfaces;显示接口信息[Quidway]display vlan;显示vlan信息[Quidway]display version;显示版本信息[Quidway]super password;修改特权用户密码[Quidway]sysname;交换机命名[Quidway]interface ethernet0/1;进入接口视图[Quidway]interface vlan x;进入接口视图[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0;配置VLAN的IP地址[Quidway]Ip route-static 0.0.0.0 0.0.0.0 10.65.1.2;静态路由=网关[Quidway]rip;rip协议[Quidway]local-user ftp[Quidway]user-interface vty 0 4;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222;设置口令[S3026-ui-vty0-4]user privilege level 3;用户级别[Quidway]interface ethernet0/1;进入端口模式[Quidway]int e0/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]port access vlan 3;当前端口加入到VLAN[Quidway-Ethernet0/2]port trunk permit vlan{ID|All};设trunk允许的VLAN [Quidway-Ethernet0/3]port trunk pvid vlan 3;设置trunk端口的PVID[Quidway-Ethernet0/1]undo shutdown;激活端口[Quidway-Ethernet0/1]shutdown;关闭端口[Quidway-Ethernet0/1]quit;返回[Quidway]vlan3;创建VLAN[Quidway-vlan3]port ethernet0/1;在VLAN中增加端口[Quidway-vlan3]port e0/1;简写方式[Quidway-vlan3]port ethernet0/1 to ethernet0/4;在VLAN中增加端口[Quidway-vlan3]port e0/1 to e0/4;简写方式[Quidway]monitor-port;指定镜像端口[Quidway]port mirror;指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num;指定镜像和被镜像[Quidway]description string;指定VLAN描述字符[Quidway]description;删除VLAN描述字符[Quidway]display vlan[vlan_id];查看VLAN设置[Quidway]stp{enable|disable};设置生成树,默认关闭[Quidway]stp priority 4096;设置交换机的优先级[Quidway]stp root{primary|secondary};设置为根或根的备份[Quidway-Ethernet0/1]stp cost 200;设置交换机端口的花费[Quidway]link-aggregation e0/1 to e0/4 ingress|both;端口的聚合[Quidway]undo link-aggregation e0/1|all;始端口为通道号[SwitchA-vlanx]isolate-user-vlan enable;设置主vlan[SwitchA]isolate-user-vlan secondary;设置主vlan包括的子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan;设置vlan的pvid[Quidway-Ethernet0/2]port hybrid pvid;删除vlan的pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged;设置无标识的vlan 如果包的vlanid与PVId一致,则去掉vlan信息.默认PVID=1。

华为路由器交换机配置命令大全

华为路由器交换机配置命令大全

华为路由器交换机配置命令大全华为路由器交换机配置大全本文提供XXX路由器交换机的配置命令,包括计算机命令和交换机命令。

一、计算机命令以下是一些常用的计算机命令:shutdown-hnow;关机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 default gw;删除网关route;显示网关ping;发ECHO包;远程登录二、XXX路由器交换机配置命令以下是一些常用的XXX路由器交换机配置命令:Quidway]dis cur;显示当前配置Quidway]display n;显示当前配置Quidway]display interfaces;显示接口信息Quidway]display vlan;显示vlan信息Quidway]display n;显示版本信息Quidway]super password;修改特权用户密码Quidway]sysname;交换机命名Quidway]XXX;进入接口视图Quidway]interface vlan x;进入接口视图Quidway-Vlan-interface x]ip address 10.65.1.1 255.255.0.0;配置VLAN的IP地址Quidway]Ip route-static 0.0.0.0 0.0.0.0 10.65.1.2;静态路由=网关Quidway]rip;rip协议Quidway]local-user ftpQuidway]user-interface vty 0 4;进入虚拟终端S3026-ui-vty0-4]n-mode password;设置口令模式首先,这篇文章需要进行重新排版和编辑,以便更清晰地传达信息。

华为路由器交换机常用命令

华为路由器交换机常用命令

华为路由器交换机常用命令一、设备管理命令1.登录管理命令- ssh [ip地质] -p [端口号]:通过SSH协议登录设备。

- telnet [ip地质]:通过Telnet协议登录设备。

- logout:退出设备。

2.用户管理命令- display current-configuration:显示当前设备配置信息。

- save:保存当前配置。

- undo save:取消保存的配置。

- super:切换到超级用户模式。

- user-interface console 0:配置控制台终端的参数。

- user-interface vty 0 4:配置远程登录终端的参数。

3.设备操作命令- reboot:重启设备。

- reset saved-configuration:恢复出厂配置。

- display version:显示设备的硬件和软件版本信息。

- display device:显示设备的基本信息。

- display interface[接口名称]:显示指定接口信息。

- display ip routing-table:显示IP路由表信息。

二、网络配置命令1.IP配置命令- interface [接口名称]:进入指定接口。

- ip address [IP地质] [子网掩码]:配置接口IP地质。

- undo ip address:取消接口IP地质配置。

- ip route-static [目标网络] [子网掩码] [下一跳地质]:配置静态路由。

- undo ip route-static [目标网络] [子网掩码] [下一跳地质]:取消静态路由配置。

2.VLAN配置命令- vlan [VLAN ID]:创建指定VLAN。

- quit:退出VLAN配置模式。

- interface vlan [VLAN ID]:进入指定VLAN接口。

- ip address [IP地质] [子网掩码]:为VLAN接口配置IP地质。

(完整版)华为交换机命令大全

(完整版)华为交换机命令大全

华为交换机基本配置命令详解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业务环回组。

华为路由器和交换机的常用命令

华为路由器和交换机的常用命令

一. 端口:路由器——ethernet(以太口)、Serial(串口)、loopback(虚拟端口)交换机——ethernet、vlan、loopback注意:交换机默认其24个端口全在vlan 1里面,交换机在给vlan配了ip之后就具有路由器的功能了。

另一个需要注意的是,所用的端口是否被shutdown了,如果被shutdown 了,需要进入相应的端口执行undo shutdown。

二. 配置ip除了交换机的以太口不可以配置ip外,其他端口都可以,配置方法相同。

[Quidway] interface *(所要配置的端口,如vlan 1)[Quidway-*]ip add *.*.*.*(ip)*.*.*.*(掩码)/*(掩码位数,一般只在路由器上适用)—————————————————————————————————————1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]5.基于IOS的交换机的端口描述:switch(config-if)# description description-string基于CLI的交换机的端口描述:switch(enable)set port name module/number description-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex {auto|full|half}在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number {full|half}8.在基于IOS的交换机上配置静态VLAN:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate]10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式:switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]12. 在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time seconds` switch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf{ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name …30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行: router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令: router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中: router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的容。

思科华为全系列交换机路由器常用命令

思科华为全系列交换机路由器常用命令

思科华为全系列交换机路由器常用命令交换机/路由器配置综合复习交换机/路由器常用命令汇总本课内容交换机常用命令2交换机常用命令交换机常用命令31.交换机常用命令·>Enable进入特权模式·#E某it返回上一级操作模式·#End返回到特权模式·#writememory或copyrunning-configtartup-config保存配置文件·#delflah:config.te某t删除配置文件(交换机及1700系列路由器)·#delflah:vlan.dat删除Vlan配置信息(交换机)·(config)#hotnamewitchA配置设备名称4为witchA1.交换机常用命令·(config)#enableecretlevel10tar配置远程登陆密码为tar·(config)#enableecretlevel150tar配置特权密码为tar·Level1为普通用户级别,可选为1~15,15为最高权限级别;0表示密码不加密·(config)#enableerviceweb-erver开启交换机WEB管理功能·Service可选以下:web-erver(WEB管理)、telnet-erver(远程登陆)等51.交换机常用命令查看信息·#howrunning-config查看当前生效的配置信息·#howinterfacefatethernet0/3查看F0/3端口信息·#howinterfaceerial1/2查看S1/2端口信息·#howinterface查看所有端口信息·#howipinterfacebrief以简洁方式汇总查看所有端口信息·#howipinterface查看所有端口信息·#howverion查看版本信息61.交换机常用命令查看信息·#howmac-addre-table查看交换机当前MAC地址表信息·#howrunning-config查看当前生效的配置信息·#howvlan查看所有VLAN信息·#howvlanid10查看某一VLAN(如VLAN10)的信息·#howinterfacefatethernet0/1witchport查看某一端口模式(如F0/1)·#howaggregateport1ummary查看聚合端7口AG1的信息1.交换机常用命令查看信息·#howpanning-tree查看生成树配置信息·#howpanning-treeinterfacefatethernet0/1查看该端口的生成树状态·#howport-ecurity查看交换机的端口安全配置信息·#howport-ecurityaddre查看地址安全绑定配置信息·#howipacce-litlitname查看名为litname的列表的配置信息8·#howacce-lit1.交换机常用命令端口的基本配置·(config)#Interfacefatethernet0/3进入F0/3的端口配置模式·(config)#interfacerangefa0/1-2,0/5,0/7-9进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式·(config-if)#peed10配置端口速率为10M,可选10,100,auto91.交换机常用命令端口的基本配置·(config-if)#duple某full配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应)·(config-if)#nohutdown开启该端口·(config-if)#witchportaccevlan10将该端口划入VLAN10中,用于VLAN·(config-if)#witchportmodetrunk将该端口设为trunk模式,可选模式为acce,trunk·(config-if)#port-group1将该端口划入聚合端口AG1中,用于聚合端口101.交换机常用命令聚合端口的创建·(config)#interfaceaggregateport1创建聚合接口AG1·(config-if)#witchportmodetrunk配置并保证AG1为trunk模式·(config)#intf0/23-24·(config-if-range)#port-group1将端口(端口组)划入聚合端口AG1中111.交换机常用命令生成树·(config)#panning-tree开启生成树协议·(config)#panning-treemodetp指定生成树类型为tp可选模式tp,rtp,mtp·(config)#panning-treepriority4096设置交换机的优先级为4096,优先级值小为高。

华三华为交换机路由器配置常用命令汇总

华三华为交换机路由器配置常用命令汇总

H3C交换机配置命令大全1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、 language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、 port link-type Access|Trunk|Hybrid 设置端口访问模式7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、 port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器配置命令大全1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、 language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 ip route-H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、 language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行, 粘贴到主机;5、交换机清除配置 :<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误;8、设备命名规则:地名-设备名-系列号例:PingGu-R-S3600H3C华为交换机端口绑定基本配置2008-01-22 13:401,端口 MACaAM命令使用特殊的AM User-bind命令,来完成MAC地址与端口之间的绑定;例如:SwitchAam user-bind mac-address 00e0-fc22-f8d3 interface Ethernet 0/1配置说明:由于使用了端口参数,则会以端口为参照物,即此时端口E0/1只允许PC1上网,而使用其他未绑定的MAC地址的PC机则无法上网;但是PC1使用该MAC地址可以在其他端口上网;bmac-address命令使用mac-address static命令,来完成MAC地址与端口之间的绑定;例如:SwitchAmac-address static 00e0-fc22-f8d3 interface Ethernet 0/1 vlan 1 SwitchAmac-address max-mac-count 0配置说明:由于使用了端口学习功能,故静态绑定mac后,需再设置该端口mac学习数为0,使其他PC接入此端口后其mac地址无法被学习;2,IP MACaAM命令使用特殊的AM User-bind命令,来完成IP地址与MAC地址之间的绑定;例如:配置说明:以上配置完成对PC机的IP地址和MAC地址的全局绑定,即与绑定的IP 地址或者MAC地址不同的PC机,在任何端口都无法上网;支持型号:S3026E/EF/C/G/T、S3026C-PWR、E026/E026T、S3050C、E050、S3526E/C/EF、S5012T/G、S5024Gbarp命令使用特殊的arp static命令,来完成IP地址与MAC地址之间的绑定;例如:配置说明:以上配置完成对PC机的IP地址和MAC地址的全局绑定;3,端口 IP MAC使用特殊的AM User-bind命令,来完成IP、MAC地址与端口之间的绑定;例如:SwitchAa配置说明:可以完成将PC1的IP地址、MAC地址与端口E0/1之间的绑定功能;由于使用了端口参数,则会以端口为参照物,即此时端口E0/1只允许 PC1上网,而使用其他未绑定的IP地址、MAC地址的PC机则无法上网;但是PC1使用该IP地址和MAC地址可以在其他端口上网;S2016-E1-Ethernet0/1mac-address max-mac-count 0;进入到端口,用命令mac max-mac-count 0端口mac学习数设为0S2016-E1mac static 0000-9999-8888 int e0/1 vlan 10;将0000-9999-8888绑定到e0/1端口上,此时只有绑定mac的pc可以通过此口上网,同时E0/1属于vlan 10就这样,ok了,不过上面两个命令顺序不能弄反,除非端口下没有接pcdis vlan 显示vlanname text 指定当前vlan的名称undo name 取消h3c vlan 2h3c-vlan2name test vlandis users 显示用户dis startup 显示启动配置文件的信息dis user-interface 显示用户界面的相关信息dis web users 显示web用户的相关信息; header login 配置登陆验证是显示信息header shellundo headerlock 锁住当前用户界面acl 访问控制列表 acl number inbound/outbound h3cuser-interface vty 0 4h3c-vty0-4 acl 2000 inboundshutdown:关闭vlan接口undo shutdown 打开vlan接口关闭vlan1 接口h3c interface vlan-interface 1h3c-vlan-interface shutdownvlan vlan-id 定义vlanundo valn vlan-iddisplay ip routing-tabledisplay ip routing-table protocol staticdisplay ip routing-table statisticsdisplay ip routing-table verbose 查看路由表的全部详细信息interface vlan-interface vlan-id 进入valnmanagement-vlan vlan-id 定义管理vlan号reset ip routing-table statistics protocol all 清除所有路由协议的路由信息.display garp statistics interface GigabitEthernet 1/0/1 显示以太网端口上的garp统计信息display voice vlan status 查看语音vlan状态h3c-GigabitEthernet1/0/1 broadcast-suppression 20 允许接受的最大广播流量为该端口传输能力的20%.超出部分丢弃.h3c-GigabitEthernet1/0/1 broadcast-suppression pps 1000 每秒允许接受的最大广播数据包为1000传输能力的20%.超出部分丢弃.display interface GigabitEthernet1/0/1 查看端口信息display brief interface GigabitEthernet1/0/1 查看端口简要配置信息display loopback-detection 用来测试环路测试是否开启display transceiver-information interface GigabitEthernet1/0/50 显示光口相关信息duplex auto/full/halfh3cinterface GigabitEthernet1/0/1h3c-GigabitEthernet1/0/1duplux auto 设置端口双工属性为自协商port link-type access/hybrid/trunk 默认为accessport trunk permit vlan all 将trunk扣加入所有vlan中reset counters interface GigabitEthernet1/0/1 清楚端口的统计信息speed auto 10/100/1000display port-security 查看端口安全配置信息display arp 显示arpdisplay am user-bind 显示端口绑定的配置信息display mac-address 显示交换机学习到的mac地址display stp 显示生成树状态与统计信息h3c-GigabitEthernet1/0/1stp instance 0 cost 200 设置生成树实例0上路径开销为200stp cost 设置当前端口在指定生成树实例上路径开销;instance-id 为0-16 0表cist 取值范围1-200000<h3c> display system-guard ip-record 显示防攻击记录信息.system-guard enable 启用系统防攻击功能display icmp statistics icmp流量统计display ip socketdisplay ip statisticsdisplay acl allacl number acl-number match-order auto/configacl-number 2000-2999 是基本acl 3000-3999是高级acl为管理员预留的编号rule deny/permit protocal访问控制h3c acl number 3000h3c-acl-adv-3000rule deny cos 3 souce 00de-bbef-adse ffff-ffff-fff dest 00 ffff-ffff-ffff 禁止mac地址00de-bbef-adse发送到mac地址00且优先级为3的报文通过display qos-interface GigabitEthernet1/0/1 traffic-limit 查看端口上流量端口速率限制line-rate inbound/outbound target-rateinbound:对端口接收报文进行速率限制outbound: 对端口发送报文进行速率限制target-rate 对报文限制速率,单位kbps 千兆口inbound范围1-1000000 outbound范围20-1000000undo line-rate取消限速.h3cinterface GigabitEthernet1/0/1h3c-GigabitEthernet1/0/1line-rate outbound 128 限制出去速率为128kbpsdisplay arp | include 77display arp count 计算arp表的记录数display ndp 显示交换机端口的详细配置信息;display ntdp device-list verbose 收集设备详细信息display lockdisplay usersdisplay cpudisplay memorydisplay fandisplay devicedisplay power华为交换机常用配置实例这里使用的H3C交换机是H126A,仅仅只做了最基本的配置以满足使用;配置中可以通过display current-configura命令来显示当前使用的配置内容;配置VLAN 1<Sysname>system-viewSystem View: return to User View with Ctrl+Z.Sysnamevlan 1Sysname-vlan1 quitSysnamemanagement-vlan 1Sysnameinterface Vlan-interface 1显示VLAN 接口1 的相关信息;<Sysname> display ip interface Vlan-interface 1创建VLANH3C不支持cisco的VTP,所以只能添加静态VLAN<H3C_TEST>system-viewSystem View: return to User View with Ctrl+Z.H3C_TESTvlan 99H3C_TEST-vlan99name seicofficeH3C_TEST-vlan99quit把交换机的端端口划分到相应的Vlan中H3C_TESTinterface ethernet1/0/2 Sysnamelocal-user h3c New local user added.Sysname-luser-h3cservice-type telnet level 3Sysname-luser-h3cpassword simple h3c配置欢迎信息H3C_TESTheader login %Welcome to login h3c%配置用户认证方式telnetvty 0-4H3C_TESTuser-interface vty 0 4H3C_TEST-ui-vty0-4authentication-mode schemeH3C_TEST-ui-vty0-4protocol inbound telnetH3C_TEST-ui-vty0-4super authentication-mode super-passwordH3C_TEST-ui-vty0-4quitH3C_TESTsuper password level 3 simple h3c//用户登陆后提升权限的密码配置Radius策略H3C_TESTradius scheme radius1New Radius schemeHH3C_TEST-radius-radius1timer 5H3C_TEST-radius-radius1key authentication h3cH3C_TEST-radius-radius1key accounting h3cH3C_TEST-radius-radius1server-type extendedH3C_TEST-radius-radius1user-name-format without-domain配置域H3C_TESTdomain h3cH3C_TEST-isp-h3cauthentication radius-scheme radius1 localH3C_TEST-isp-h3cscheme radius-scheme radius1 localH3C_TESTdomain default enable h3c配置在远程认证失败时,本地认证的keyH3C交换机路由器telnet和console口登录配置2009年11月09日星期一 10:00级别说明Level 名称命令0参观ping、tracert、telnet1监控display、debugging2配置所有配置命令管理级的命令除外3管理文件系统命令、FTP命令、TFTP命令、XMODEM命令telnet仅用密码登录,管理员权限Routeruser-interface vty 0 4Router-ui-vty0-4user privilege level3Router-ui-vty0-4set authentication password simple abctelnet仅用密码登录,非管理员权限Routersuper password level 3 simplesuperRouteruser-interface vty 0 4Router-ui-vty0-4user privilege level 1Router-ui-vty0-4set authentication password simple abctelnet使用路由器上配置的用户名密码登录,管理员权限Routerlocal-user admin password simple adminRouterlocal-user admin service-type telnetRouterlocal-user admin level 3Routeruser-interface vty 04Router-ui-vty0-4authentication-mode localtelnet使用路由器上配置的用户名密码登录,非管理员权限Routersuper password level 3 simple superRouterlocal-user manage password simple manageRouterlocal-user manage service-type telnetRouterlocal-user manage level2Routeruser-interface vty 0 4Router-ui-vty0-4authentication-mode local 对console口设置密码,登录后使用管理员权限Routeruser-interface con0Router-ui-console0user privilege level 3Router-ui-console0set authentication password simple abc对console口设置密码,登录后使用非管理员权限Routersuper password level 3 simple superRouteruser-interface con 0Router-ui-console0user privilege level 1Router-ui-console0set authentication password simple abc对console口设置用户名和密码,登录后使用管理员权限Routerlocal-user admin password simple adminRouterlocal-user admin service-type terminalRouterlocal-user admin level 3Routeruser-interface con 0Router-ui-console0authentication-mode local对console口设置用户名和密码,登录后使用非管理员权限Routersuper password level 3 simple superRouterlocal-user manage password simple manageRouterlocal-user manage service-type terminalRouterlocal-user manage level 2Routeruser-interface con0Router-ui-console0authentication-mode localsimple 是明文显示,cipher 是加密显示路由器不设置telnet登录配置时,用户无法通过telnet登录到路由器上Router-ui-vty0-4acl 2000 inbound可以通过acl的规则只允许符合条件的用户远程登录路由器华为路由器ospf enable 启动OSPF协议Quidway-ospfimport-route direct 引入直联路由Quidway-Serial0ospf enable area <area_id> 配置OSPF区域标准访问列表命令格式如下:acl <acl-number> match-order config|auto 默认前者顺序匹配;rule normal|special{permit|deny} source source-addr source-wildcard|any例:Quidwayacl 10Quidway-acl-10rule normal deny source any扩展访问控制列表配置命令配置TCP/UDP协议的扩展访问列表:rule {normal|special}{permit|deny}{tcp|udp}source {<ip wild>|any}destination <ip wild>|any}operate配置ICMP协议的扩展访问列表:rule {normal|special}{permit|deny}icmp source {<ip wild>|anydestination {<ip wild>|anyicmp-code logging扩展访问控制列表操作符的含义equal portnumber 等于greater-than portnumber 大于less-than portnumber 小于not-equal portnumber 不等range portnumber1 portnumber2 区间扩展访问控制列表举例Quidwayacl 101Quidway-acl-101rule deny souce any destination anyQuidway-acl-101rule permit icmp source any destination any icmp-type echoQuidway-acl-101rule permit icmp source any destination any icmp-type echo-replyQuidwayacl 102Quidway-acl-102rule deny ip source any destination anyQuidwayacl 103Quidwayfirewall enableQuidwayfirewall default permit|denyQuidwayint e0Quidway-Ethernet0firewall packet-filter 101 inbound|outbound地址转换配置举例Quidwayfirewall enableQuidwayfirewall default permitQuidwayacl 101Quidway-acl-101rule deny ip source any destination any Quidway-acanyQuidwayacl 1021024Quidway-Ethernet0firewall packet-filter 101 inboundQuidway-Serial0firewall packet-filter 102 inboundQuidwayacl 1Quidway-acl-1rule deny source anyQuidway-acl-1int serial 0Quidway-Serial0nat outbound 1 address-group pool1Quidway-Serial0nat server global PPP验证:主验方:pap|chapQuidwaylocal-user u2 password {simple|cipher} aaaQuidwayinterface serial 0Quidway-serial0ppp authentication-mode {pap|chap}Quidway-serial0ppp chap user u1 //pap时,不用此句pap被验方:Quidwayinterface serial 0 Quidway-serial0ppp pap local-user u2 password {simple|cipher} aaachap被验方:Quidwayinterface serial 0 Quidway-serial0ppp chap user u1 Quidway-serial0local-user u2 password {simple|cipher} aaa。

H3C 华为交换机-路由器配置常用命令

H3C 华为交换机-路由器配置常用命令

H3C华为交换机常用命令大全1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器配置命令大全1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

华为交换机路由器常用命令华为交换机路由器常用命令网络技术/wangzhijun1743 发表于2007-03-24, 12:25交换机命令[Quidway]dis cur ;显示当前配置[Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息[Quidway]display vlan all ;显示路由信息[Quidway]display version ;显示版本信息[Quidway]super password ;修改特权用户密码[Quidway]sysname ;交换机命名[Quidway]interface ethernet 0/1 ;进入接口视图[Quidway]interface vlan x ;进入接口视图[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的I P地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Quidway]rip ;三层交换支持[Quidway]local-user ftp[Quidway]user-interface vty 0 4 ;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password ;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令[S3026-ui-vty0-4]user privilege level 3 ;用户级别[Quidway]interface ethernet 0/1 ;进入端口模式[Quidway]int e0/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]port link-type {trunk|access|hybrid} ;设置端口工作模式[Quidway-Ethernet0/1]port access vlan 3 ;当前端口加入到VLA N[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN[Quidway-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的P VID[Quidway-Ethernet0/1]undo shutdown ;激活端口[Quidway-Ethernet0/1]shutdown ;关闭端口[Quidway-Ethernet0/1]quit ;返回[Quidway]vlan 3 ;创建VLAN[Quidway-vlan3]port ethernet 0/1 ;在VLAN中增加端口[Quidway-vlan3]port e0/1 ;简写方式[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口[Quidway-vlan3]port e0/1 to e0/4 ;简写方式[Quidway]monitor-port <interface_type interface_num> ;指定镜像端口[Quidway]port mirror <interface_type interface_num> ;指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像[Quidway]description string ;指定VLAN描述字符[Quidway]description ;删除VLAN描述字符[Quidway]display vlan [vlan_id] ;查看VLAN设置[Quidway]stp {enable|disable} ;设置生成树,默认关闭[Quidway]stp priority 4096 ;设置交换机的优先级[Quidway]stp root {primary|secondary} ;设置为根或根的备份[Quidway-Ethernet0/1]stp cost 200 ;设置交换机端口的花费[Quidway]link-aggregation e0/1 to e0/4 ingress|both ;端口的聚合[Quidway]undo link-aggregation e0/1|all ; 始端口为通道号[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan [SwitchA]isolate-user-vlan <x> secondary <list> ;设置主vlan包括的子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan <id> ;设置vlan的pv id[Quidway-Ethernet0/2]port hybrid pvid ;删除vlan的pvid [Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。

所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.----------------------------------------路由器命令~~~~~~~~~~[Quidway]display version ;显示版本信息[Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息[Quidway]display ip route ;显示路由信息[Quidway]sysname aabbcc ;更改主机名[Quidway]super passwrod 123456 ;设置口令[Quidway]interface serial0 ;进入接口[Quidway-serial0]ip address <ip> <mask|mask_len> ;配置端口IP 地址[Quidway-serial0]undo shutdown ;激活端口[Quidway]link-protocol hdlc ;绑定hdlc协议[Quidway]user-interface vty 0 4[Quidway-ui-vty0-4]authentication-mode password[Quidway-ui-vty0-4]set authentication-mode password simple 222 [Quidway-ui-vty0-4]user privilege level 3[Quidway-ui-vty0-4]quit[Quidway]debugging hdlc all serial0 ;显示所有信息[Quidway]debugging hdlc event serial0 ;调试事件信息[Quidway]debugging hdlc packet serial0 ;显示包的信息静态路由:[Quidway]ip route-static <ip><mask>{interface number|nexthop}[value][r eject|blackhole]例如:[Quidway]ip route-static 129.1.0.0 16 10.0.0.2[Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2[Quidway]ip route-static 129.1.0.0 16 Serial 2[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2动态路由:[Quidway]rip ;设置动态路由[Quidway]rip work ;设置工作允许[Quidway]rip input ;设置入口允许[Quidway]rip output ;设置出口允许[Quidway-rip]network 1.0.0.0 ;设置交换路由网络[Quidway-rip]network all ;设置与所有网络交换[Quidway-rip]peer ip-address ;[Quidway-rip]summary ;路由聚合[Quidway]rip version 1 ;设置工作在版本1 [Quidway]rip version 2 multicast ;设版本2,多播方式[Quidway-Ethernet0]rip split-horizon ;水平分隔[Quidway]router id A.B.C.D ;配置路由器的ID [Quidway]ospf enable ;启动OSPF协议[Quidway-ospf]import-route direct ;引入直联路由[Quidway-Serial0]ospf enable area <area_id> ;配置OSPF区域标准访问列表命令格式如下:acl <acl-number> [match-order config|auto] ;默认前者顺序匹配。

rule [normal|special]{permit|deny} [source source-addr source-wildcard|an y]例:[Quidway]acl 10[Quidway-acl-10]rule normal permit source 10.0.0.0 0.0.0.255[Quidway-acl-10]rule normal deny source any扩展访问控制列表配置命令配置TCP/UDP协议的扩展访问列表:rule {normal|special}{permit|deny}{tcp|udp}source {<ip wild>|any}destin ation <ip wild>|any}[operate]配置ICMP协议的扩展访问列表:rule {normal|special}{permit|deny}icmp source {<ip wild>|any]destination {<ip wild>|any][icmp-code] [logging]扩展访问控制列表操作符的含义equal portnumber ;等于greater-than portnumber ;大于less-than portnumber ;小于not-equal portnumber ;不等range portnumber1 portnumber2 ;区间扩展访问控制列表举例[Quidway]acl 101[Quidway-acl-101]rule deny souce any destination any[Quidway-acl-101]rule permit icmp source any destination any icmp-type e cho[Quidway-acl-101]rule permit icmp source any destination any icmp-type e cho-reply[Quidway]acl 102[Quidway-acl-102]rule permit ip source 10.0.0.1 0.0.0.0 destination 202.0.0.1 0.0.0.0[Quidway-acl-102]rule deny ip source any destination any[Quidway]acl 103[Quidway-acl-103]rule permit tcp source any destination 10.0.0.1 0.0.0.0 d estination-port equal ftp[Quidway-acl-103]rule permit tcp source any destination 10.0.0.2 0.0.0.0 d estination-port equal www[Quidway]firewall enable[Quidway]firewall default permit|deny[Quidway]int e0[Quidway-Ethernet0]firewall packet-filter 101 inbound|outbound地址转换配置举例[Quidway]firewall enable[Quidway]firewall default permit[Quidway]acl 101 ;内部指定主机可以进入e0[Quidway-acl-101]rule deny ip source any destination any[Quidway-acl-101]rule permit ip source 129.38.1.1 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.2 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.3 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.4 0 destination any [Quidway-acl-101]quit[Quidway]int e0[Quidway-Ethernet0]firewall packet-filter 101 inbound[Quidway]acl 102 ;外部特定主机和大于1024端口的数据包允许进入S0[Quidway-acl-102]rule deny ip source any destination any[Quidway-acl-102]rule permit tcp source 202.39.2.3 0 destination 202.38.1 60.1 0[Quidway-acl-102]rule permit tcp source any destination 202.38.160.1 0 de stination-port great-than1024[Quidway-acl-102]quit[Quidway]int s0[Quidway-Serial0]firewall packet-filter 102 inbound ;设202.38.160.1是路由器出口IP。

相关文档
最新文档