华为交换机指令大全
华为交换机指令大全
![华为交换机指令大全](https://img.taocdn.com/s3/m/7de3ae6a5a8102d276a22fdb.png)
交换机命令~~~~~~~~~~[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的IP地址[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 ;当前端口加入到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]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的pvid [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。
华为路由器交换机配置命令大全
![华为路由器交换机配置命令大全](https://img.taocdn.com/s3/m/58e3835c7f21af45b307e87101f69e314332fa88.png)
华为路由器交换机配置命令大全华为路由器交换机配置大全本文提供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;设置口令模式首先,这篇文章需要进行重新排版和编辑,以便更清晰地传达信息。
华为交换机配置命令大全
![华为交换机配置命令大全](https://img.taocdn.com/s3/m/ea1f9da1988fcc22bcd126fff705cc1755275fd9.png)
华为交换机配置命令大全华为交换机是一种高性能、高可靠的数据通信设备,广泛应用于各种网络环境中。
为了更好地使用华为交换机,我们需要了解一些基本的配置命令。
本文将为大家详细介绍华为交换机的配置命令大全,帮助大家更好地了解和使用华为交换机。
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。
```。
华为路由器交换机常用命令
![华为路由器交换机常用命令](https://img.taocdn.com/s3/m/e0abb53678563c1ec5da50e2524de518964bd31d.png)
华为路由器交换机常用命令一、设备管理命令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地质。
华为交换机命令大全
![华为交换机命令大全](https://img.taocdn.com/s3/m/38ed0ff9fab069dc50220183.png)
1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string
2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录口令: switch(enable) set password switch(enable)tch(enable) set spantree portcost moudle/port cost switch(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}priority switch(enable) set spantree portvlanpri {module/port}priority [vlans] 17. 在基于IOS的交换机上修改STP时钟: switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(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-name 21. 为了从一条中继链路上删除VLAN,可使用下列命令: switch(enable) clear trunk module/port vlan-range 22. 用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-num 26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口: switch(enable) set vlan vlan-num mod-num/port-num 27. 命令show spantree显示一个交换机端口的STP状态. 28. 配置一个ELAN的LES和BUS,可以使用下列命令: ATM (config)# interface atm number.subint multioint
(完整版)华为交换机命令大全
![(完整版)华为交换机命令大全](https://img.taocdn.com/s3/m/e6ffa3610975f46527d3e1fd.png)
华为交换机基本配置命令详解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业务环回组。
华为交换机日常维护命令收集(全)
![华为交换机日常维护命令收集(全)](https://img.taocdn.com/s3/m/92400714ccbff121dc368312.png)
华为交换机日常维护查看命令
1.dis device 用来查看设备信息
2.dis interface 用来查看接口信息
3.dis version 用来查看版本信息
4.slot-id 用来查看某一单板、电子标签的信息
5.dis env 用来查看设备的温度
6.dis cpu 用来查看cpu的信息
7.dis memory 用来查看内存的信息
8.dis interface 用来查看接口的信息
9.terminal monitor 终端信息显示功能
10.terminal debug 使终端现实调试信息
11.temperature threshold 设置温度的告警值
12. display diagnostic-information 显示诊断信息
13. display ip routing-table 显示路由信息
14.display current-configuration 显示系统当前配置
15. display saved-configuration 显示系统保存配置
16.display vlan 显示VLAN信息
17.display stp 显示生成树信息
18.display arp 显示ARP信息表
19.display mac-address 显示MAC地址表
20.display log 显示系统日志
21.display clock 显示系统时钟
22. display ip int brief 查看三层接口汇总信息。
华为交换机常用命令
![华为交换机常用命令](https://img.taocdn.com/s3/m/bb46008708a1284ac85043d7.png)
1.进入管理界面:system-view2.设置用户登录时需要进行口令验证,且验证口令为huawei。
[Quidway] user-interface 0[Quidway-ui0] authentication-mode password[Quidway-ui0] set authentication password simple huawei3. 设置从用户界面登录后可以访问的命令级别: user privilege level level恢复从用户界面登录后可以访问的命令级别为缺省级别: undo user privilege level4.系统IP配置:a.创建并进入管理VLAN接口视图:interface vlan-interface vlan-id删除管理VLAN :undo interface vlan-interface vlan-idb.配置管理VLAN接口IP地址:ip address ip-address net-mast删除管理VLAN接口IP地址:undo ip address [ip-address net-mast]5. 进入Ethernet0/1以太网端口视图。
[Quidway] interface ethernet0/16. 配置端口Ethernet0/1为Trunk端口,并允许2、6到50、100等VLAN通过。
[Quidway-Ethernet0/1] port link-type trunk[Quidway-Ethernet0/1] port trunk permit vlan 2 6 to 50 100创建VLAN 100。
[Quidway] vlan 100配置端口Ethernet0/1的缺省VLAN ID为100。
[Quidway-Ethernet0/1] port trunk pvid vlan 1007. 创建VLAN并进入VLAN视图: vlan vlan_id删除已创建的VLAN: undo vlan{ vlan_id [ to vlan_id ] | all }8. 为指定的VLAN增加以太网端口: port interface_list删除指定的VLAN的某些以太网端口: undo port interface_list创建VLAN2并进入其视图。
华为交换机命令大全
![华为交换机命令大全](https://img.taocdn.com/s3/m/608ce9edf61fb7360b4c6561.png)
华为交换机基本配置命令详解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业务环回组。
华为交换机 配置命令大全
![华为交换机 配置命令大全](https://img.taocdn.com/s3/m/5be4f613866fb84ae45c8d90.png)
交换机命令---华为路由器配置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 netmaskbroadcast-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/number switch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-num switch(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-listswitch(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-name switch(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-rangemode{on|off|desirable|auto}15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] costcost在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/portcostswitch(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}priority switch(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-name 29. 配置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-number router(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/port router(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 multipointrouter(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高速缓存区的内容。
华为路由器交换机配置命令大全
![华为路由器交换机配置命令大全](https://img.taocdn.com/s3/m/9af8c00f5b8102d276a20029bd64783e09127d8b.png)
华为路由器交换机配置命令大全华为路由器交换机配置命令大全一、登录与认证命令1.Telnet 登录命令2.SSH 登录命令3.Console 登录命令4.用户认证命令二、设备管理命令1.设备信息查看命令2.设备参数配置命令3.设备重启命令4.设备保存配置命令三、接口配置命令1.查看接口状态命令2.配置接口描述命令3.配置接口IP地质命令4.配置接口MTU命令5.开启/关闭接口命令四、路由配置命令1.配置静态路由命令2.配置默认路由命令3.配置动态路由命令4.查看路由表命令5.清空路由表命令五、VLAN 配置命令1.配置VLAN命令2.配置端口VLAN命令3.配置VLAN接口命令六、交换机功能配置命令1.配置端口镜像命令2.配置链路聚合命令3.配置交换机端口安全命令4.配置交换机QoS命令七、安全配置命令1.配置访问控制列表命令2.配置NAT命令3.配置防火墙命令4.配置SSL VPN命令附录:附件:1.示例配置文件2.常见问题解答法律名词及注释:1.Telnet:一种远程登录协议,用于远程连接路由器或交换机进行管理和配置。
2.SSH:Secure Shell,一种用于远程登录的网络协议,提供安全的数据通信和用户认证方式。
3.Console:一种通过串口连接设备进行本地登录的方式。
4.VLAN:Virtual Local Area Network,虚拟局域网,将不同的物理分组划分到不同的逻辑分组中,实现逻辑分离。
5.MTU:Maximum Transmission Unit,最大传输单元,指数据链路层上一次发送的帧的最大长度。
6.NAT:Network Address Translation,网络地质转换,用于在私有网络和公共网络之间进行通信的转换技术。
7.QoS:Quality of Service,服务质量,用于在网络通信中对不同数据流进行优先级和带宽控制。
华为交换机命令大全
![华为交换机命令大全](https://img.taocdn.com/s3/m/d42163f4b52acfc788ebc9de.png)
华为交换机命令大全system-view 进入系统视图quit 退到系统视图sysname 交换机命名vlan 20 创建vlan(进入vlan20)display vlan 显示vlanazundo vlan 20 删除vlan20display vlan 20 显示vlan里的端口20Interface e1/0/24 进入端口24portlink-type access vlan 20 把当前端口放入vlan20undo porte1/0/10 删除当前VLAN端口10display current-configuration 显示当前配置0 2配置交换机支持TELNETinterfacevlan 1 进入VLAN1ip address192.168.3.100 255.255.255.0 配置IP地址user-interfacevty 0 4 进入虚拟终端authentication-modepassword (aut password) 设置口令模式setauthentication password simple 222 (set aut pass sim 222) 设置口令userprivilege level 3(use priv lev 3) 配置用户级别dispcurrent-configuration (disp cur) 查看当前配置display ipinterface 查看交换机VLANIP配置resetsaved-configuration(reset saved) 删除配置(必须退到用户模式)reboot重启交换机0 3跨交换机VLAN的通讯在sw1上:vlan 10建立VLAN 10interfacee1/0/5 进入端口5Portdefault vlan 10 把端口5加入vlan10vlan 20建立VLAN 20interfacee1/0/15 进入端口15portdefault vlan 20 把端口15加入VLAN20interfacee1/0/24 进入端口24portlink-type trunk 把24端口设为TRUNK端口port trunkpermit vlan all 所有端口都能经过此路径在SW2上:vlan 10建立VLAN 10interfacee1/0/20 进入端口20portdefault vlan 10 把端口20放入VLAN10interfacee1/0/24 进入端口24portlink-type trunk 把24端口设为TRUNK端口port trunkpermit vlan all (port trunk permit vlan 10 只能为vlan10使用)24端口为所有VLAN使用displayinterface e1/0/24 查看端口24是否为TRUNKundo porttrunk permit vlan all 删除该句0 4路由器的基础命令汇总dispaly version 显示系统软件版本及硬件信息system-view 切换到系统视图quit 返回interface +接口进入接口视图ip address +IP +mask 配置IP和子网掩码return 返回用户视图<Ctrl+Z> 返回用户视图sysname R1 修改路由器名称为R1display current-configuration 查看路由器当前配置dispaly interface +接口查看路由器接口的状态信息save 保存当前配置display ip interface brief 查看接口与IP相关摘要信息display ip routing-table 查看路由表0 5telnet远程登陆配置user-interface vty 0 4 进入0~4前五个的VTY用户界面进行整体配置authentication-mode password 设置验证方式为密码user privilege level 3 设置用户登陆级别aaa 进入aaa视图local-user admin password cipher hello privilege level 3在aaa视图下设置账号密码和用户级别local-user admin service-type telnet 配置该用户接入类型为aaaq 退回到用户视图user-interface vty 0 4 进入到VTY用户视图authentication-mode aaa 设置验证方式aaa0 6配置Stelnet配置SSHserver:rsalocal-key-pair create 生成本地RSA主机密钥对display rsa local-key-pair public 查看本地密钥对中的公钥信息user-interface vty 0 4 进入VTY用户视图authentication-mode aaa 设置用户验证方式为aaa授权验证方式protocol inbound ssh 指定VTY用户只支持sshq 返回到系统视图aaa 进入aaa视图local-user huawei1 password cipher huawei1 创建用户和设置用户密码local-user huawei1 service-type ssh 配置本地用户接入类型为sshq 退回到用户视图ssh user huawei1 authentication-type password新建ssh用户指定ssh用户认证方式为passwordaaa 进入aaa视图local-user huawei1 privilege level 3 设置huawei1用户级别为3级别范围0~15 stelnet server enable 开启ssh功能display ssh user-information huawei1 查看ssh用户配置信息不指定用户默认查看所有用户display ssh server status 查看ssh服务器全局配置信息0 7STP配置和选路规则stp enable 在交换机上启用STPstp mode stpdis stp 查看stp配置dis stp brief 查看接口摘要信息stp priority 4096 修改交换机优先级为4096stp root primary 设置交换机为主根交换机stp root secondary 命令配置备份交换机display stp interface Ethernet 0/0/2 查看e0/0/2接口的开销值int e0/0/2stp cost 2000 配置接口e0/0/2的带价值为2000stp timer forward-delay 3000 修改STP的ForwardDelay时间为3000cs也就是30sstp bridge-diameter 3 命令设置网络的直径为3stp mode rstp 启用RSTP使用RSTP可以缩短收敛时间int e0/0/1stp edged-port enable 配置接口e0/0/1为边缘端口不参与生成树的计算0 8配置MSTP多实例stp region-configuration 进入MST域视图region-name huawei 配置MST域名为huaweirevision-level 1 配置MSTP的修订级别为1instance 1 vlan 10 指定VLAN10映射到MSTI1active region-configuration 激活MST域配置display stp region-configuration 查看交换机上当前生效的MST域配置信息dis stp instance 0 brief 查看实例0中的生成树状态和统计的摘要信息stp instance 2 priority 0 配置交换机成位实例2中的根交换机0 9RIP路由协议配置rip 创建开启协议进程network + ip 对指定网段接口使能RIP功能IP地址是与路由器直连的网段debugging rip 1 查看RIP定期更新情况terminal debuggingterminal monitor 在屏幕上显示debug信息undo debugging rip 1undo debug all 命令关闭debug调试功能在上面的配置基础上配置RIP2rip 进入子视图模式version 2 配置版本或者直接配置rip 1version 2network + ip10OSPF单区域配置ospf 1 进入ospf视图1代表进程号area 0 创建区域并进入OSPF区域视图,输入要创建的区域ID,骨干区域即区域0network +IP +匹配码display ospf interface 命令查看OSPF接口通告是否正确、display ospf peer 查看OSPF邻居状态display ip routing-table protocol ospf 查看OSPF路由表11配置OSPF区域明文认证ospf 1area 1authentication-mode simple plain huawei plain是口令以明文方式显示authentication-mode md5 1 huawei 配置区域密文认证12配置链路认证int g0/0/1ospf authentication-mode md5 1 huawei 在一条链路中的两个接口配置要相同13配置抑制接口ospf 1silent-interface GigabitEthernet 0/0/1 禁止接口g0/0/1接收和发送ospf报文14技巧对多个接口配置接口抑制ospf 1silent-interface all 抑制所有接口undisplay ip routing-table 10.0.1.1 查看10.0.1.1所在网段的路由条目15基于接口修改int g0/0/0ospf network-type p2mp 修改ospf的网络类型为多到多点ospf network-type broadcast 修改ospf的网络类型为广播ospf dr-priority 100 修改g0/0/0接口的DR优先级为100reset ospf process 重启ospf进程ospf cost 1000 修改ospf的开销值为1000ospf timer hello 20 修改HELLO计时器为20sospf timer dead 80 修改dead计时器为80sospf 1preference 110 修改ospf优先级为110值越大优先级越低16路由引入ospf 1import-route rip 1 在ospf进程中引入ripdefault-route-advertise always 在ospf进程中引入默认路由ripimport-route ospf 1 在rip进程中引入ospfimport-route ospf cost 3 ospf 引入rip时配置开销值default-route originate 在RIP进程中发布默认路由17vrrp(虚拟路由器冗余协议)基本配置int g0/0/0vrrp vrid 1 virtual-ip 172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrp vrid 1 priority 120 修改优先级为120display vrrp 查看vrrp信息display vrrp briefdisplay vrrp interface g0/0/0 查看VRRP的工作状态18配置VRRP多备份组int g0/0/0vrrp vrid 1 virtual-ip 172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrp vrid 1 priority 120 修改优先级为120vrrp vrid 2 virtual-ip 172.16.1.253创建VRRP备份组,备份组号为2,配置虚拟IP为172.16.1.253int g0/0/0vrrp vrid 1 virtual-ip 172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrp vrid 2 virtual-ip 172.16.1.253创建VRRP备份组,备份组号为2,配置虚拟IP为172.16.1.253vrrp vrid 2 priority 120 修改优先级为120vrrp vrid 2 preempt-mode disable 开启非抢占方式19配置VRRP的跟踪接口及认证int g0/0/1vrrp vrid 1 track interface GigabitEthernet 0/0/0 reduced 50监视上行接口G0/0/0,当此接口断掉时,裁减优先级50,使优先级为70vrrp vrid 1 authentication-mode md5 huawei 认证配置20配置基本的访问控制表acl 2000 创建一个编号型ACL,基本ACL的范围是2000~29999rule 5 permit source 1.1.1.1 0指定规则ID为5,允许数据源地址为1.1.1.1的报文通过,反掩码全为0,即精确匹配rule 10 deny source any 指定ID为10,拒绝任意源地址的数据包通过display acl all 查看设备上所有的访问控制列表。
华为路由器交换机常用命令
![华为路由器交换机常用命令](https://img.taocdn.com/s3/m/fc7e8cd7162ded630b1c59eef8c75fbfc77d94a4.png)
华为路由器交换机常用命令华为路由器交换机常用命令文档1、连接路由器交换机1.1 使用Console端口连接1.2 使用Telnet远程连接1.3 使用SSH远程连接2、系统管理2.1 修改设备名称2.2 设备备份与恢复2.3 设备升级与软件安装2.4 日志管理2.5 用户管理2.6 系统时间配置3、接口配置3.1 查看接口状态3.2 配置接口IP地质3.3 配置接口描述3.4 配置接口MTU3.5 配置接口速率与双工模式3.6 配置接口ACL3.7 配置接口链路聚合(LAG)4、VLAN 配置4.1 创建VLAN4.2 配置接口VLAN成员关系4.3 配置接口访问VLAN4.4 配置接口Trunk模式4.5 配置VLAN间路由4.6 配置VLAN间ACL控制5、路由配置5.1 配置静态路由5.2 配置动态路由(OSPF,BGP,RIP) 5.3 配置路由跟踪5.4 配置路由重分发5.5 配置路由策略5.6 配置路由保护6、安全配置6.1 配置访问控制列表(ACL) 6.2 配置端口安全6.3 配置802.1X认证6.4 配置密钥链(Key Chn)6.5 配置IPsec VPN7、QoS 配置7.1 配置流量分类7.2 配置流量策略7.3 配置队列调度7.4 配置流量控制附件:1、常用命令示例2、路由器交换机配置示例法律名词及注释:1、ACL(访问控制列表)- 一种用于控制网络流量的策略,可以基于源IP地质、目标IP地质、传输层协议和端口号等信息进行匹配。
2、VLAN(虚拟局域网)- 基于交换机端口的逻辑划分,将不同的端口划分到不同的虚拟局域网中,实现隔离和安全性。
3、LAG(链路聚合)- 将多个物理链路合并为一个逻辑链路,提高链路带宽和冗余能力。
4、OSPF(开放最短路径优先)- 一种用于动态路由选择的协议,根据链路状态信息计算最短路径。
5、BGP(边界网关协议)- 一种用于互联网自治系统间的路由选择的协议。
(完整版)交换机常用操作指令华为
![(完整版)交换机常用操作指令华为](https://img.taocdn.com/s3/m/afdd520f71fe910ef02df846.png)
华为交换机常用指令一、交换机设备登陆及配置:1、设备登陆配置我中心维护汇聚和热点交换机,交换机类型为5300、2300和GPON,交换机使用secure CRT软件登录。
交换机使用之前需要刷机,使用secureCRT配置:协议是serial,端口com12,波特流9600,流控制不配置。
刷交换机所需要的信息:在3a模式下用户名和密码;snmp 为网络管理协议,配置网管所需的指令,固定不变; telnet配置——远程登陆配置信息。
登陆汇聚和热点交换机首先93-5交换机(核心交换机),登录协议选择ssh登录,登陆其它交换机在93-5上使用telnet(远程登陆)命令跳转,只能单向。
核心交换机登陆用户名:hanxu69309,密码:Hx#9309。
华为汇聚和热点交换机的登陆用户名和密码都为huaweitest。
其他核心交换机的登录地址:(交换机型号为9312)(交换机型号为6500)(交换机型号为6500)(交换机型号为8500)(交换机型号为8500)(交换机型号为9306)2、交换机配置思路:➢配置设备名称。
➢管理AP所需要配置的信息➢管理交换机配置的信息➢在3a模式下配置,配置以下用户名和密码。
(配置固定)➢snmp为网络管理协议,下面为加入网管所配置的指令,固定不变。
➢telnet配置——远程登陆配置信息3、数据准备:➢管理VLAN的ID。
➢交换机的管理IP。
➢交换机连接其他交换机的接口号。
➢验证方式、用户名和密码。
二、5300交换机开站指令1、交换机简介5300系列交换机,包括5328和5324等,不能给AP供电。
下面介绍的指令为5328,是5300系列的一种,共有28个端口。
532853242、开站指令➢配置设备名称。
System //进入配置模式sysname SDJN-WLAN-SW-ZRSJGC-1-S5328 //给交换机命名vlan 1 2001 2101 2126 to 2127 2218 2501 //创建vlanbpdu-tunnel reserved03 group-mac 0100-5e99-9999 //交换机支持sim认证使用,网维提供的。
华为路由器交换机配置命令大全
![华为路由器交换机配置命令大全](https://img.taocdn.com/s3/m/285a1f2ccd1755270722192e453610661ed95a9f.png)
华为路由器交换机配置命令大全华为路由器交换机配置大全1XXX华为路由器交换机配置命令大全一、计算机命令#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包#telnet;远程登录二、XXX路由器交换机配置命令:交换机命令[Quidway]dis cur;显示当前配置[Quidway]display current-configuration;表现当前配置[Quidway]display interfaces;显示接口信息[Quidway]display vlan;表现vlan信息[Quidway]display version;显示版本信息[Quidway]super password;修改特权用户密码[Quidway]sysname;交流机定名[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]vlan3;创建VLAN[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};设置为根或根的备份[SwitchA-vlanx]isolate-user-vlan enable;设置主vlan所以设置PVID为所属vlanid,设置可以互通的vlan为untagged.3、XXX路由器交流机配置敕令:路由器敕令[Quidway]display version;表现版本信息[Quidway]display current-configuration;表现当前配置[Quidway]display interfaces;显示接口信息[Quidway]display ip route;表现路由信息[Quidway]sysname aabbcc;变动主机名[Quidway]super password ;设置口令[Quidway]interface serial0;进入接口华为路由器交换机配置大全3[Quidway-serial0]ip address;配置端口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 XXX;显示所有信息[Quidway]debugging XXX;调试事件信息[Quidway]debugging XXX;表现包的信息四、XXX路由器交换机配置命令:静态路由:[Quidway]ip route-static{interfacenumber|nexthop}[value][reject|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 Serial2[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.0.0.25、XXX路由器交流机配置敕令:静态路由:[Quidway]rip;设置静态路由[Quidway]rip work;设置工作允许[Quidway]ri pinput;设置入口允许[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]XXX;配置路由器的ID[Quidway]ospf enable;启动OSPF协议[Quidway-ospf]import-routedirect;引入直联路由[Quidway-Serial0]ospf enable area;配置OSPF地区六、XXX路由器交换机配置命令:标准访问列表命令格式如下:acl[match-orderconfig|auto];默许前者按次婚配。
华为路由器、交换机配置命令大全
![华为路由器、交换机配置命令大全](https://img.taocdn.com/s3/m/88ad1f7c32687e21af45b307e87101f69f31fb4f.png)
华为路由器、交换机配置命令大全华为路由器配置命令大全:一、登录华为路由器控制台1:使用PuTTY或其他SSH客户端登录到华为路由器:```ssh admin<路由器IP地址>```2:输入登录密码进行验证。
二、基本配置命令1:设置主机名:```sysname <主机名>```2:配置管理接口:```interface GigabitEthernet0/0/0ip address <IP地址> <子网掩码>```3:配置VLAN接口:```interface Vlanif <VLAN ID>ip address <IP地址> <子网掩码>```三、路由相关配置命令1:静态路由配置:```ip route-static <目标网络> <子网掩码> <下一跳地址> ```2:动态路由配置:```router ospf <进程ID>router-id <路由器ID>network <网络地址> <子网掩码> area <区域ID>3: BGP路由配置:```bgp <AS号码>router-id <路由器ID>peer <对端IP地址> as-number <对端AS号码>```四、安全配置命令1:配置防火墙规则:```acl number <ACL编号>rule <规则序号> permit source <源地址> destination <目的地址>rule <规则序号> deny source <源地址> destination <目的地址>```2:开启SSH服务:ssh server enable```3:配置AAA认证:```aaalocal-user <用户名> password irreversible-cipher <加密密码>authorization-attribute user-role network-admin```五、NAT配置命令1:配置静态NAT:```interface GigabitEthernet0/0/0nat outbound <内部接口> <外部接口>```2:配置动态NAT:nat address-group <地址组名>address <内部地址> <外部地址>```3:配置PAT:```interface GigabitEthernet0/0/0nat address-group <地址组名>```附件:1:示例配置文件(附件1)2:路由器接口图(附件2)法律名词及注释:1:主机名:路由器的标识名称。
华为交换机常用命令配置介绍
![华为交换机常用命令配置介绍](https://img.taocdn.com/s3/m/1c8b7b53a31614791711cc7931b765ce05087aa7.png)
华为交换机常用命令配置介绍华为交换机是一种常见的网络设备,用于构建大型网络。
配置华为交换机需要使用一些常用的命令,通过这些命令可以设置交换机的各种功能和参数。
本文将介绍一些常用的华为交换机配置命令,包括基本配置、端口配置和VLAN配置等。
一、基本配置命令:1.设置设备主机名:[HUAWEI] sysname Switch //将设备主机名设置为Switch2.配置管理口:[Switch] interface gigabitethernet 0/0/1 //进入GigabitEthernet 0/0/1接口[Switch-GigabitEthernet0/0/1] port link-type access //设置接口类型为access[Switch-GigabitEthernet0/0/1] port default vlan 10 //设置默认VLAN为103.配置IP地址:[Switch-GigabitEthernet0/0/1] ip address 192.168.1.1255.255.255.0 //配置接口IP地址为192.168.1.1,子网掩码为255.255.255.04.设置设备登录认证:[Switch] aaa //进入AAA视图[Switch-aaa] local-user admin //创建本地用户admin[Switch-aaa] password simple admin123 //设置密码为admin1235.开启SSH远程登录:[Switch] ssh server enable //开启SSH服务[Switch] ssh user admin //创建SSH用户admin[Switch-ssh-user-admin] authentication-type password //设置认证方式为密码[Switch-ssh-user-admin] service-type stelnet //设置服务类型为SSH二、端口配置命令:1.查看端口状态:[Switch] display interface gigabitethernet 0/0/1 //查看GigabitEthernet 0/0/1接口的状态信息2.端口速率设置:[Switch] interface gigabitethernet 0/0/1 //进入GigabitEthernet 0/0/1接口[Switch-GigabitEthernet0/0/1] speed 100 //设置速率为100Mbps 3.端口流量控制:[Switch] interface gigabitethernet 0/0/1 //进入GigabitEthernet 0/0/1接口[Switch-GigabitEthernet0/0/1] flow-control //开启流量控制4.端口VLAN成员关系设置:[Switch] interface gigabitethernet 0/0/1 //进入GigabitEthernet 0/0/1接口[Switch-GigabitEthernet0/0/1] port link-type trunk //设置接口类型为trunk[Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 1020 //设置允许通过的VLAN为10和20三、VLAN配置命令:1.创建VLAN:[Switch] vlan 10 //创建VLAN 10[Switch-vlan10] quit //退出VLAN 10视图2.VLAN接口配置:[Switch] interface vlanif 10 //进入VLAN 10接口[Switch-Vlan-interface10] ip address 192.168.10.1255.255.255.0 //配置接口IP地址为192.168.10.1,子网掩码为255.255.255.03.VLAN端口关联:[Switch] interface gigabitethernet 0/0/1 //进入GigabitEthernet 0/0/1接口[Switch-GigabitEthernet0/0/1] port link-type hybrid //设置接口类型为hybrid(混合)[Switch-GigabitEthernet0/0/1] port hybrid vlan 10 untagged //设置接口为VLAN 10的未标记端口四、其他常用命令:1.查看设备信息:[Switch] display version //查看设备版本信息[Switch] display interface brief //查看所有接口的基本信息2.保存配置:[Switch] save //保存当前配置3.重启设备:[Switch] reboot //重启设备以上是一些常用的华为交换机配置命令。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
交换机命令~~~~~~~~~~[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的IP地址[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 ;当前端口加入到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]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的pvid [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][reject| 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|any] 例:[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}destination <i p 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 echo [Quidway-acl-101]rule permit icmp source any destination any icmp-type echo -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 desti nation-port equal ftp[Quidway-acl-103]rule permit tcp source any destination 10.0.0.2 0.0.0.0 desti nation-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.160.1 0[Quidway-acl-102]rule permit tcp source any destination 202.38.160.1 0 destin ation-port great-than1024[Quidway-acl-102]quit[Quidway]int s0[Quidway-Serial0]firewall packet-filter 102 inbound ;设202.38.160.1是路由器出口IP。