Print

H3C Comware V7 平台交換機鏈路聚合 + BFD 部署配置案例

組網及說明

如下圖拓撲所示:

SW1 與 SW2 交換機采用靜態鏈路聚合模式部署。

為避免由於鏈路感知延遲(如長距離鏈路,或鏈路中存在有源傳輸設備),導致可能出現的“黑洞”現象(一端鏈路接口UP,另一端鏈路接口Down),增加BFD功能。實現鏈路聚合快速毫秒級感知鏈路狀態。


配置步驟

<SW1>

#

interface Bridge-Aggregation1

 link-aggregation bfd ipv4 source 1.1.1.1 destination 2.2.2.2

 bfd authentication-mode simple 1 plain 123 //可選,配置密鑰123

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 link-aggregation port-priority 4096

 port link-aggregation group 1

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port link-aggregation group 1

#


<SW2>

#

interface Bridge-Aggregation1

 link-aggregation bfd ipv4 source 2.2.2.2 destination 1.1.1.1

 bfd authentication-mode simple 1 plain 123 //可選,配置密鑰123

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port link-aggregation group 1

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port link-aggregation group 1

#

配置關鍵點

當鏈路正常情況下:

<SW1> display link-aggregation verbose

……

Aggregate Interface: Bridge-Aggregation1

Aggregation Mode: Static

Loadsharing Type: Shar

Management VLANs: None

  Port             Status      Priority  Oper-Key

  XGE1/0/1(R)      S       4096     1        

  XGE1/0/3           S       32768   1

<SW1> display bfd session

 Total Session Num: 2     Up Session Num: 2     Init Mode: Active

 IPv4 session working in control packet mode:

 LD/RD          SourceAddr      DestAddr        State    Holdtime    Interface

 257/257        1.1.1.1         2.2.2.2         Up       1983ms      XGE1/0/1  

 258/258        1.1.1.1         2.2.2.2         Up       1703ms      XGE1/0/3 


<SW2>display link-aggregation verbose

……

Aggregate Interface: Bridge-Aggregation1

Aggregation Mode: Static

Loadsharing Type: Shar

Management VLANs: None

  Port             Status      Priority   Oper-Key

  XGE1/0/1(R)      S       32768    1        

  XGE1/0/3           S       32768    1

<SW2>display bfd session

 Total Session Num: 2     Up Session Num: 2     Init Mode: Active

 IPv4 session working in control packet mode:

 LD/RD          SourceAddr      DestAddr        State    Holdtime    Interface

 257/257        2.2.2.2         1.1.1.1         Up       2000ms      XGE1/0/1  

 258/258        2.2.2.2         1.1.1.1         Up       1966ms      XGE1/0/3 


若SW2本地XG1/0/1接口down後,及鏈路故障時:

<SW1>

%Jan 28 03:34:10:784 1980 sw1 BFD/5/BFD_CHANGE_FSM: Sess[1.1.1.1/2.2.2.2, LD/RD:259/259, Interface:XGE1/0/1, SessType:Ctrl, LinkType:INET], Ver:1, Sta: UP->DOWN, Diag: 1 (Control Detection Time Expired)   //SW1的bfd會話快速感知到會話down

*Jan 28 03:34:10:785 1980 sw1 LAGG/7/Event: Group 1 updated because of member port BFD session up/down.

*Jan 28 03:34:10:830 1980 sw1 LAGG/7/Event: Group 1 updated because of other reason.

%Jan 28 03:34:10:838 1980 sw1 LAGG/6/LAGG_INACTIVE_BFD: Member port XGE1/0/1 of aggregation group BAGG1 changed to the inactive state, because the BFD session state of the port is down.  //BFD模塊通知鏈路聚合模塊相關接口出現“異常”,需要將SW1本地對應鏈路接口置為Unselected狀態。

%Jan 28 03:34:10:843 1980 sw1 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet1/0/1 changed to down.    //SW1本地XG1/0/1接口邏輯鏈路層快速被down掉。


<SW1>display link-aggregation verbose

……

Aggregate Interface: Bridge-Aggregation1

Aggregation Mode: Static

Loadsharing Type: Shar

Management VLANs: None

  Port                  Status  Priority Oper-Key

  XGE1/0/1         U          4096     1   

  XGE1/0/3(R)    S          32768    1

<sw1>display bfd session

 Total Session Num: 1     Up Session Num: 1     Init Mode: Active

 IPv4 session working in control packet mode:

 LD/RD          SourceAddr      DestAddr        State    Holdtime    Interface

 258/258        1.1.1.1         2.2.2.2         Up       1737ms      XGE1/0/3 


<SW2>display link-aggregation verbose

……

Aggregate Interface: Bridge-Aggregation1

Aggregation Mode: Static

Loadsharing Type: Shar

Management VLANs: None

  Port             Status  Priority Oper-Key

  XGE1/0/3(R)      S       32768    1    

   

<SW2>display bfd sesion

 Total Session Num: 1     Up Session Num: 1     Init Mode: Active

 IPv4 session working in control packet mode:

 LD/RD          SourceAddr      DestAddr        State    Holdtime    Interface

 258/258        2.2.2.2         1.1.1.1         Up       1899ms      XGE1/0/3