当前位置:   article > 正文

华为ensp 二层交换机的基础配置_华为二层交换机配置

华为二层交换机配置

实验一:

使用一台交换机通过VLAN来隔离不同网段之间的通信

提前配置好IP及端口地址

LSW1配置:

  1. #
  2. vlan batch 10 20
  3. #
  4. interface Ethernet0/0/1
  5. port link-type access
  6. port default vlan 10
  7. #
  8. interface Ethernet0/0/2
  9. port link-type access
  10. port default vlan 20
  11. #
  12. interface Ethernet0/0/3
  13. port link-type access
  14. port default vlan 10
  15. #

pc1只能ping通pc3 ,pc2被隔离无法ping通

 实验二:

使用两台交换机实现相同vlan互通,不同vlan不通。

提前配置好ip地址及端口地址

LSW1配置:

  1. #
  2. sysname LSW1
  3. #
  4. vlan batch 10 20
  5. #
  6. interface Ethernet0/0/1
  7. port link-type access
  8. port default vlan 10
  9. #
  10. interface Ethernet0/0/2
  11. port link-type access
  12. port default vlan 20
  13. #
  14. interface Ethernet0/0/3
  15. port link-type trunk
  16. port trunk allow-pass vlan 10 20
  17. #

LSW2配置:

  1. #
  2. sysname LSW2
  3. #
  4. vlan batch 10 20
  5. #
  6. #
  7. interface Ethernet0/0/1
  8. port link-type access
  9. port default vlan 10
  10. #
  11. interface Ethernet0/0/2
  12. port link-type access
  13. port default vlan 20
  14. #
  15. interface Ethernet0/0/3
  16. port link-type trunk
  17. port trunk allow-pass vlan 10 20
  18. #

pc1 ping pc3 互通

 pc2 ping pc4 互通

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/459914
推荐阅读
相关标签
  

闽ICP备14008679号