Juniper Network Tìm Hiểu Và Cấu Hình Giao Thức Dự Phòng Kết Nối (LACP)

1. Mô hình mạng
1780397931643.png


2. Giới thiệu
LACP (Link Aggregation Control Protocol)
chính là giải pháp: Nó gom nhiều đường dây vật lý lại thành một đường dây logic duy nhất (Juniper gọi là Aggregate Ethernet - interface ae). Nhờ vậy, STP sẽ nhìn nhận cụm dây này chỉ là 1 cổng duy nhất và không block nữa.

Lợi ích cốt lõi của LACP (Chuẩn IEEE 802.3ad)

  • Tăng băng thông (Bandwidth Aggregation): Cắm 2 sợi 1Gbps gom lại sẽ được 1 đường logic 2Gbps.
  • Dự phòng nóng (Fault Tolerance): Nếu một trong các sợi cáp vật lý bị đứt, traffic tự động chuyển sang các sợi còn lại trong vài mili-giây mà không làm gián đoạn kết nối, không cần STP tính toán lại.
  • Cân bằng tải (Load Balancing): Traffic được chia đều trên các đường truyền vật lý dựa trên thuật toán Hash (MAC nguồn/đích hoặc IP nguồn/đích).

3. Các bước cấu hình LACP trên Switch Juniper (vEX)
Đầu tiên ở sw 1:
cli
configure
# Cấu hình cổng nối với Router
set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members default

# Cấu hình cổng nối với PC Windows
set interfaces ge-0/0/1 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members default

# Lưu cấu hình
commit
quit

Tiếp theo LACP trên cả 2 sw
SW1:

# Cho phép tạo interface logic (ae) trên khung máy
set chassis aggregated-devices ethernet device-count 1

# Xóa cấu hình cũ trên các port vật lý (nếu có)
delete interfaces ge-0/0/2
delete interfaces ge-0/0/3

# Gán port vật lý vào ae0
set interfaces ge-0/0/2 ether-options 802.3ad ae0
set interfaces ge-0/0/3 ether-options 802.3ad ae0

# Cấu hình LACP mode active cho ae0
set interfaces ae0 aggregated-ether-options lacp active

# Cấu hình ae0 làm port Trunk để cho phép các VLAN đi qua
set interfaces ae0 unit 0 family ethernet-switching interface-mode trunk
set interfaces ae0 unit 0 family ethernet-switching vlan members all

# Lưu cấu hình
commit

SW2:
set chassis aggregated-devices ethernet device-count 1

delete interfaces ge-0/0/0
delete interfaces ge-0/0/2

set interfaces ge-0/0/0 ether-options 802.3ad ae0
set interfaces ge-0/0/2 ether-options 802.3ad ae0

set interfaces ae0 aggregated-ether-options lacp active
set interfaces ae0 unit 0 family ethernet-switching interface-mode trunk
set interfaces ae0 unit 0 family ethernet-switching vlan members all

commit

Ta sẽ tiếp tục cấu hình sw2 để cho nó ra được internet:
cli
configure

# Cấu hình cổng nối với PC Windows dưới làm cổng access
set interfaces ge-0/0/1 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members default

# Lưu cấu hình
commit
quit


4. Check kết quả:

Trên 2 sw ta gõ show lacp interfaces, nếu thấy Active thì thành công
1780398452900.png


1780398507338.png
 
Back
Top