Cisco LACP Fallback

Материал из noname.com.ua
Перейти к навигацииПерейти к поиску


LACP на Cisco Catalyst 3750E

interface Port-channel3
 switchport trunk allowed vlan 720
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 720
 switchport mode trunk
 no port-channel standalone-disable
end

Для всех портов настройки одинаковые, вланы можно прописывать потом только на Po

interface GigabitEthernet1/0/2
 switchport trunk allowed vlan 720
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 720
 switchport mode trunk
 channel-group 3 mode active
lacp 3 internal
Flags:  S - Device is requesting Slow LACPDUs
        F - Device is requesting Fast LACPDUs
        A - Device is in Active mode       P - Device is in Passive mode

Channel group 3
                            LACP port     Admin     Oper    Port        Port
Port      Flags   State     Priority      Key       Key     Number      State
Gi1/0/1   SA      bndl      32768         0x3       0x3     0x102       0x3D
Gi1/0/2   SA      bndl      32768         0x3       0x3     0x103       0x3D
Gi1/0/3   SA      bndl      32768         0x3       0x3     0x104       0x3D
Gi1/0/4   SA      bndl      32768         0x3       0x3     0x105       0x3D
Gi1/0/5   SA      down      32768         0x3       0x0     0x106       0x45
Gi1/0/6   SA      down      32768         0x3       0x0     0x107       0x45


show  lacp 3 neighbor
Flags:  S - Device is requesting Slow LACPDUs
        F - Device is requesting Fast LACPDUs
        A - Device is in Active mode       P - Device is in Passive mode

Channel group 3 neighbors

Partner's information:

                  LACP port                        Admin  Oper   Port    Port
Port      Flags   Priority  Dev ID          Age    key    Key    Number  State
Gi1/0/1   SA      255       8231.d0ef.835c  28s    0x0    0x9    0x2     0x3D
Gi1/0/2   SA      255       8231.d0ef.835c  28s    0x0    0x9    0x1     0x3D
Gi1/0/3   SA      255       8231.d0ef.835c  25s    0x0    0x9    0x3     0x3D
Gi1/0/4   SA      255       8231.d0ef.835c  29s    0x0    0x9    0x4     0x3D
Gi1/0/5   SP      0         0000.0000.0000 143515s    0x0    0x0    0x0     0x0
Gi1/0/6   SP      0         0000.0000.0000 143515s    0x0    0x0    0x0     0x0
c3750e-lab#

Linux Bond

Netplan

network:
  version: 2
  ethernets:
    eno1:
      dhcp4: false
    eno2:
      dhcp4: false
    enp8s0f0:
      dhcp4: false
    enp8s0f1:
      dhcp4: false
    enp9s0f0:
      dhcp4: false
    enp9s0f1:
      dhcp4: false

  bonds:
    bond0:
      interfaces:
        - "eno1"
        - "eno2"
        - "enp8s0f0"
        - "enp8s0f1"
        - "enp9s0f0"
        - "enp9s0f1"
      dhcp4: true
      parameters:
        mode: 802.3ad
        transmit-hash-policy: layer3+4
        mii-monitor-interval: 1

Ручная настройка iproute2

modprobe bonding mmiimon=100 mode=802.3ad lacp_rate=slow
ip link add dev bond0 type bond
ip link set dev eth0 down
ip link set dev eth1 down
ip link set dev bond0 down
ip link set dev eth0 master bond0
ip link set dev eth1 master bond0
ip link set dev eth0 up
ip link set dev eth1 up
ip link set dev bond0 up


Просмотр состояния

cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v5.15.0-92-generic

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer3+4 (1)
MII Status: up
MII Polling Interval (ms): 1
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

802.3ad info
LACP active: on
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable
System priority: 65535
System MAC address: aa:bd:46:02:87:3f
Active Aggregator Info:
	Aggregator ID: 3
	Number of ports: 6
	Actor Key: 9
	Partner Key: 1
	Partner Mac Address: 00:1d:45:15:c0:00

Slave Interface: enp9s0f0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:14:5e:e9:79:c3
Slave queue ID: 0
Aggregator ID: 3
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
    system priority: 65535
    system mac address: aa:bd:46:02:87:3f
    port key: 9
    port priority: 255
    port number: 1
    port state: 61
details partner lacp pdu:
    system priority: 32768
    system mac address: 00:1d:45:15:c0:00
    oper key: 1
    port priority: 32768
    port number: 298
    port state: 61

Slave Interface: enp8s0f1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:14:5e:e9:79:c0
Slave queue ID: 0
Aggregator ID: 3
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
    system priority: 65535
    system mac address: aa:bd:46:02:87:3f
    port key: 9
    port priority: 255
    port number: 2
    port state: 61
details partner lacp pdu:
    system priority: 32768
    system mac address: 00:1d:45:15:c0:00
    oper key: 1
    port priority: 32768
    port number: 297
    port state: 61

Slave Interface: eno1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:a0:d1:ec:c5:30
Slave queue ID: 0
Aggregator ID: 3
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
    system priority: 65535
    system mac address: aa:bd:46:02:87:3f
    port key: 9
    port priority: 255
    port number: 3
    port state: 61
details partner lacp pdu:
    system priority: 32768
    system mac address: 00:1d:45:15:c0:00
    oper key: 1
    port priority: 32768
    port number: 295
    port state: 61

Slave Interface: eno2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:a0:d1:ec:c5:31
Slave queue ID: 0
Aggregator ID: 3
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
    system priority: 65535
    system mac address: aa:bd:46:02:87:3f
    port key: 9
    port priority: 255
    port number: 4
    port state: 61
details partner lacp pdu:
    system priority: 32768
    system mac address: 00:1d:45:15:c0:00
    oper key: 1
    port priority: 32768
    port number: 294
    port state: 61

Slave Interface: enp8s0f0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:14:5e:e9:79:c1
Slave queue ID: 0
Aggregator ID: 3
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
    system priority: 65535
    system mac address: aa:bd:46:02:87:3f
    port key: 9
    port priority: 255
    port number: 5
    port state: 61
details partner lacp pdu:
    system priority: 32768
    system mac address: 00:1d:45:15:c0:00
    oper key: 1
    port priority: 32768
    port number: 296
    port state: 61

Slave Interface: enp9s0f1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:14:5e:e9:79:c2
Slave queue ID: 0
Aggregator ID: 3
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
    system priority: 65535
    system mac address: aa:bd:46:02:87:3f
    port key: 9
    port priority: 255
    port number: 6
    port state: 61
details partner lacp pdu:
    system priority: 32768
    system mac address: 00:1d:45:15:c0:00
    oper key: 1
    port priority: 32768
    port number: 299
    port state: 61