4.配置端口聚合提供冗余备份链路

小浩 Lv3

一、背景

假设某企业采用两台交换机组成一个局域网,由于很多数据流量是跨交换机进行转发的,因此需要提高交换机之间的传输带宽,并实现链路的冗余备份。为此,网络管理员在两台交换机之间采用两根网线互联,并将相应的两个端口聚合为一个逻辑端口。现要在交换机上做适当配置,达到增加交换机之间传输带宽,并实现链路冗余备份的目标。

cisco模拟器2960系列没有端口聚合命令,所以用了一个三层交换机3560做

二、拓扑图

cisco11

PC0:192.168.10.1 255.255.255.0

PC1:192.168.10.2 255.255.255.0

三、配置案例

  1. g关闭生成树协议

    1.1 由于思科交换机默认开启生成树协议,所以,要实现端口聚合,需要关闭生成树协议

    先查看默认vlan状况

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    Switch#enable

    Switch#show vlan

    VLAN Name Status Ports
    ---- -------------------------------- --------- -------------------------------
    1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
    Fa0/5, Fa0/6, Fa0/7, Fa0/8
    Fa0/9, Fa0/10, Fa0/11, Fa0/12
    Fa0/13, Fa0/14, Fa0/15, Fa0/16
    Fa0/17, Fa0/18, Fa0/19, Fa0/20
    Fa0/21, Fa0/22, Fa0/23, Fa0/24
    1002 fddi-default active
    1003 token-ring-default active
    1004 fddinet-default active
    1005 trnet-default active

    VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
    ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
    1 enet 100001 1500 - - - - - 0 0
    1002 fddi 101002 1500 - - - - - 0 0
    1003 tr 101003 1500 - - - - - 0 0
    1004 fdnet 101004 1500 - - - ieee - 0 0
    1005 trnet 101005 1500 - - - ibm - 0 0

    VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
    ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

    Remote SPAN VLANs
    ------------------------------------------------------------------------------

    Primary Secondary Type Ports
    ------- --------- ----------------- ------------------------------------------

    1.2 然后关闭生成树协议

    1
    2
    Switch(config)#no spanning-tree vlan 1
    Switch(config)#end

    两个交换机进行相同操作

  2. 聚合端口

    配置:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    Switch>enabe

    Switch#configure terminal

    Switch(config)#interface port-channel 1 //配置聚合组一

    Switch(config-if)#interface range fastethernet 0/1-2 //将0/1和0/2接口分给第一组

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

    Switch(config-if-range)#end

    Switch#show running-config

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    Switch#show running-config 
    Building configuration...
    Current configuration : 1118 bytes
    !
    version 12.1
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname Switch
    !
    !
    !
    !
    !
    !
    no spanning-tree vlan 1
    spanning-tree mode pvst
    spanning-tree extend system-id
    !
    interface Port-channel1
    !
    interface FastEthernet0/1
    channel-group 1 mode on
    !
    interface FastEthernet0/2
    channel-group 1 mode on
    !
    interface FastEthernet0/3
    !
    interface FastEthernet0/4
    !
    interface FastEthernet0/5
    !
    interface FastEthernet0/6
    !
    interface FastEthernet0/7
    !
    interface FastEthernet0/8
    !
    interface FastEthernet0/9
    !
    interface FastEthernet0/10
    !
    interface FastEthernet0/11
    !
    interface FastEthernet0/12
    !
    interface FastEthernet0/13
    !
    interface FastEthernet0/14
    !
    interface FastEthernet0/15
    !
    interface FastEthernet0/16
    !
    interface FastEthernet0/17
    !
    interface FastEthernet0/18
    !
    interface FastEthernet0/19
    !
    interface FastEthernet0/20
    !
    interface FastEthernet0/21
    !
    interface FastEthernet0/22
    !
    interface FastEthernet0/23
    !
    interface FastEthernet0/24
    !
    interface Vlan1
    no ip address
    shutdown
    !
    !
    !
    !
    line con 0
    !
    line vty 0 4
    login
    line vty 5 15
    login
    !
    !
    !
    !
    end

    两个交换机进行同样的操作

5. 设置PC配置与验证测试

5.1 PC1

​ ip:192.168.10.1

​ MASK:255.255.255.0

5.2 PC2

​ ip:192.168.10.2

​ MASK:255.255.255.0

5.3 测试连通性

​ PC1 ping PC2 ping 192.168.10.2

cisco12

​ 此时即使关闭0/1或者0/2端口也不会影响 ping

cisco13

cisco14

  • Title: 4.配置端口聚合提供冗余备份链路
  • Author: 小浩
  • Created at : 2024-04-08 22:59:00
  • Updated at : 2024-06-08 13:52:13
  • Link: https://blog.xh8.shop/2024/04/08/4-配置端口聚合提供冗余备份链路/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments