• Trunk 允许通过的vlan研究


    新的ENSP显示

    【配置1】

    [sw1-GigabitEthernet0/0/1]dis this

    #

    interface GigabitEthernet0/0/1

    port link-type trunk

    undo port trunk allow-pass vlan 1 //不允许任何vlan通过

    [sw1-GigabitEthernet0/0/1]dis port vl ac

    T=TAG U=UNTAG

    -------------------------------------------------------------------------------

    Port Link Type PVID VLAN List

    -------------------------------------------------------------------------------

    GE0/0/1 trunk 1 - //接口还在 但是不允许任何vlan通过

    GE0/0/2 hybrid 1 U: 1

    GE0/0/3 hybrid 1 U: 1

    GE0/0/4 hybrid 1 U: 1

    [sw1-GigabitEthernet0/0/1]dis port v

    Port Link Type PVID Trunk VLAN List

    -------------------------------------------------------------------------------

    GigabitEthernet0/0/1 trunk 1 -

    GigabitEthernet0/0/2 hybrid 1 -

    GigabitEthernet0/0/3 hybrid 1 -

    GigabitEthernet0/0/4 hybrid 1 -

    GigabitEthernet0/0/5 hybrid 1 -

    【配置2】

    [sw1-GigabitEthernet0/0/1]dis th

    #

    interface GigabitEthernet0/0/1

    port link-type trunk

    port trunk allow-pass vlan 2 to 4094 //允许所有vlan通过 默认vlan1也可以 不打tag

    #

    [sw1-GigabitEthernet0/0/1]dis port vl ac

    T=TAG U=UNTAG

    -------------------------------------------------------------------------------

    Port Link Type PVID VLAN List

    -------------------------------------------------------------------------------

    GE0/0/1 trunk 1 U: 1

    T: 10 20 30

    GE0/0/2 hybrid 1 U: 1

    GE0/0/3 hybrid 1 U: 1

    GE0/0/4 hybrid 1 U: 1

    [sw1-GigabitEthernet0/0/1]dis port v

    Port Link Type PVID Trunk VLAN List

    -------------------------------------------------------------------------------

    GigabitEthernet0/0/1 trunk 1 1-4094 //trunk口 允许所有vlan通过 及时vlan不存在

    GigabitEthernet0/0/2 hybrid 1 -

    GigabitEthernet0/0/3 hybrid 1 -

    GigabitEthernet0/0/4 hybrid 1 -

    GigabitEthernet0/0/5 hybrid 1 -

    【配置3】

    [sw1-GigabitEthernet0/0/1]dis this

    #

    interface GigabitEthernet0/0/1

    port link-type trunk

    undo port trunk allow-pass vlan 1

    port trunk allow-pass vlan 2 to 4094

    #

    [sw1-GigabitEthernet0/0/1]dis port vl ac

    T=TAG U=UNTAG

    -------------------------------------------------------------------------------

    Port Link Type PVID VLAN List

    -------------------------------------------------------------------------------

    GE0/0/1 trunk 1 T: 10 20 30

    GE0/0/2 hybrid 1 U: 1 //其他端口 默认vlan1 都是untag

    GE0/0/3 hybrid 1 U: 1

    [sw1-GigabitEthernet0/0/1]dis port v

    Port Link Type PVID Trunk VLAN List

    -------------------------------------------------------------------------------

    GigabitEthernet0/0/1 trunk 1 2-4094 //trunk口允许通过的vlan为2-4094

    GigabitEthernet0/0/2 hybrid 1 -

    GigabitEthernet0/0/3 hybrid 1 -

    GigabitEthernet0/0/4 hybrid 1 -

    GigabitEthernet0/0/5 hybrid 1 -

    GigabitEthernet0/0/6 hybrid 1 -

    【配置4】

    1 -

    [sw1-GigabitEthernet0/0/2]dis this

    #

    interface GigabitEthernet0/0/2

    port hybrid tagged vlan 10

    port hybrid untagged vlan 20 30

    #

    [sw1-GigabitEthernet0/0/2]

    [sw1-GigabitEthernet0/0/2]dis port vl ac

    T=TAG U=UNTAG

    -------------------------------------------------------------------------------

    Port Link Type PVID VLAN List

    -------------------------------------------------------------------------------

    GE0/0/1 trunk 1 T: 10 20 30

    GE0/0/2 hybrid 1 U: 1 20 30

    T: 10

    GE0/0/3 hybrid 1 U: 1

    GE0/0/4 hybrid 1 U: 1

    [sw1-GigabitEthernet0/0/2]dis port vl

    Port Link Type PVID Trunk VLAN List

    -------------------------------------------------------------------------------

    GigabitEthernet0/0/1 trunk 1 2-4094 //表示trunk中允许通过的vlan

    GigabitEthernet0/0/2 hybrid 1 10 //标识hybrid中打标签的vlan vlan 20 30

    GigabitEthernet0/0/3 hybrid 1 -

    GigabitEthernet0/0/4 hybrid 1 -

    【配置5】

    [sw1-GigabitEthernet0/0/2]dis this

    #

    interface GigabitEthernet0/0/2

    port hybrid tagged vlan 10 40 50

    port hybrid untagged vlan 20 30 60

    [sw1-GigabitEthernet0/0/2]dis po vlan active

    T=TAG U=UNTAG

    -------------------------------------------------------------------------------

    Port Link Type PVID VLAN List

    -------------------------------------------------------------------------------

    GE0/0/1 trunk 1 T: 10 20 30

    GE0/0/2 hybrid 1 U: 1 20 30

    T: 10 //由于vlan40 50 没有创建 并不显示

    [sw1-GigabitEthernet0/0/2]dis po vlan

    Port Link Type PVID Trunk VLAN List

    -------------------------------------------------------------------------------

    GigabitEthernet0/0/1 trunk 1 2-4094

    GigabitEthernet0/0/2 hybrid 1 10 40 50 //hybrid口需要打tagged的vlan 并非真实存在的vlan vlan40 50 就没有创建

    GigabitEthernet0/0/3 hybrid 1 -

    注意上面的类型  trunk和hybrid 显示的是不一样的   trunk表示允许通过的vlan(即使vlan不存在也显示)    而hybrid表示需要打tagged的vlan (vlan不存在就不显示)

  • 相关阅读:
    C++ 如何判断所调用的重载函数
    C++ 入门5 类和动态内存分配(一)
    c#动态创建ODBC数据源
    设为首页,加入收藏,联系我们
    ASP.NET 2.0中CSS失效
    typedef的四个用途和两个陷阱(转)
    VC++实现应用程序对插件的支持(转)
    DOM无关事件
    How to Migrate from WCF Web API to ASP.NET Web API
    Using ASP.NET Web API with ASP.NET Web Forms
  • 原文地址:https://www.cnblogs.com/yy50567893/p/13468370.html
Copyright © 2020-2023  润新知