zoukankan      html  css  js  c++  java
  • 交换机配置—— 结合以太通道的VLAN配置

     一、实验目的:建立以太通道使相同VLAN下主机互通

     二、拓扑图如下

    三、具体步骤如下

    (1)S1三层交换机配置

    Switch>enable
    Switch#config terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    Switch(config)#hostname S1
    S1(config)#interface port-channel 5
    S1(config-if)#switchport trunk encapsulation dot1q
    S1(config-if)#switchport mode trunk
    S1(config-if)#exit
    S1(config)#interface range f0/10-11
    S1(config-if-range)#channel-group 5 mode on
    S1(config-if-range)#exit
    S1(config)#vlan 5
    S1(config-vlan)#vlan 6
    S1(config-vlan)#interface f0/1
    S1(config-if)#switchport mode access
    S1(config-if)#switchport access vlan 5
    S1(config-if)#interface f0/2
    S1(config-if)#switchport mode access
    S1(config-if)#switchport access vlan 6
    S1(config-if)#end
    S1#copy running-config startup-config
    %LINK-5-CHANGED: Interface Port-channel 5, changed state to up

    %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 5, changed state to up

    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down

    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to up

    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down

    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to up

    %SYS-5-CONFIG_I: Configured from console by console

    Destination filename [startup-config]?
    Building configuration...
    [OK]

    (2)S2三层交换机配置

    Switch>enable
    Switch#config terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    Switch(config)#hostname S2
    S2(config)#interface port-channel 5
    S2(config-if)#switchport trunk encapsulation dot1q
    S2(config-if)#switchport mode trunk
    S2(config-if)#exit
    S2(config)#interface range f0/10-11
    S2(config-if-range)#channel-group 5 mode on
    S2(config-if-range)#exit
    S2(config)#vlan 5
    S2(config-vlan)#vlan 6
    S2(config-vlan)#interface f0/1
    S2(config-if)#switchport mode access
    S2(config-if)#switchport access vlan 5
    S2(config-if)#interface f0/2
    S2(config-if)#switchport mode access
    S2(config-if)#switchport access vlan 6
    S2(config-if)#end
    %LINK-5-CHANGED: Interface Port-channel 5, changed state to up

    %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 5, changed state to up

    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down

    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to up

    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down

    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to up

    S2#
    %SYS-5-CONFIG_I: Configured from console by console

    四、验证,相同VLAN下的主机是否互通

    (1)vlan 5 下的PC1和PC3

    (2)vlan 6 下的PC2和PC4

  • 相关阅读:
    docer run 、docker attach 与 docker exec的区别
    filebeat-kafka:WARN producer/broker/0 maximum request accumulated, waiting for space
    json 格式要求
    词法分析
    CSS3 鲜为人知的属性-webkit-tap-highlight-color的理解
    DOMContentLoaded与load的区别
    用vue的自定义组件写了一个拖拽 组件,局部的 只能在自定义元素内的
    浮动元素遇到标准流元素 会发生转角遇到爱
    柯里化函数
    转载一篇关于toString和valueOf
  • 原文地址:https://www.cnblogs.com/evolve/p/9179636.html
Copyright © 2011-2022 走看看