华为交换机基本配置命令

合集下载

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

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

华为路由器交换机配置命令大全华为路由器交换机配置大全本文提供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. 登录华为交换机。

首先,我们需要登录华为交换机进行配置。

一般来说,我们可以通过串口、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。

```。

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

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

华为路由器交换机常用命令一、设备管理命令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业务环回组。

华为交换机常用配置命令

华为交换机常用配置命令

华为交换机基本配置命令一、单交换机VLAN划分命令命令解释system 进入系统视图system-view 进入系统视图quit 退到系统视图undo vlan 20 删除vlan 20sysname 交换机命名disp vlan 显示vlanvlan 20 创建vlan(也可进入vlan 20)port e1/0/1 to e1/0/5 把端口1-5放入VLAN 20 中disp vlan 20 显示vlan里的端口20int e1/0/24 进入端口24port access vlan 20 把当前端口放入vlan 20undo port e1/0/10 表示删除当前VLAN端口10disp curr 显示当前配置二、配置交换机支持TELNETsystem 进入系统视图sysname 交换机命名int vlan 1 进入VLAN 1ip address 192.168.3.100 255.255.255.0 配置IP地址user-int vty 0 4 进入虚拟终端authentication-mode password (aut password) 设置口令模式set authentication password simple 222 (set aut pass sim 222) 设置口令user privilege level 3(use priv lev 3) 配置用户级别disp current-configuration (disp cur) 查看当前配置disp ip int 查看交换机VLAN IP配置删除配置必须退到用户模式reset saved-configuration(reset saved) 删除配置reboot 重启交换机三、跨交换机VLAN的通讯在sw1上:vlan 10 建立VLAN 10int e1/0/5 进入端口5port access vlan 10 把端口5加入vlan 10vlan 20 建立VLAN 20int e1/0/15 进入端口15port access vlan 20 把端口15加入VLAN 20int e1/0/24 进入端口24port link-type trunk 把24端口设为TRUNK端口port trunk permit vlan all 同上在SW2上:vlan 10 建立VLAN 10int e1/0/20 进入端口20port access vlan 10 把端口20放入VLAN 10int e1/0/24 进入端口24port link-type trunk 把24端口设为TRUNK端口port trunk permit vlan all (port trunk permit vlan 10 只能为vlan 10使用)24端口为所有VLAN使用disp int e1/0/24 查看端口24是否为TRUNKundo port trunk permit vlan all 删除该句四、路由的配置命令system 进入系统模式sysname 命名int e1/0 进入端口ip address 192.168.3.100 255.255.255.0 设置IPundo shutdown 打开端口disp ip int e1/0 查看IP接口情况disp ip int brief 查看IP接口情况user-int vty 0 4 进入口令模式authentication-mode password(auth pass) 进入口令模式set authentication password simple 222 37 设置口令user privilege level 3 进入3级特权save 保存配置reset saved-configuration 删除配置(用户模式下运行)undo shutdown 配置远程登陆密码int e1/4ip route 192.168.3.0(目标网段) 255.255.255.0 192.168.12.1(下一跳:下一路由器的接口)静态路由ip route 0.0.0.0 0.0.0.0 192.168.12.1 默认路由disp ip rout 显示路由列表sw1(三层交换机):int vlan 10 创建虚拟接口VLAN 10ip address 192.168.10.254 255.255.255.0 设置虚拟接口VLAN 10的地址int vlan 20 创建虚拟接口VLAN 20ip address 192.168.20.254 255.255.255.0 设置虚拟接口IP VLAN 20的地址注意:vlan 10里的计算机的网关设为 192.168.10.254vlan 20里的计算机的网关设为 192.168.20.254[S9306-GigabitEthernet2/0/42]dis this#interface GigabitEthernet2/0/42 原先的为trunk,port link-type trunkport trunk allow-pass vlan 2 to 4094Duplex {auto/half/full}Speed {auto/10/100/1000}#interface GigabitEthernet2/0/42 现在改为accessundo port trunk allow-pass vlan allport trunk allow-pass vlan 1port link-type accessport default vlan 10Stp enableStp priority 4096Stp root {primary/secondary}华为路由器交换机配置命令:路由器命令[Quidway]displayversion;显示版本信息[Quidway]displaycurrent-configuration;显示当前配置[Quidway]displayinterfaces;显示接口信息[Quidway]displayiproute;显示路由信息[Quidway]sysnameaabbcc;更改主机名[Quidway]superpasswrod123456;设置口令[Quidway]interfaceserial0;进入接口[Quidway-serial0]ipaddress;配置端口IP地址[Quidway-serial0]undoshutdown;激活端口配置ospf[S9300-A] router id 1.1.1.1[S9300-A] ospf 100[S9300-A-ospf-100] area 0[S9300-A-ospf-100-area-0.0.0.0] network 192.168.0.0 0.0.0.255 [S9300-A-ospf-100-area-0.0.0.0] quit[S9300-A-ospf-1] area 1[S9300-A-ospf-100-area-0.0.0.1] network 192.168.1.0 0.0.0.255 [S9300-A-ospf-100-area-0.0.0.1] quit[S9300-A-ospf-1] quit。

华为交换机命令大全

华为交换机命令大全

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

华为交换机基本配置命令

华为交换机基本配置命令

For personal use only in study and research; not for commercial use华为交换机基本配置命令一、单交换机VLAN划分命令命令解释system 进入系统视图system-view 进入系统视图quit 退到系统视图undo vlan 20 删除vlan 20sysname 交换机命名disp vlan 显示vlanvlan 20 创建vlan(也可进入vlan 20)port e1/0/1 to e1/0/5 把端口1-5放入VLAN 20 中5700系列单个端口放入VLAN●[Huawei]int g0/0/1● [Huawei]port link-type access(注:接口类型access,hybrid、trunk)● [Huawei]port default vlan 10批量端口放入VLAN●[Huawei]port-group 1●[Huawei-port-group-1]group-member ethernet G0/0/1 to ethernet G0/0/20 ●[Huawei-port-group-1]port hybrid untagged vlan 3删除group(组) vlan 200内的15端口●[Huawei]int g0/0/15●[Huawei-GigabitEthernet0/0/15]undo port hybrid untagged vlan 200通过group端口限速设置●[Huawei]Port-group 2●[Huawei]group-member g0/0/2 to g0/0/23●[Huawei]qos lr outbound cir 2000 cbs 20000disp vlan 20 显示vlan里的端口20int e1/0/24 进入端口24undo port e1/0/10 表示删除当前VLAN端口10disp curr 显示当前配置●return返回●Save 保存●info-center source DS channel 0 log state off trap state off 通过关闭日志信息命令改变DS模块来实现(关闭配置后的确认信息显示)●info-center source DS channel 0 log state on trap state on 通过打开日志信息命令改变DS模块来实现(打开配置后的确认信息显示)二、配置交换机支持TELNEsystem 进入系统视图sysname 交换机命名int vlan 1 进入VLAN 1ip address 192.168.3.100 255.255.255.0 配置IP地址user-int vty 0 4 进入虚拟终端authentication-mode password (aut password) 设置口令模式set authentication password simple 222 (set aut pass sim 222) 设置口令user privilege level 3(use priv lev 3) 配置用户级别disp current-configuration (disp cur) 查看当前配置disp ip int 查看交换机VLAN IP配置删除配置必须退到用户模式reset saved-configuration(reset saved) 删除配置Reboot 重启交换机三、跨交换机VLAN的通讯在sw1上:vlan 10 建立VLAN 10int e1/0/5 进入端口5port access vlan 10 把端口5加入vlan 10vlan 20 建立VLAN 20int e1/0/15 进入端口15port access vlan 20 把端口15加入VLAN 20int e1/0/24 进入端口24port link-type trunk 把24端口设为TRUNK端口port trunk permit vlan all 同上在SW2上:vlan 10 建立VLAN 10int e1/0/20 进入端口20port access vlan 10 把端口20放入VLAN 10int e1/0/24 进入端口24port link-type trunk 把24端口设为TRUNK端口port trunk permit vlan all (port trunk permit vlan 10 只能为vlan 10使用)24端口为所有VLAN使用disp int e1/0/24 查看端口24是否为TRUNKundo port trunk permit vlan all 删除该句四、路由的配置命令system 进入系统模式sysname 命名int e1/0 进入端口ip address 192.168.3.100 255.255.255.0 设置IPundo shutdown 打开端口disp ip int e1/0 查看IP接口情况disp ip int brief 查看IP接口情况user-int vty 0 4 进入口令模式authentication-mode password(auth pass) 进入口令模式set authentication password simple 222 37 设置口令user privilege level 3 进入3级特权save 保存配置reset saved-configuration 删除配置(用户模式下运行)undo shutdown 配置远程登陆密码int e1/4ip route 192.168.3.0(目标网段)255.255.255.0 192.168.12.1(下一跳:下一路由器的接口)静态路由ip route 0.0.0.0 0.0.0.0 192.168.12.1 默认路由disp ip rout 显示路由列表华3C AR-18E1/0(lan1-lan4)E2/0(wan0)E3/0(WAN1)路由器连接使用直通线。

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

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

华为路由器交换机配置命令大全华为路由器交换机配置命令大全一、登录与认证命令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,服务质量,用于在网络通信中对不同数据流进行优先级和带宽控制。

华为交换机配置命令大全

华为交换机配置命令大全

华为交换机配置命令大全交换机命令---华为路由器配置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高速缓存区的内容。

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

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

华为路由器交换机配置命令大全华为路由器交换机配置大全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];默许前者按次婚配。

华为交换机基本配置

华为交换机基本配置

1、进入系统配置页面<Huawei>system-view #进入配置页面2、华为交换机清空所有配置<Huawei>reset saved-configuration #重置保存的配置The configuration will be erased to reconfigure. Continue? [Y/N]:Y #配置将被擦除以重新配置。

持续[是/否]:是<Huawei>reboot #重启Info: The system is now comparing the configuration, please wait.Warning: All the configuration will be saved to the configuration file for the next startup:, Continue?[Y/N]:n #警告:所有配置都将保存到配置文件中,以便下次启动:,是否继续?[是/否]:N#询问是否Info: If want to reboot with saving diagnostic information, input 'N' and then execute 'reboot save diagnostic-information'.System will reboot! Continue?[Y/N]:y #警告:所有配置都将保存到配置文件中,以便下次启动:,是否继续?[是/否]:Y#询问是否注意:重启需要先选择N再选择Y3、更改交换机名字[Huawei]sysname R1 #R1就是系统名称[Huawei]save #保存配置4、设置交换机consle登录密码[Huawei]user-interface console 0 #设置华为console 0口的登录密码[Huawei-ui-console0]authentication-mode password #设置consle认证方式为密码认证[Huawei-ui-console0]set authentication password simple huawei1#设置登录密码为明文登录密码,后面huawei1为密码,用dis au查看配置的时候可以看到具体的密码[Huawei-ui-console0]set authentication password cipher huawei1#设置登录密码为密文登录密码,后面huawei1为密码,用dis au查看配置的时候看不到密码配置,显示为加密5、设置交换机telnet远程登录账号和密码<Huawei>system-view #进入系统[Huawei]telnet server enable #打开telnet服务[Huawei]user-interface vty 0 4 #进入vty 0 4 虚拟接口,因为telnet登陆无物理接口[Huawei-ui-vty0-4]authentication-mode aaa #设置虚接口即telnet认证模式为aaa [Huawei-aaa]quit #返回上一级菜单[Huawei]aaa #telnet 远程登陆设置一般通过aaa认证,首先我们进入aaa认证[Huawei-aaa]local-user admin password cipher huawei1#新增用户账号为admin,密码为华为1 [Huawei-aaa]local-user admin service-type telnet #设置admin为telnet登陆用户[Huawei-aaa]local-user admin privilege level 3 #设置admin的账号权限等级,0为最低级(访问级),只能ping等等,1为监控级,可以查看dis,2为系统级,可以进行配置,3为管理级,可以下载配置等等<Huawei>dis local-user #查看用户有哪些6、设置接口IP地址(需要确定是否是三层交换还是二层交换,需要做对应转换,进入接口查看,如果有port switch则是二层,如果是Route Port则是三层,三层可以配置IP地址,二层不能)[Huawei]interface e0/0/0 #进入接口[Huawei-Ethernet0/0/0]portswitch #三层接口转二层接口[Huawei-Ethernet0/0/0]undo portswitch #二层转三层接口7、设置VLAN和VLAN IP地址,配置好了IP地址之后可以把电脑接到这个接口,配置新IP看能否ping 通,如果中间有两台交换机,需要配置trunk,并且允许对应vlan通过[Huawei]vlan 100 #创建vlan 100[Huawei-vlan100]port Ethernet 0/0/0 #把E0/0/0口加入到vlan 100里面[Huawei-vlan100]port Ethernet 0/0/0 to e0/0/13 #把E0/0/0到13号口加入到vlan 100里面,如果出现报错Error: Trunk or Hybrid port(s) can not be added or deleted in this man,需要把端口转换成access模式,命令如下:[Huawei]interface e0/0/0[Huawei-Ethernet0/0/0]port link-type access #端口转为ACCESS模式[Huawei-vlan100]quit #退出[Huawei]interface Vlanif 100 #进入vlanif100[Huawei-Vlanif100]ip address 192.168.2.1 255.255.255.0 #配置vlanif 100的IP地址[Huawei]interface g0/0/0 #进入两台交换机的连接口,配置trunk [Huawei-Ethernet0/0/0]port link-type trunk #配置trunk,两边接口都需要配置[Huawei-Ethernet0/0/0port trunk allow-pass vlan 100 200#vlan100和vlan200是需要通过的vlan。

华为交换机配置命令

华为交换机配置命令

华为交换、路由器常见命令路由器基本配置命令举例[Quidway]sysname router_name 命名路由器(或交换机)[Quidway]delete 删除Flash ROM中的配置[Quidway]save 将配置写入Flash ROM[Quidway]interface serial 0 进入接口配置模式[Quidway]quit 退出接口模式到系统视图[Quidway]shutdown/undo shutdown 关闭/重启接口[Quidway]ip address ip_address subnet_mask 为接口配置IP地址和子网掩码[Quidway]display version 显示VRP版本号[Quidway]display current-configuration 显示系统运行配置信息[Quidway]display interfaces 显示接口配置信息[Quidway]display ip routing 显示路由表[Quidway]ping ip_address 测试网络连通性[Quidway]tracert ip_address 测试数据包从主机到目的地所经过的网关[Quidway]debug all 打开所有调试信息[Quidway]undo debug all 关闭所有调试信息[Quidway]info-center enable 开启调试信息输出功能[Quidway]info-center console dubugging 将调试信息输出到PC[Quidway]info-center monitor dubugging 将调试信息输出到Telnet终端或哑终端换机配置命令举例(大括号{}中的选项为单选项,斜体字部分为参数值[Quidway]super password password 修改特权模式口令[Quidway]sysname switch_name 命名交换机(或路[Quidway]interface ethernet 0/1 进入接口视图[Quidway]quit 退出系统视图[Quidway-Ethernet0/1]duplex {half|full|auto} 配置接口双工工[Quidway-Ethernet0/1]speed {10|100|auto} 配置接口速率[Quidway-Ethernet0/1]flow-control 开启流控制[Quidway-Ethernet0/1]mdi {across|normal|auto} 配置MDI/MDIX[Quidway-Ethernet0/1]shutdown/undo shutdown 关闭/重启端口VLAN基本配置命令(以Quidway S3026为例) [Quidway]vlan 3 创建并进入VLAN配置模式,缺省时系统将所有端口加入VLAN 1,这个端口既不能被创建也不能被删除。

华为交换机基本配置命令详解

华为交换机基本配置命令详解

华为交换机基本配置命令详解1:配置登录⽤户,⼝令等<Quidway> //⽤户直⾏模式提⽰符,⽤户视图<Quidway>system-view //进⼊配置视图[Quidway] //配置视图(配置密码后必须输⼊密码才可进⼊配置视图)[Quidway] sysname xxx //设置主机名成为xxx这⾥使⽤[Quidway] aaa //进⼊aaa认证模式定义⽤户账户[Quidway-aaa] local-user wds password cipher wds[Quidway-aaa] local-user wds level 15[Quidway-aaa] local-user wds service-type telnet terminal ssh //有时候这个命令是最先可以运//⾏的,上边两个命令像password,level都是定义完vty 的// authentication-mode aaa后才出现[Quidway-aaa] quit[Quidway] user-interface vty 0 4 //当时很奇怪这个命令就是找不到,最后尝试了⼏次才能运⾏[Quidway-ui-vty0-4] authentication-mode aaa[Quidway-ui-vty0-4] quit2:华为S9303 VLan设置创建vlan:<Quidway> //⽤户直⾏模式提⽰符,⽤户视图<Quidway>system-view //进⼊配置视图[Quidway] vlan 10 //创建vlan 10,并进⼊vlan10配置视图,如果vlan10存在就直接进⼊vlan10配置视图[Quidway-vlan10] quit //回到配置视图[Quidway] vlan 100 //创建vlan 100,并进⼊vlan100配置视图,如果vlan10存在就直接进⼊vlan100配置视图[Quidway-vlan100] quit //回到配置视图将端⼝加⼊到vlan中:[Quidway] interface GigabitEthernet2/0/1 (10G光⼝)[Quidway- GigabitEthernet2/0/1] port link-type access //定义端⼝传输模式[Quidway- GigabitEthernet2/0/1] port default vlan 100 //将端⼝加⼊vlan100[Quidway- GigabitEthernet2/0/1] quit[Quidway] interface GigabitEthernet1/0/0 //进⼊1号插槽上的第⼀个千兆⽹⼝配置视图中。

华为交换机的基础命令

华为交换机的基础命令

华为交换机的基础命令华为交换机的基础命令如下:1. 登录交换机:telnet ip_address或ssh ip_address (例如:telnet 192.168.1.1)2. 进入特权模式:enable3. 进入全局配置模式:configure terminal4. 设定管理口IP地址:interface vlanif 1,ip address ip_address subnet_mask (例如:interface vlanif 1,ip address 192.168.1.1 255.255.255.0)5. 设定交换机主机名:hostname name (例如:hostname Switch1)6. 设定管理口的默认网关:ip route-static 0.0.0.0 0.0.0.0 gateway_ip (例如:ip route-static 0.0.0.0 0.0.0.0 192.168.1.254)7. 显示系统配置信息:display current-configuration8. 添加VLAN:vlan vlan_id (例如:vlan 10)9. 进入VLAN模式:interface vlan vlan_id (例如:interface vlan 10)10. 设定VLAN接口IP地址:ip address ip_addresssubnet_mask (例如:ip address 192.168.10.1 255.255.255.0)11. 进入接口配置模式:interface interface_typeinterface_number (例如:interface gigabitethernet 0/0/1)12. 配置接口描述:description description (例如:description This is a test interface)13. 设定接口IP地址:ip address ip_address subnet_mask (例如:ip address 192.168.1.2 255.255.255.0)14. 保存配置:save15. 退出配置模式:exit注意:以上命令仅为基础命令示例,具体根据交换机型号和需求使用相应命令。

华为交换机常用命令配置介绍

华为交换机常用命令配置介绍

华为交换机常用命令配置介绍华为交换机是一种常见的网络设备,用于构建大型网络。

配置华为交换机需要使用一些常用的命令,通过这些命令可以设置交换机的各种功能和参数。

本文将介绍一些常用的华为交换机配置命令,包括基本配置、端口配置和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. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

华为交换机基本配置命令华为交换机基本配置命令一、单交换机VLAN划分以下是单交换机VLAN划分的基本命令:system:进入系统视图。

system-view:进入系统视图。

quit:退出系统视图。

undovlan20:删除vlan20.XXX:交换机命名。

dispvlan:显示vlan。

vlan20:创建vlan(也可进入vlan20)。

porte1/0/1toe1/0/5:把端口1-5放入VLAN20中。

对于5700系列交换机,单个端口放入VLAN的命令如下:XXX]intg0/0/1XXX]portlink-type access(注:接口类型access,hybrid、trunk)XXX]portdefaultvlan10而批量端口放入VLAN的命令如下:XXX]port-group1XXX-port-group-1]group-XXXXXX-port-group-1]porthybriduntaggedvlan3如果需要删除group(组)vlan200内的15端口,可以使用以下命令:XXX]intg0/0/15XXX-XXX]XXX通过group端口限速设置的命令如下:XXX]Port-group2XXX]group-memberg0/0/2tog0/0/23XXX]qoslroutboundcir2000cbs要显示vlan里的端口20,可以使用以下命令:dispvlan20如果需要进入端口24,可以使用以下命令:inte1/0/24要删除当前VLAN端口10,可以使用以下命令:XXX如果需要显示当前配置,可以使用以下命令:dispcurr如果需要保存配置,可以使用以下命令:save如果需要通过关闭日志信息命令改变DS模块来实现关闭配置后的确认信息显示,可以使用以下命令:info-XXXoff如果需要通过打开日志信息命令改变DS模块来实现打开配置后的确认信息显示,可以使用以下命令:info-XXX二、配置交换机支持XXX以下是配置交换机支持XXX的基本命令:system:进入系统视图。

XXX:交换机命名。

intvlan1:进入VLAN1.配置IP地址:IP地址为192.168.3.100,子网掩码为255.255.255.0.进入虚拟终端:使用用户名intvty4.设置口令模式:n-mode password,并设置口令为autpassword。

设置用户级别:使用user privilege level 3命令配置用户级别。

查看当前配置:使用disp n命令查看当前配置。

查看交换机VLANIP配置:使用disp ip int命令查看交换机VLANIP配置。

删除配置:必须退到用户模式,使用reset n命令删除配置。

重启交换机:使用reboot命令重启交换机。

跨交换机VLAN的通讯:在SW1上,建立VLAN10和VLAN20,并将端口5和端口15分别加入对应的VLAN,将端口24设为TRUNK端口并允许所有VLAN使用。

在SW2上,建立VLAN10并将端口20加入VLAN10,将端口24设为TRUNK端口并允许所有VLAN使用。

使用disp int e1/0/24命令查看端口24是否为TRUNK,并使用undo port trunk permit vlan all命令删除该句。

路由的配置命令:进入系统模式,使用sysname命令命名,进入端口1/0并设置IP地址为192.168.3.100,使用undoshutdown命令打开端口。

使用disp ip int命令查看IP接口情况,或使用disp ip int brief命令查看IP接口情况。

进入口令模式:使用用户名intvty4.n-mode password (authpass) is used to enter password mode。

To set the password。

use set n password simple .User privilege level 3 is used to enter the third level of privilege。

To save n。

use save。

To delete n in user mode。

use reset n。

To configure remote login password。

use undo shutdown。

To configure IP routes。

use inte1/4 and input the n ork segment as ip route 192.168.3.0 255.255.255.0 192.168.12.1 (next hop: the interface of the next router)。

For the default route。

useip route 0.0.0.0 0.0.0.0 192.168.12.1.To display the route list。

use disp ip rout。

The router n uses a straight-through cable。

ForWAN0.connect WAN0 to WAN0.and for WAN1.connect WAN1to WAN1.The gateway of the computer should be set to the interface address of the router。

To configure VLAN-VLAN n on a layer 3 switch。

use the following steps on SW1: enter system view with system。

namethe system with sysname。

create VLAN10 with vlan10.create VLAN20 with vlan20.enter port 20 with inte1/0/20.put port 20 in VLAN10 with port access vlan10.enter port 24 with inte1/0/24.setport 24 as a trunk port with port link-type trunk。

permit all VLANs to use port 24 with port trunk permit vlan all (or only allow vlan10 to use it with port trunk permit vlan10)。

One the same steps except for setting the port to access VLAN10 with port access vlan10 on inte1/0/5.Finally。

on SW1.create a virtual interface for VLAN10 with int vlan10.set the address for the virtual interface VLAN10 with ip address 192.168.10.254 255.255.255.0.create a virtual interface for VLAN20 with int vlan20.and set the address for the virtual interface VLAN20 with ip address 192.168.20.254 255.255.255.0.六、动态路由RIPR1:进入e1/0端口,设置IP地址为192.168.3.1,子网掩码为255.255.255.0.进入e2/0端口,设置IP地址为192.168.5.1,子网掩码为255.255.255.0.开启RIP动态路由,并定义IP地址为192.168.3.0和192.168.5.0.使用disp ip route命令查看路由接口。

R2:进入e1/0端口,设置IP地址为192.168.4.1,子网掩码为255.255.255.0.进入e2/0端口,设置IP地址为192.168.5.2,子网掩码为255.255.255.0.开启RIP动态路由,并定义IP地址为192.168.4.0和192.168.5.0.使用disp ip route命令查看路由接口。

注意:vlan10里的计算机的网关设为192.168.10.254,vlan20里的计算机的网关设为192.168.20.254)七、IP访问列表进入e1/0端口,设置IP地址为192.168.3.1,子网掩码为255.255.255.0.进入e2/0端口,设置IP地址为192.168.1.1,子网掩码为255.255.255.0.进入e3/0端口,设置IP地址为192.168.2.1,子网掩码为255.255.255.0.创建一个基本访问列表,编号为2001.拒绝地址为192.168.1.0网段的数据通过,允许地址为192.168.3.0网段的数据通过。

在接口下应用访问控制列表。

启用防火墙,并设置默认允许。

使用dis acl 2001命令显示信息。

使用undo acl number 2001命令删除2001控制列表。

创建一个扩展访问控制列表,编号为3001.规则:禁止源IP为192.168.3.0/0.0.0.255,目的IP为192.168.2.0/0.0.0.255,目的端口为FTP的TCP数据包通过。

该规则必须在r-acl-adv-3001下执行。

命令:permit ip source and n any (rulepermitip)。

应在接口E3/0下启用防火墙,并在防火墙入站规则packet-filter 3001中执行。

标准访问IP列表(三层交换机):允许A组机器访问服务器内资料,但不允许B组机器访问(服务器无限制)。

sysvlan10name servervlan20name XXXvlan30name studentinte1/0/5port access vlan10inte1/0/10port access vlan20inte1/0/15port access vlan30int vlan10ip address 192.168.10.1 255.255.255.0no shutdownint vlan20ip address 192.168.20.1 255.255.255.0int vlan30ip address 192.168.30.1 255.255.255.0acl number 2001rule 1 deny source 192.168.30.0/0.0.0.255rule 2 permit source anydisplay acl 2001inte1/0/10port access vlan20packet-filter outbound ip-group 2001 rule 1出口允许A机器访问B机器的FTP,但不允许访问WWW,机器没有任何限制。

相关文档
最新文档