H3C S3100 交换机常见配置命令

1、进入系统视图:system-view
2、返回用户视图:quit
3、保存配置:save
4、查看当前配置:display current-configuration
5、查看启动配置:display startup-configuration
6、重启交换机:reboot
7、进入接口视图:interface [接口名] 例如:interface GigabitEthernet1/0/1
8、启用接口:undo shutdown
9、禁用接口:shutdown
10、创建VLAN:vlan [VLAN ID] 例如:vlan 10 undo vlan 100
11、为接口分配VLAN:interface [接口名] port access vlan [VLAN ID]
例如:interface GigabitEthernet1/0/1 port access vlan 10

12、配置Trunk接口:interface [接口名]

port link-type trunk

port trunk permit vlan [VLAN列表]

例如:interface GigabitEthernet1/0/1

port link-type trunk

port trunk permit vlan 10,20,30

13、启用端口安全:interface [接口名] port-security enable

例如:interface GigabitEthernet1/0/1 port-security enable

14、配置最大MAC地址数量:port-security max-mac-count [数量]

例如:port-security max-mac-count 1

15、配置静态MAC地址:port-security mac-address [MAC地址]

例如:port-security mac-address 00E0.4C68.0001

16、查看端口安全状态:display port-security interface [接口名]

例如:display port-security interface GigabitEthernet1/0/1

17、查看接口状态:display interface GigabitEthernet1/0/1

18、查看ARP表:display arp

19、查看MAC地址表:display mac-address

20、配置SNMP
[H3C]snmp-agent
[H3C]snmp-agent community read123456 #设置snmp团体名称,权限为只读
[H3C]snmp-agent sys-info version v1 v2c #设置snmp版本v1和v2

21、绑定端口、IP和MAC
system-view
interface interface-type interface-number
port-security mac-address mac-address

interface GigabitEthernet1/0/1
ip verify source mac-address
ip source binding ip-address 192.168.1.12 mac-address 2234-93DF-3234

22、设置用户密码复杂度、登出时间
password-control enable //开启密码策略
password-control aging 7 //7天有效
password-control length 10 //长度为10
password-control composition type-number 3 type-length 1 //密码复杂度(3个字符)
password-control complexity user-name check //密码中不能包含用户名
password-control complexity same-character check //禁止连续3个同样的字符
password-control alert-before-expire 1 //提前1天提示修改密码
undo password-control history en //禁止记住历史密码
password-control login-attempt 5 ex lock-time 1 //密码输入错误5次后,锁定1分钟
undo password-control enable //关闭密码策略
idle-timeout 10 //闲置时间,超时时间10分钟后退出

23、通过cons口登录交换机
1)仅密码登录
system-view
user-interface console 0 //如果没有aux,就选console
]authentication-mode password //认证方式选择密码
set authentication password cipher Huawei@123 //设置密码
quit
2)用户密码登录
system-view
user-interface console 0 //如果没有aux,就选console
]authentication-mode scheme
quit
local-user 用户名
password simple 密码
service-type terminal
quit

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值