实战篇【3】-HUAWEI交换机开局基础配置

本篇文章为“Huawei交换机开局基础配置”,主要涵盖配置管理地址、聚合端口、静态路由、ACL,SSH远程管理、Console、SNMP、NTP时钟、日志主机等内容,方便调试人员远程管理、调试。

区别于“H3C交换机开局基础配置”只是厂商间命令形式的差别,功能实现上一致;

目录

#Step-1_设备名称配置:

#Step-2_邻居发现协议:

#Step-3_VLAN配置:

#Step-4_管理IP配置:

#Step-5_链路聚接口配置:

#Step-6_静态路由配置:

#Step-7_ACL配置:(可选)

#Step-8_本地账号配置:

#Step-9_SSH配置:

#Step-10_终端登录,Console配置:

#Step-11_终端登录,VTY配置:

#Step-12_网络管理协议SNMP配置:

#Step-13_NTP时钟配置:

#Step-14_日志主机配置:

#Step-15_生成树配置(可选):

#Step-16_保存配置:


#Step-1_设备名称配置:

system-view
sysname Core_S7503X

#Step-2_邻居发现协议:

lldp enable

#Step-3_VLAN配置:

vlan 100 
#
vlan 100
 description For_Device_Manage

#Step-4_管理IP配置:

interface Vlanif100
 description For_DevManage_Vlanif
 ip address 172.28.115.254 255.255.255.0
 quit
interface GigabitEthernet 1/0/1
 port link-type access
 port access vlan 100

#Step-5_链路聚接口配置:

interface Eth-Trunk1
Quit
interface Eth-Trunk11
Quit
#
interface Eth-Trunk1
mode lacp

trunkport GigabitEthernet 0/0/47 to  0/0/48
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 100
#
interface Eth-Trunk11
mode lacp

trunkport GigabitEthernet 0/0/1 to  0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 100
Quit

#Step-6_静态路由配置:

ip route-static 0.0.0.0 0 X.X.X.X  description To_DefaultRoute

#Step-7_ACL配置:(可选)

acl 3000
 rule 5 permit ip source X.X.X.X 0 destination For_Device_Manage_Server

acl 3001
 rule 5 permit ip source X.X.X.X 0 destination For_eSight_Server

#Step-8_本地账号配置:

aaa
  local-user admin password cipher Admin@123
  local-user admin service-type ssh
  local-user admin privilege level 15
  local-aaa-user password policy administrator
  password alert original    #删除初始密码修改提醒功能

#Step-9_SSH配置:

stelnet server enable
或者
ssh server-source -i  Vlanif100
V200R020及之后版本您还需要执行ssh server-source命令配置服务器端的源接口,才能连接到设备。
#

rsa local-key-pair create
2048

#
ssh user admin authentication-type password 
ssh user admin service-type all

#Step-10_终端登录,Console配置:

user-interface con 0
authentication-mode password
set authentication password cipher Admin@123
screen-length 0
#指定下一屏所显示的行数,取值范围为0~512,0表示一次性显示全部信息,即不进行分屏显示。

#Step-11_终端登录,VTY配置:

user-interface vty 0 14
acl 3000 inbound
authentication-mode aaa
protocol inbound ssh
screen-length 0

#Step-12_网络管理协议SNMP配置:

snmp-agent	
snmp-agent acl 3001
snmp-agent community read simple SNMP@Read mib-view view_all 
snmp-agent community write simple SNMP@Write mib-view view_all 
snmp-agent sys-info location XXXX
snmp-agent sys-info version v2c
snmp-agent mib-view included view_all iso
snmp-agent trap enable
snmp-agent target-host trap address udp-domain X.X.X.X params securityname Trap@Auth v2c

#Step-13_NTP时钟配置:

clock timezone BeiJing add 08:00:00
ntp-service unicast-server X.X.X.X source-interface Vlanif100
#因北京处于+8时区,时间偏移量增加了8;所以在配置时,就需要在系统默认的UTC时区的基础上,加上偏移量8,才能得到预期的BJ时区。

#Step-14_日志主机配置:

info-center enable   
info-center loghost source Vlanif100
info-center loghost X.X.X.X facility local6

#Step-15_生成树配置(可选):

stp global enable
#默认开启
stp instance 0 priority 0
#此命令适用于核心交换机,手动指定核心交换机为根

interface Eth-Trunk1
stp edged-port
stp port bpdu-filter enable

说明:
1、上联防火墙的端口开启边缘端口;
	边缘端口快速进入转发状态;
	边缘端口的UP/DOWN不会导致交换机发送TCN/TC BPDU,增强STP网络的稳定性;
 2、上联防火墙的端口开启BPDU过滤;
	配置为边缘端口后,端口仍然会发送BPDU报文,这可能导致BPDU报文发送到其他网络,引起其他网络产生震荡。
	因此可以配置边缘端口的BPDU报文过滤功能,使边缘端口不处理、不发送BPDU报文。

#Step-16_保存配置:

Return
#
Save 

  • 12
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值