华为交换机基础配置

1. 系统初始化配置

   sysname HuaweiSwitch  # 设定交换机的名称为HuaweiSwitch

2. IP配置

   interface Vlanif1
   ip address 192.168.1.1 24  # 为Vlanif1接口设置IP地址和子网掩码

3. Web配置

   http server enable  # 启动HTTP服务,允许通过Web管理交换机
   http secure-server enable  # 启动HTTPS服务,增加Web管理的安全性

4. SSH配置

   aaa
   local-user admin password irreversible-cipher Admin@123  # 创建名为admin的用户并设置复杂密码
   local-user admin service-type ssh  # 指定admin用户只能通过SSH访问
   ssh user admin authentication-type password  # admin用户通过密码认证
   ssh server enable  # 启用SSH服务
 

5. Telnet配置

   user-interface vty 0 4
   authentication-mode password  # 设置VTY线路0到4的密码认证模式
   set authentication password cipher Admin@123  # 设置密码
   user privilege level 15  # 赋予最高权限等级
 

6. AAA认证配置

   aaa
   local-user admin password irreversible-cipher Admin@123  # 确认admin的密码
   local-user admin privilege level 15  # 确认admin权限等级
 

7. Console口配置

   user-interface con 0
   authentication-mode password  # 设置控制台口密码认证模式
   set authentication password cipher Admin@123  # 设置控制台密码
 

8. 端口模式配置

   interface Ethernet0/0/1
   port link-type access  # 端口设为接入模式
   port default vlan 10   # 将端口默认VLAN设置为10
 

9. VLAN配置

   vlan 10
   description Office_Network  # 创建VLAN 10并描述为办公网络
 

10. DHCP配置
 
    dhcp enable  # 启用DHCP服务
    ip pool 1  # 定义地址池1
    network 192.168.1.0 mask 255.255.255.0  # 定义网络地址和掩码
    gateway-list 192.168.1.1  # 定义默认网关
  

11. IPSG配置

   interface Ethernet0/0/1
    ip source check user-bind enable  # 在端口上启用IP源守护

12. PoE配置

    interface Ethernet0/0/1
    poe enable  # 在接口上启用PoE

13. ACL配置
 


    acl number 2000
    rule 10 permit ip source 192.168.1.0 0.0.0.255  # 允许192.168.1.0/24的所有IP流量通过
  

14. QoS配置
 

  qos lr outbound interface Ethernet0/0/1 cir 1024 cbs 1024  # 设置接口出站带宽限制
  

15. 链路聚合配置

    interface Eth-Trunk1
    interface Ethernet0/0/1
    eth-trunk 1  # 将Ethernet0/0/1加入到链路聚合组1
  

16. SNMP配置

    snmp-agent sys-info version v2c  # 设置SNMP版本为v2c
    snmp-agent community read public  # 设置读社区名为public
   

17. 静态路由配置

ip route-static 0.0.0.0 0 192.168.1.254  # 设置默认网关地址为192.168.1.254
  

18. OSPF配置


    ospf 1 router-id 1.1.1.1
    area 0.0.0.0
    network 192.168.1.0 0.0.0.255 area 0.0.0.0  # 将192.168.1.0/24纳入OSPF区域0
  

19. VRRP配置

  interface Vlanif1
    vrrp vrid 1 virtual-ip 192.168.1.254  # 在Vlanif1上配置VRRP,虚拟IP为192.168.1.254

20. 光口配置
 

    interface GigabitEthernet0/0/1
    transceiver-mode force-1000  # 强制光纤接口速率为1Gbps
  

  • 3
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

沉默中爆发的IT男

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值