H3C交换机基础配置1

1.H3C交换机修改交换机名字:

<H3C>system-view 
[H3C]sysname test

2、设置登录用户的认证方式为AAA认证(Scheme)

[test] user-interface vty 0 4

[test-line-vty0-4]authentication-mode scheme # 设置用户接口上的认证模式为AAA认证。 [test-line-vty0-4]protocol inbound ssh # 设置用户接口上支持SSH协议。

3.H3C交换机修改密码:

[test]local-user admin class manage 
New local user added.
[test-luser-manage-admin]password simple Admin123456
[test-luser-manage-admin]%Jul 22 17:10:48:698 2024 test LS/5/LS_PWD_CHGPWD: The password of local device-management user admin was modified.
[test-luser-manage-admin]authorization-attribute user-role  level-15
[test-luser-manage-admin]service-type ssh terminal 
[test-luser-manage-admin]authorization-attribute user-role network-operator  # 创建本地用户admin,并设置用户密码、服务类型和用户角色。

 4.H3C交换机SSH远程登录配置:

[test]public-key local create rsa  # 生成RSA密钥对。
[test]public-key local create dsa  # 生成DSA密钥对。
[test]ssh server enable # 使能SSH服务器功能。 

5.H3C交换机DNS配置:

[test]dns domain www.baidu.com
[test]dns server 180.76.76.76

 6.H3C交换机NTP配置 :

[test]clock protocol ntp #时钟协议ntp开启
[test]clock timezone bei'jing add 8
[test]ntp-service enable  #开启ntp服务
[test]ntp-service unicast-server 120.25.115.20  #配置同步阿里云ntp
[test]ntp-service unicast-server 203.107.6.88  #配置同步阿里云ntp

7.H3C交换机snmp配置 

[test]snmp-agent #开启SNMP Agent服务
[test]snmp-agent community read public #配置设备的读团体名
[test]snmp-agent community write private #配置设备的读团体名
[test]snmp-agent sys-info version v2c v3 #配置SNMP的协议版本为SNMPv2c v3
[test]snmp-agent target-host trap address 192.168.200.200 #配置接收目标主机IP地址[test]snmp-agent trap enable #开启设备发送Trap报文的功能

8.H3C交换机配置密码复杂度

1)举例:口令长度不低于12位,为数字、字母、特殊字符混合组合;密码有效期限为90天;输入密码次数过多后锁定。用户成功登录后10分钟内无任何操作,则断开该登录连接 。

[test]password-control enable  #开启密码策略
[test]password-control length 12  #配置密码长度最短为12位
[test]password-control composition type-number 3 type-length 1  #密码复杂度为包含3种类型
[test]password-control login-attempt 5 exceed lock-time 5  #配置本地帐号连续输入错误密码的限制次数为5次,本地帐号锁定时间为5分钟
[test]password-control aging 90  #配置密码失效时间为90天,默认即90天
[test]password-control alert-before-expire 30  #配置密码过期前30天提醒
[test]password-control history 5  #配置历史密码记录为5条
[test]password-control login idle-time 0  #配置用户帐号的闲置时间为无限制
[test]line vty 0 4
[test]idle-timeout 10  #配置远程登录的闲置超时时间为为10分钟,默认为10分钟

2)登录源IP限制 

[test]acl number 2000 name sourlimit 
[test-acl-basic-2001-sourlimit]rule 11 permit source 10.1.1.100 0
[test-acl-basic-2001-sourlimit]rule 12 permit source 10.1.2.100 0
[test-acl-basic-2001-sourlimit] rule 15 permit source 10.1.3.100 0
[test-acl-basic-2001-sourlimit] rule 21 permit source 10.1.4.100 0
[test]ssh server acl 2000

  3)管理员三权分开

local-user admin class manage
 service-type ssh terminal
 authorization-attribute user-role level-15  #系统管理员分配管理级权限,即有全部权限
 authorization-attribute user-role network-operator

local-user audit class manage
 service-type ssh terminal
 authorization-attribute user-role level-1  #审计管理员分配监控级权限,只有部门查看权限
 undo authorization-attribute user-role network-operator
 password simple Abc123123#

local-user security class manage
 service-type ssh terminal
 authorization-attribute user-role level-2  #安全管理员分配配置级权限,有日常配置查看和修改的权限,不能进行FTP、文件下载、故障诊断等
 undo authorization-attribute user-role network-operator
 password simple Abc123123#

  • 5
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值