华为交换机配置命令
华为路由器交换机配置命令大全
![华为路由器交换机配置命令大全](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/bc9ca59228ea81c758f5785a.png)
华为交换机配置命令超详解华为3COM交换机配置命令详解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 0/1 ;进入接口视图[Quidway]interface vlan x ;进入接口视图;配置VLAN的IP地址;静态路由=网关3、telnet配置[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 ;用户级别4、端口配置[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]undo shutdown ;激活端口[Quidway-Ethernet0/2]quit ;退出系统视图5、链路聚合配置[DeviceA] link-aggregation group 1 mode manual ;创建手工聚合组1[DeviceA] interface ethernet 1/0/1 ;将以太网端口Ethernet1/0/1加入聚合组1[DeviceA-Ethernet1/0/1] port link-aggregation group 1[DeviceA-Ethernet1/0/1] interface ethernet 1/0/2 ;将以太网端口Ethernet1/0/1加入聚合组1[DeviceA-Ethernet1/0/2] port link-aggregation group 1[DeviceA] link-aggregation group 1 service-type tunnel # 在手工聚合组的基础上创建Tunnel业务环回组。
华为路由器交换机常用命令
![华为路由器交换机常用命令](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/675ae3e00408763231126edb6f1aff00bfd5704a.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/7aa456693a3567ec102de2bd960590c69fc3d875.png)
华为交换机基本配置命令华为交换机基本配置命令一、单交换机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:进入系统视图。
华为交换机配置命令详解
![华为交换机配置命令详解](https://img.taocdn.com/s3/m/f7faf6f2afaad1f34693daef5ef7ba0d4a736d14.png)
华为交换机配置命令详解华为交换机配置命令详解华为是全球领先的电信解决方案供应商。
我们拥有热诚的员工和强大的研发能力,快速响应客户需求,提供端到端的`客户化产品、解决方案和服务,全力帮助客户商业成功,并通过我们的共同努力,不断丰富人们的沟通和生活。
下面给大家介绍华为交换机配置命令详解,一起来了解一下吧!duplex{full|half} //设置双工模式undo duplex //恢复双工模式为缺省值negotiation auto //开启接口自动协商功能(默认开启)speed //修改接口速率undo speed //恢复默认接口改为全双工[Huawei-GigabitEthernet0/0/1]undo negotiation auto[Huawei-GigabitEthernet0/0/1]duplex fulldis vlan 查看vlan划分VLAN:[Huawei-GigabitEthernet0/0/1]port link-type access //接口模式设置成access//可写成p l a[Huawei-GigabitEthernet0/0/1]port default vlan 10 //加入vlan10//可写成 p d v 10接口模式:默认hybird access trunk(802.1q)[sw1-GigabitEthernet0/0/3]port trunk allow-pass vlan all //允许所有vlan通过//可写成p t a v a设置虚拟路由:接口模式下思科私有HSRP GLBPvrrp vrid 1 virtual-ip+虚拟ip 走master 备份backup 优选ip地址大的为mastervrrp vrid 1 priority 105 //调整优先级为105vrrp vrid 1 track int 接口//上行链路跟踪(如果不配,上行不通master会传给备份)//接口断开会把优先级-10创建两个vrid 互为备份STP:BPDU桥接数据单元交换机之间发送 RP根端口 DP指定端口BID:优先级(32768)+扩展ID+MAC地址优先级修改必须为4096的倍数1.非根交换机只有一个根端口2.到根交换机花费最小的口是根端口3.花费相同,发送者的BID小的是根端口4.比较发送者的PID(端口优先级默认128+端口号)5.比较接收者的PID同一条链路只有一个DP 1.RP对端的是DP 2.无RP链路比到根的花费小的不是RP也不是DP将被阻塞 AP端口状态:Down-blocking(AP只能接收BPDU)20s-listening(接收和发送BPDU)15s-learning(学习MAC)15s-forwarding(正常) 从连接到传输经过30-50sdis stp查看STP生成树stp mode修改生成树算法stp priority 4096的倍数设置优先级生成树算法:802.1D-STP(慢,有三种端口角色30-50s),802.1W-RSTP(快,有四种端口角色毫秒)生成树模式:PVST+(思科私有),CST-单生成树-所以vlan一棵树,MSTP(802.1S)多生成树华为:RSTP,MSTP当网络发生变化时,向上游发送TCNTCN:4字节TCA:回复TCNTC:TCA的确认端口聚合两个模式:1.手动模式:方法1interface Eth-Trunk 1 //进入聚合端口trunkport g0/0/1 //添加端口dis current-configuration方法2interface Eth-Trunk 1qint g0/0/1eth-trunk 1disp eth-trunk 1CP(链路聚合控制协议)模式interface Eth-Trunk 1mode lacp 更改模式trunkport g0/0/1max active-linknumber 2 设置最大连接端口数lacp preempt enable 开启抢占机制优先级低是主设备延时30s lacp priority 设置设备/接口优先级lacp preempt delay 10 设置抢占延时。
华为交换机常用配置命令
![华为交换机常用配置命令](https://img.taocdn.com/s3/m/e4ad46f6941ea76e58fa0467.png)
华为交换机基本配置命令一、单交换机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。
华为交换机命令大全
![华为交换机命令大全](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/5fb04c3583c4bb4cf7ecd120.png)
华为交换机配置命令大全l 命令行解释器对关键字采取不完全匹配的搜索方法,用户只需键入无冲突关键字即可解释,如display命令,键入disp即可。
2.1.1 命令行视图S2000B系列以太网交换机的命令行视图是针对不同的配置要求实现的,它们之间有联系又有区别,比如,与S2000B系列建立连接即进入用户视图,它只完成查看运行状态和统计信息的简单功能,再键入system-view进入系统视图,在系统视图下,可以键入不同的命令进入相应的视图。
命令行提供如下视图:l 用户视图l 系统视图l 用户界面视图l VLAN视图l 以太网端口视图视图关系简图如图2-1所示:图2-1 视图关系简图各命令视图的功能特性、进入各视图的命令等细则如表2-1所示。
表2-1 命令视图功能特性列表视图功能提示符进入命令退出命令用户视图查看交换机的简单运行状态和统计信息查看交换机的全部运行状态和统计信息,进行文件管理和系统管理<Quidway>与交换机建立连接即进入quit断开与交换机连接系统视图配置系统参数[Quidway]在用户视图下键入system-viewquit返回用户视图return返回用户视图以太网端口视图配置以太网端口参数[Quidway-Ethernet0/1]固定以太网端口视图:在系统视图下键入interface ethernet0/1quit返回系统视图return返回用户视图[Quidway-Ethernet1/1]扩展百兆以太网端口视图:在系统视图下键入interface ethernet 1/1VLAN视图配置VLAN参数[Quidway-vlan1]在系统视图下键入vlan 1quit返回系统视图return返回用户视图用户界面视图配置用户界面参数[Quidway-ui-aux0]在系统视图下键入user-interface auxquit返回系统视图return返回用户视图(1) 在任一视图下,键入<?>获取该视图下所有的命令及其简单描述。
华为路由器交换机配置命令大全
![华为路由器交换机配置命令大全](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/915b3837a66e58fafab069dc5022aaea998f419d.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/03d9370d90c69ec3d5bb7568.png)
华为交换机配置命令大全6.2 配置文件管理6.2.1 配置文件内容及格式配置文件为一文本文件,其格式如下:l 以命令格式保存。
l 为了节省空间,只保存非缺省的常数。
l 命令的组织以命令模式为基本框架,同一命令模式的命令组织在一起,形成一节,节与节之间通常用空行或注释行隔开(以#开始的为注释行)。
l 以end为结束。
6.2.2 显示当前配置和起始配置S2000B系列以太网交换机上电时,从Flash Memory(闪速存储器)中读取配置文件进行以太网交换机的初始化工作,因此将Flash Memory中的配置文件称为起始配置。
如果Flash Memory中没有配置文件,以太网交换机则使用缺省参数进行初始化。
与起始配置相对应,S2000B系列运行过程中正在生效的配置称为当前配置。
在所有视图下执行display命令可以显示当前配置和起始配置的相关信息。
表6-5 显示S2000B系列配置操作命令显示起始配置display saved-configuration显示当前配置display current-configuration需要注意的是,如果以太网交换机上电之后工作不正常,可以执行displaysaved-configuration命令查看交换机的启动配置,以定位问题所在。
当用户完成一组配置后,需要验证配置是否正确时,可以执行display current-configuration 命令来查看当前生效的参数。
对于某些参数,虽然用户已经配置,但如果这些参数所在的功能没有生效,则不予显示。
对于某些正在生效的配置参数,如果与缺省工作参数相同,也不显示。
& 说明:配置文件的显示格式与保存格式相同。
例:显示Flash Memory中以太网交换机的配置文件。
display saved-configuration#sysname Quidway#hgmp enable#qos 10#user-interface auxspeed 9600#vlan 1#vlan 2047# interface Ethernet0/1duplex fullspeed 10undo priority# interface Ethernet0/2 undo priority#interface Ethernet0/3undo priority#---- More ----例:显示以太网交换机当前生效的配置参数。
华为路由器交换机配置命令大全
![华为路由器交换机配置命令大全](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/cd99c7150b4e767f5acfcedd.png)
华为交换、路由器常见命令路由器基本配置命令举例[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,这个端口既不能被创建也不能被删除。
华为交换机常用命令配置介绍
![华为交换机常用命令配置介绍](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)。
华为交换机配置命令
@123
3.举例
一:创建vlan并设置ip地址
Vlan10 (批量添加vlan可输入vlan batch 10 20 30 )
[Quitdway]interface vlan10
[Quitdway-Vlan10]ip address _24
[Quitdway-Vlan10]dhcp select interface (全局开启dhcp) [Quitdway-Vlan10]quit
二:批量添加端口到Vlan并设access模式
[Quitdway]port-group 1 创建组
[Quitdway-port-group-1]group-member Eth 0/0/1 to Eth 0/0/8 [Quitdway-port-group-1]port link-type access
[Quitdway-port-group-1]port default vlan 10
三:开启DHCP设置时间和DNS
[Quitdway]dhcp edable
[Quitdway]quit
[Quitdway]interface vlan 10
[Quitdway-Vlan10]dhcp server excluded-ip-address (在指定的ip 池中去掉已指派的ip)
[Quitdway-Vlan10]dhcp server lease day 30 hour 0 minute 0
[Quitdway-Vlan10]dhcp server dns-list
四:建立对接口并设置路由
[Quitdway]vlan 100
[Quitdway vlan 100]ip address _24(与上一级路由的ip段一致) [Quitdway vlan 100]quit
[Quitdway]interface Gi 0/0/24
[Quitdway Gi 0/0/24]port link-type access
[Quitdway Gi 0/0/24]port default vlan 100(24口加入到vlan100) [Quitdway Gi 0/0/24]quit
[Quitdway]ip route-static __(上一级网关)
注释:在上一级路由器上设置
目的地址:
下一跳:
五:设置trunk口类型接口
[Quitdway]interface gi 0/0/24
[Quitdway Gi 0/0/24]port link-type trunk
[Quitdway Gi 0/0/24]port trunk allow-pass vlan all(允许所有vlan 通过)。