zoukankan      html  css  js  c++  java
  • 华为ENSP------access、trunk、hybrid配置连载2

    1、Access:

    特点:有且只能属于一个Vlan。

    配置文件:vlan batch 2 3

                     port link-type access

                      port default vlan 2

    2、Trunk:

    特点:可以承载多个vlan的流量。

    拓扑图:

    配置文件:

    SW1:

    [sw1]vlan batch 10 20

    [sw1]interface Ethernet0/0/1

    [sw1-Ethernet0/0/1]port link-type access 

    [sw1-Ethernet0/0/1]port default vlan 10

    [sw1]interface Ethernet0/0/2

    [sw1-Ethernet0/0/2]port link-type access 

    [sw1-Ethernet0/0/2]port default vlan 20

    [sw1]interface Ethernet0/0/3

    [sw1-Ethernet0/0/3]port link-type trunk 

    [sw1-Ethernet0/0/3]port trunk allow-pass vlan 10 20

    SW2:

    [sw2]vlan batch 10 20

    [sw2]interface Ethernet0/0/1

    [sw2-Ethernet0/0/1]port link-type access 

    [sw2-Ethernet0/0/1]port default vlan 10

    [sw2]interface Ethernet0/0/2

    [sw2-Ethernet0/0/2]port link-type access 

    [sw2-Ethernet0/0/2]port default vlan 20

    [sw2]interface Ethernet0/0/3

    [sw2-Ethernet0/0/3]port link-type trunk 

    [sw2-Ethernet0/0/3]port trunk allow-pass vlan 10 20

    用PC1去ping一下PC3

    两个PC可以互相通信。

    3、hybrid

    特点:混合接口,可以选择是以access还是trunk接口属性工作

    拓扑图:

    配置文件:

    SW1 
    #
    sysname sw1
    #
    vlan batch 10 20 100
    #
    interface Ethernet0/0/1
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10 100
    #
    interface Ethernet0/0/2
     port hybrid pvid vlan 20
     port hybrid untagged vlan 20 100
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 2 to 4094

    SW2 
    #
    sysname sw2
    #
    vlan batch 10 20 100
    #
    interface Ethernet0/0/1
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10 100
    #
    interface Ethernet0/0/2
     port hybrid pvid vlan 20
     port hybrid untagged vlan 20 100
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 2 to 4094
    #
    interface GigabitEthernet0/0/2
     port hybrid pvid vlan 100
     port hybrid untagged vlan 2 to 4094
     

  • 相关阅读:
    [WM]谁抢走了应用程序的性能?
    只有更烂的程序员
    [WM]n久以前写的ConnMgr类
    [WM][转]PPC中如何找到正在使用中的网络(源代码)
    让IE6支持minwidth和maxwidth的方法(JS实现) + (CSS实现)
    jQuery tab 切换函数
    wap、3g手机的端的网页头部
    复制到系统剪贴板之IE,ff兼容版
    鼠标滑过展开,js版和jquery版
    JS+CSS实现网页滚动条美化
  • 原文地址:https://www.cnblogs.com/tianzhendengni/p/13982582.html
Copyright © 2011-2022 走看看