關於聚合接口及故障檢測

根據IEEE802.3ad定義將一組以太網接口加入聚合組。流量均衡的經過聚合組中全部成員鏈路。 配置LACP用來監控聚合組,容許接口加入或從聚合組中刪除而不會丟失流量。 (根據實際環境測試,當流量穿越LACP的聚合接口時,隨機斷開其中一條鏈路時,可能會丟1個包或不丟包)。網絡


IEEE802.3ad經過將多個接口聚合成一個邏輯接口鏈接交換機與路由器,儘量的消除了廣播風暴,提升了整網的性能的同時,也提升故障恢復時間。app


JUNOS聚合接口配置分爲兩部分:Set部分及Chassis部分。 在Chassis層級定義設備支持的聚合接口數量,在Set層級定義聚合接口的成員接口及配置AE聚合接口的邏輯參數。 配置聚合接口成員鏈路時,關聯的接口保持一樣的速率及全雙工模式,接口類型多是100M、1G或10G、100G類型,一般不能將不一樣類型的物理接口捆綁成同一個聚合接口(存在特殊狀況能夠捆綁在一塊兒,生產環境中,建議不這樣操做)。 從軟件版本14.2開始,可配置加強性的LAG在MX路由器上,常規狀況下,聚合接口下的成員接口將根據每個VLAN建立Next-hoop下一跳,這樣將建立大量的Next-hop,經過配置培強的LAG,「set chassis network-services enhanced-ip",基於成員的子接口將不會建立,做爲這個結果,更多的Next-hop將被支持。ide


Note :加強型的LAG僅只在路由器服務配置成enhanced-ip時支持,在網絡服務enhanced-ethernet模式不支持。oop


配置示例以下所示:性能

set chassis aggregated-devices ethernet device-count 10測試

將鏈路成員加入聚合組:spa

root@NO.9527# set interfaces ge-0/0/9 gigether-options 802.3ad ae0日誌

[edit]code

root@NO.9527# show interfaces ae0索引

unit 0 {

family inet {

address 1.1.1.1/24;                 ##配置聚合接口L3 IP

}

}

或配置Vlan-tagging的方式,配置vlan-id,啓用多個子接口


root@NO.9527# show interfaces ae0 | display set

set interfaces ae0 vlan-tagging

set interfaces ae0 unit 0 family inet address 1.1.1.1/24

set interfaces ae0 unit 10 vlan-id 10

set interfaces ae0 unit 10 family inet address 1.1.1.10/24

Note:  unit 0與vlan 10不能共存。須要刪除。


查看聚合及成員接口狀態

[edit]

root@NO.9527# run show interfaces terse | match "ae0.10"

ge-0/0/9.10             up    up   aenet    --> ae0.10

ae0.10                  up    up   inet     1.1.1.10/24


Note:根據設備類型差別,設備自己所支持的聚合接口及綁定的成員接口都有所不一樣,具體參數查Juniper官方文檔 。


命令解析:


1. 基於Junos的設備的建立Agg聚合接口的數量只在Chassis級級別,根據不一樣的設備類型,支持的Agg數量不一樣。

root@NO.9527# set chassis aggregated-devices ethernet device-count ?

Possible completions:

<device-count>       Number of aggregated Ethernet devices (1..496)


2. 成員接口加入聚合接口配置


set interfaces ge-0/0/9 gigether-options 802.3ad ae0


3. 成員接口配置參數分析


root@NO.9527# set interfaces ge-0/0/9 gigether-options 802.3ad ?

Possible completions:

<bundle>             Join an aggregated Ethernet interface     ------>直接將聚合成員接口加入聚合組Ae

+ apply-groups         Groups from which to inherit configuration data

+ apply-groups-except  Don't inherit configuration data from these groups

backup               Backup interface for link-protection mode

> lacp                 Link Aggregation Control Protocol configuration   --------->配置端口優先級

link-index           Desired child link index within the Aggregated Interface (0..63)-->定義接口link索引

primary              Primary interface for link-protection mode


Primary和Backup主要是聚合接口的鏈路保護時,將聚合接口做爲主備的鏈路,主鏈轉發流量,當Primay Down時,Backup連接就接管流量,當Primary接口恢復時,須要人工的將流量從Backup切換到Primary上。 配置Link-Protection時,參考如下配置:


root@NO.9527# set interfaces ae0 aggregated-ether-options link-protection

root@NO.9527# set interfaces ge-0/0/9 gigether-options 802.3ad primary/backup


使用如下命令,手工將鏈路從backup切回到Primay:


root@NO.9527# run request interface revert ae0


4. 聚合Agg接口參數分析


聚合接口Ae與常規的物理成員接口同樣,如下列出經常使用的參數說明。

set interfaces ae0 vlan-tagging ,Vlan-tagging,能夠將聚合接口AE分紅多個子接口,每一個子接口標記一個Vlan-id,聚合接口下聯的交換機接口配置成Trunk,放通對應的Vlan-id號。

set interfaces ae0 encapsulation 封裝,這個參數主要是用於二三層×××中對聚合進行封裝確認。

set interfaces ae0 aggregated-ether-options minimum-links ,最小成員接口數量,默認狀況是1條,當成員接口至少存在一條鏈拉up時,聚合接口保持Up狀態。


如下爲聚合接口lacp下面的配置:

root@go-junos# set interfaces ae0 aggregated-ether-options lacp ?

Possible completions:

accept-data          Keep receiving traffic even when LACP goes down

active               Initiate transmission of LACP packets

admin-key            Node's administrative key

+ apply-groups         Groups from which to inherit configuration data

+ apply-groups-except  Don't inherit configuration data from these groups

fast-failover        To turn off LACP fast-failover

> link-protection

passive              Respond to LACP packets

periodic             Timer interval for periodic transmission of LACP packets

system-id            Node's System ID, encoded as a MAC address

system-priority      Priority of the system (0 ... 65535)

accept-data這個參數通常不用。常規配置lacp的模式爲Active,Periodic配置成slow,每30秒發送一次更新確認數據包、系統ID與優先級不做修改。


關於聚合接口的故障檢測內容:


1. 將物理成員接口加入到聚合接口,根據最小成員接口參數,若聚合接口沒法正常Up,第一是檢查這個接口是否正確配置,查看chassis級別有沒有定義對應的聚合接口數量。

2.  聚合接口沒法正常Up時,查看是有成員接口關聯到Agg,或關聯到Agg的成員接口是否存在一個物理接口保持爲Up狀態。

3. 當聚合接口配置成LACP時,若聚合接口沒法正常UP,檢查LACP兩邊的模式是否有一邊爲Active,若兩邊都爲Passive模式時,LACP接口將不能正常Up。

4. 若成員接口Up狀態、同時也沒有LACP上的問題或聚合接口數量的問題時,則在聚合接口下面配置Traceoptions進行抓包分析。 日誌將被記錄在/var/log/下。

5. 若雙方排查故障時,能夠直接經過「> monitor traffic interface ae0」Monitor聚合接口或成員接口進行日誌分析排查。

相關文章
相關標籤/搜索