华为交换机常用配置

一、SSH配置
[Huawei]rsa local-key-pair create #创建SSH key
[Huawei]aaa
[Huawei-aaa]undo local-user policy security-enhance #关闭用户安全策略
[Huawei-aaa]local-user admin password irreversible-cipher xxxxxxxxxx #设置用户密码
[Huawei-aaa]local-user admin service-type ssh
[Huawei-aaa]local-user admin user-group manage-ug
[Huawei]stelnet server enable #开启SSH服务
[Huawei]ssh server acl 2000 #ssh服务上调用acl
[Huawei]ssh server-source all-interface #在所有接口上启用ssh,先开启此命令才能进vty接口
[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]user privilege level 3
[Huawei-ui-vty0-4]protocol inbound ssh

二、配置还原
[Huawei] ssh client first-time enable
[Huawei] scp root@[backupserver]:/root/backup.cfg flash:/backup.cfg   #拷贝配置文件到交换机
[Huawei] reset saved-configuration    #清除配置
[Huawei] copy flash:/backup.cfg flash:/startup.cfg
注:
如提示error flash:/startup.cfg is protected错误请先清除配置
<Huawei> startup saved-configuration flash:/startup.cfg   #修改交换机默认启动加载的配置文件为startup.cfg
[Huawei] clear configuration interface GigabitEthernet0/0/1     #清除接口配置
[Huawei-GigabitEthernet0/0/1] clear configuration this     #清除接口配置

三、H3C防火墙流统配置

[H3C]acl advanced 3444
[H3C-acl-ipv4-adv-3444]rule permit ip source 10.10.1.1 0
[H3C-acl-ipv4-adv-3444]rule permit ip destination 10.10.2.1 0
[H3C]traffic classifier test operator and
[H3C-classifier-test]if-match acl 3444
[H3C]traffic behavior test
[H3C-behavior-test]accounting packet  # 按包进行流量统计(虚墙无此命令)
[H3C-behavior-test]filter permit
[H3C]qos policy test
[H3C-qospolicy-test]classifier test behavior test
[H3C]int ragg3.1132
[H3C-Route-Aggregation3.1132]qos apply policy test inbound
[H3C-Route-Aggregation3.1132]qos apply policy test outbound
<H3C>dis qos policy interface ragg3.1132 | in Pack
<H3C>display acl 3444
<H3C>debugging ip pa acl 3444
<H3C>debugging aspf pa acl 3444
<H3C>debugging ip in acl 3444
<H3C>debugging security-policy packet ip acl 3444
<H3C>terminal debugging
<H3C>undo debugging all

参考链接:
       https://support.huawei.com/enterprise/zh/doc/index.html           # 华为网络设备配置查询
       https://www.h3c.com/cn/d_202303/1816258_30005_0.htm       # H3C QOS配置

posted @ 2021-01-02 13:21  風£飛  阅读(705)  评论(0)    收藏  举报