华为设备的简单配置
发表于:2025-12-03 作者:千家信息网编辑
千家信息网最后更新 2025年12月03日,这是以前工作总结出来的配置代码,当时是为了方便所带的人容易上手。代码以交换为主,架构上分为核心层、分布层、接入层三层,部分相同的代码有简略。简单的几条指令,你即可快速上手,在工作中即可应用。#----
千家信息网最后更新 2025年12月03日华为设备的简单配置
这是以前工作总结出来的配置代码,当时是为了方便所带的人容易上手。
代码以交换为主,架构上分为核心层、分布层、接入层三层,部分相同的代码有简略。
简单的几条指令,你即可快速上手,在工作中即可应用。
#-----------虚拟接口---------------------------#1)管理地址interface Vlanif1 description Management ip address 192.168.250.197 255.255.255.0 dhcp select relay dhcp relay server-select dhcpgroup1##2)核心交换虚拟网关接口interface Vlanif2 description Server ip address 192.168.1.2 255.255.255.0#interface Vlanif3 description office ip address 192.168.0.2 255.255.255.0 dhcp select relay dhcp relay server-select dhcpgroup1#-----------Trunk------------------------------------interface GigabitEthernet0/0/24 port link-type trunk port trunk allow-pass vlan 2 to 100 ntdp enable ndp enable bpdu enable#-----------Eth Trunk-------------------------------interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 2 to 4094interface GigabitEthernet0/0/1 eth-trunk 1interface GigabitEthernet0/0/2 eth-trunk 1#-----------IP ROUTE---------------------1)核心交换静态路由 ip route-static 0.0.0.0 0.0.0.0 10.16.0.1 ip route-static 1.1.1.0 255.255.255.0 192.168.9.101 ip route-static 10.0.0.0 255.255.0.0 192.168.9.1001)分布层接入层ip route-static 0.0.0.0 0.0.0.0 192.168.250.1#-----------VLAN-----------------------------vlan 1 description Managementvlan 2 description Servervlan 3 description officeinterface GigabitEthernet 0/0/11#-----------DHCP服务器声明-----------------------------dhcp server group dhcpgroup1 dhcp-server 192.168.1.250 0#-----------Access Port------------------------------#1)defauleinterface GigabitEthernet0/0/1 port link-type access port default vlan 3 stp disable stp edged-port enable ntdp enable ndp enable#2)POE configinterface GigabitEthernet0/0/1 port hybrid pvid vlan 2 port hybrid tagged vlan 9 92 port hybrid untagged vlan 2 stp edged-port enable undo poe enable#-----------认证---------------------------------------------------#1)全局配置 super password level 1 cipher *** super password level 2 cipher *** super password level 3 cipher ***#2)Console配置user-interface con 0 authentication-mode password set authentication password cipher a:FL2/KX#^;Q=^Q`MAF4<1!! idle-timeout 5 0#3)VTY配置user-interface vty 0 4 authentication-mode password idle-timeout 15 0 user privilege level 3#-----------STP---------------------------------------------------#1)公共配置 stp mode rstp stp enable stp pathcost-standard legacy#2)核心层交换 stp instance 0 root primary stp enable#3)分布层交换 stp instance 0 priority 8192 stp enable#4)接入层交换 stp instance 0 priority 16384 stp enable stp mode mstp#5)接入端口配置 stp edged-port enable#-----------LLDP--------------------------------------------------lldp enable#-----------VRRP--------------------------------------------------#1)Master交换机:interface Vlanif1 description Management ip address 192.168.250.250 255.255.255.0 vrrp vrid 1 virtual-ip 192.168.250.1 vrrp vrid 1 priority 120 vrrp vrid 1 preempt-mode timer delay 20#2)Slave交换机:interface Vlanif1 description Management ip address 192.168.250.251 255.255.255.0 vrrp vrid 1 virtual-ip 192.168.250.1#-----------SystemName------------------------------------------------------systemname XXXX 192.168.2.X#--------------------------------------------------------------- storm-control broadcast min-rate 1000 max-rate 2000 storm-control multicast min-rate 1000 max-rate 2000 storm-control unicast min-rate 1000 max-rate 2000 storm-control interval 90 storm-control action block storm-control enable log
配置
核心
接入
代码
交换机
接口
核心层
工作
相同
简略
全局
地址
工作总结
指令
服务器
架构
端口
网关
路由
这是
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
简述数据库系统开发
软件开发人员外包价格
广州奥买家互联网科技
腾讯软件开发员月薪几钱
pdg网络安全
建立单位数据库
软件开发项目交付前准备工作
锡山区咨询软件开发信息推荐
启动虚拟机导致服务器死机
安徽大学计算机网络安全论文
广州第三方软件开发哪家便宜
服务器价格代理
沙田服务器租用
网络安全社团方案
数据库中什么是可串行化调度
nettime提示服务器未开启
深圳做网络安全比较好的公司
学校网络安全管理责任书
灌篮高手服务器爆满
ip网络技术的作用
校园网络安全教育活动简报
手机软件开发app费用
数据库管理手机版ios
王者荣耀有多少服务器
山东科技工业互联网
物理安全是网络安全策略吗
盐城东山精密 软件开发
如何处理云服务器ip攻击
打开数据库显示要密码
mvc 保存到数据库