Akemi

VCSA-DVS创建与使用LACP

2025/06/12

拓扑

创建新DVS

几台ESXi捆绑就选几个上行链路,一般都是两台

在DVS中创建LACP

为DVS添加与管理主机

将vmnic挂到lag中,而非port group


调整lag优先级

使其作为上行链路

交换机端配置

交换机版本:Cisco IOS switch-15.2

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
en
configure terminal
interface Port-channel1
description TO_HOST_A
switchport mode trunk
exit
interface Port-channel2
description TO_HOST_B
switchport mode trunk
exit
interface range ethernet 0/0-1
channel-group 1 mode active
no shutdown
exit
interface range ethernet 0/2-3
channel-group 2 mode active
no shutdown
exit

查看LACP状态
do show lacp 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 1 neighbors

Partner's information:

LACP port Admin Oper Port Port
Port Flags Priority Dev ID Age key Key Number State
Et0/0 SA 255 5000.0003.0000 13s 0x0 0x9 0x2 0x3D
Et0/1 SA 255 5000.0003.0000 13s 0x0 0x9 0x1 0x3D

Channel group 2 neighbors

Partner's information:

LACP port Admin Oper Port Port
Port Flags Priority Dev ID Age key Key Number State
Et0/2 SA 255 5000.0004.0000 13s 0x0 0x9 0x2 0x3D
Et0/3 SA 255 5000.0004.0000 13s 0x0 0x9 0x1 0x3D

interface Port-channel1
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 10
exit
interface Port-channel2
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 10
exit

交换机添加vlan10

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
en
conf t
vlan 10
int vlan 10
ip add 192.168.1.254 255.255.255.0
no shut
interface Port-channel1
switchport trunk allowed vlan add 10
exit
interface Port-channel2
switchport trunk allowed vlan add 10
exit

show ip inter bri
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 unassigned YES unset up up
Ethernet0/1 unassigned YES unset up up
Ethernet0/2 unassigned YES unset up up
Ethernet0/3 unassigned YES unset up up
Ethernet1/0 unassigned YES unset up up
Ethernet1/1 unassigned YES unset up up
Ethernet1/2 unassigned YES unset up up
Ethernet1/3 unassigned YES unset up up
Port-channel1 unassigned YES unset up up
Port-channel2 unassigned YES unset up up
Vlan10 192.168.1.254 YES manual up up

Tinycore数据网络通信验证

创建两台tiny-core,分别在ESXi1和ESXi2上,给他俩分别分配IP地址

1
2
3
4
5
6
7
8
9
10
11
12
sudo ifconfig eth0 192.168.1.10 netmask 255.255.255.0
sudo ifconfig eth0 up
sudo route add default gw 192.168.1.254

sudo ifconfig eth0 192.168.1.20 netmask 255.255.255.0
sudo ifconfig eth0 up
sudo route add default gw 192.168.1.254

ping 192.168.1.254

ping 192.168.1.20


可见已经可以在数据网络中通信了

CATALOG
  1. 1. 拓扑
  2. 2. 创建新DVS
  3. 3. 在DVS中创建LACP
  4. 4. 为DVS添加与管理主机
  5. 5. 调整lag优先级
  6. 6. 交换机端配置
    1. 6.1. 交换机添加vlan10
  7. 7. Tinycore数据网络通信验证