H3C S5130S 交换机配置

1、设置交换机名称

//进入配置模式
<H3C>sys
//为交换机命令
[H3C]sysname NB12

2、配置vlan和设置端口类型

//新建VLAN
[NB12]VLAN 301
//将1-24口加入VLAN 301
[NB12-vlan301]port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/24
//配置虚拟VLAN
[NB12]VLAN 2000
//为虚拟VLAN分配地址
[NB12-vlan2000]ip address 172.50.20.239 255.255.255.0
//光口设置成Truck口
[NB12]int GigabitEthernet 1/0/25
[NB12-GigabitEthernet1/0/25]port link-type trunk
[NB12-GigabitEthernet1/0/25]port trunk permit vlan all
//配置交换机snmp协议,供zabbix连接使用
[NB12]snmp-agent
[NB12]snmp-agent sys-info version all

3、交换机开启SSH登陆

//创建一个用户,用户名为wllt
[NB12]local-user wllt
//为该用户配置密码,simple指定以明文方式配置密码,cipher指密文
//遇到报错the new password is too short. It must contain at least 10 characters
//密码长度不够导致,更改密码限制[NB12]password-control length 4
[NB12-luser-manage-wllt]password simple admin@123411111111
//设置该用户ssh服务类型
[NB12-luser-manage-wllt]service-type ssh
//该用户的用户角色user-role为level-3,数值越小,用户的权限的级别越低
[NB12-luser-manage-wllt]authorization-attribute user-role level-3
[NB12-luser-manage-wllt]quit
//配置对ssh用户使用缺省的本地认证,进入vty0~63用户线,系统支持64个vty用户同时访问
//vty口属于逻辑终端线,用户对设备进行telnet或ssh访问
[NB12]user-interface vty 0 4
//使用本地认证授权模式(认证模式为scheme)
[NB12-line-vty0-4]authentication-mode scheme
//设置认证类型仅为ssh
[NB12-line-vty0-4]protocol inbound ssh
[NB12-line-vty0-4]quit
//打开ssh服务
[NB12]ssh server enable

4、配置静态路由

//根据企业实际路由进行配置
[NB12]ip route-static 0.0.0.0 0 172.50.20.2

5、保存配置

[NB12]save
The current configuration will be written to the device. Are you sure? [Y/N]:
选择Y,确定将当前运行配置写进设备存储介质中。
(To leave the existing filename unchanged, press the enter key):
直接回车
flash:/startup.cfg exists, overwrite? [Y/N]:
选择Y

附加:H3C交换机清空配置命令

<H3C>reset saved-configuration 
<H3C>reboot
reboot之后,先点N,再点Y
  • 2
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值