zoukankan      html  css  js  c++  java
  • 结合以太通道的vlan配置

    拓扑图

    在switch 1与switch 2 之间建立以太通道,提高网络性能

    进入全局配置模式,在全局配置模式下创建以太通道,使用命令nterface port-channel

    Switch#conf t

    Switch(config)#

    Switch(config)#interface port-channel 1

    Switch(config-if)#exit

    将端口划分到以太通道

    Switch(config)#int range f0/3-4

    Switch(config-if-range)#channel-group 1 mode on

    在switch 2中做相同的配置

    以太通道配置完成

    配置以太通道的负载均衡

    Switch(config)#interface port-channel 1
    Switch(config-if)#port-channel load-balance dst-mac

    负载均衡的类型有六种 源ip(src-ip) ,源mac(src-mac),目标ip(dst-ip),目标mac(dat-mac),源到目标的ip(src-dst-ip),源到目标的mac(src-dst-mac)

     接下来做vlan的配置

    switch 1

    Switch(config)#
    Switch(config)#
    Switch(config)#vlan 10
    Switch(config-vlan)#exit
    Switch(config)#vlan 20
    Switch(config-vlan)#exit
    Switch(config)#int f0/1
    Switch(config-if)#switchport mode access
    Switch(config-if)#switchport access vlan 10
    Switch(config-if)#exit
    Switch(config)#
    Switch(config)#int f0/2
    Switch(config-if)#switchport mode access
    Switch(config-if)#switchport access vlan 20
    Switch(config-if)#exit
     
    switch  2的配置和switch 1的配置一样
    接下来为vlan配置中继链路
    这里直接将以太通道配置为两台交换机的中继链路
    Switch(config)#interface port-channel 1
    Switch(config-if)#switchport mode trunk
     
    switch 1查看以太通道的汇总信息
    Switch#show etherchannel summary
    Flags:  D - down        P - in port-channel
            I - stand-alone s - suspended
            H - Hot-standby (LACP only)
            R - Layer3      S - Layer2
            U - in use      f - failed to allocate aggregator
            u - unsuitable for bundling
            w - waiting to be aggregated
            d - default port

    Number of channel-groups in use: 1
    Number of aggregators:           1
    Group  Port-channel  Protocol    Ports
    ------+-------------+-----------+----------------------------------------------
    1      Po1(SU)           -      Fa0/3(P) Fa0/4(P)
     
    用ping命令检查
    pc 1 ping pc 2

    可以通信(同一vlan)

    pc 1 ping pc 2

    无法通信(vlan不同)

  • 相关阅读:
    Ajax
    对于本地上关联了远程的git上的项目,删除现有的关联,然后关联新创建的git项目
    UNI-APP_uni-simple-router的快速上手(路由,nui路由拦截)
    js之观察者模式和发布订阅模式区别
    Vue CLI 3.0脚手架如何在本地配置mock数据
    es6解构赋值和扩展运算符
    js Array数组详细操作方法及解析合集
    list排序
    java常用的object数据处理
    java 读写 txt 文件
  • 原文地址:https://www.cnblogs.com/knightysa/p/9178071.html
Copyright © 2011-2022 走看看