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不同)

  • 相关阅读:
    Codeforces A. Bear and Big Brother
    codeforces A. In Search of an Easy Problem
    c#判断两个对象和对象中的属性是否相同(以及记录对象中的哪些字段,和详细的改变情况)
    生成随机字符串
    SQL语句计算距离今天生日还差几天
    sqlServer 获取最新的一条数据
    c#所有部门及其下所部门生成树形图(递归算法获取或键值对方式获取)
    根据中文名,自动生成首字母的拼音码或拼音码(两种方法)
    char/varchar/nvarchar的区别
    c#中ofType的用法
  • 原文地址:https://www.cnblogs.com/knightysa/p/9178071.html
Copyright © 2011-2022 走看看