开局主要配置
设备命名
system-view
sysname xxxxxxx
配置管理地址
ip vpn-instance MGMT //创建vpn实例,实现管理和业务流量隔离
route-distinguisher 1:1
description For_Manage
#
interface M-GigabitEthernet 0/0/0
ip binding vpn-instance MGMT //绑定vpn实例
description For_Manage
ip address 1.1.1.1 255.255.255.0
#
//配置管理路由
ip route-static vpn-instance MGMT 0.0.0.0 0 1.1.1.254 description For_Manage_Gateway
配置远程登录
acl basic 2001 //配置SSH访问控制
description For_SSH
rule 10 permit vpn-instance MGMT source 1.1.1.0 0.0.0.255 //管理网配置了vpn实例
rule 1000 deny vpn-instance MGMT
#
//配置用户名密码
local-user h3c class manage
password-control length X //密码长度4-32字符
password simple XXXXX
service-type ssh terminal
authorization-attribute user-role level-15 //权限
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
authorization-attribute idle-cut 10 //超时时间
//关闭telnet,开启ssh,绑定acl
undo telnet server enable
ssh server enable
ssh server acl 2001
line vty 0 63
authentication-mode scheme
user-role level-15
user-role network-admin
user-role network-operator
protocol inbound ssh
idle-timeout 10 0
#
//配置console口密码
line aux 0
authentication-mode password
set authentication password simple XXX
idle-timeout 10 0
#
配置时区NTP
clock timezone China add 08:00:00 //东八区
ntp-service enable
ntp-service source M-GigabitEthernet 0/0/0 //指定源接口
ntp-service unicast-server XXXX vpn-instance MGMT priority
配置SNMP
snmp-agent
snmp-agent community read XXXX //团体名
snmp-agent sys-info version v2c //版本
snmp-agent target-host trap address udp-domain XXXX vpn-instance MGMT params securityname 团体名 v2c
snmp-agent trap enable
snmp-agent trap source M-GigabitEthernet0/0/0
配置syslog
info-center enable
info-center logbuffer size 1024
info-center loghost vpn-instance MGMT XXXX
info-center loghost source M-GigabitEthernet0/0/0
info-center source default loghost level warning //告警级别