一强衡、二層靜態(tài)聚合配置舉例
1.組網(wǎng)需求
Device B與Device B通過各自的二層以太網(wǎng)接口GigabitEthernet1/0/1~GigabitEthernet1/0/3相互連接傲隶。在DeviceA和DeviceB上分別配置二層靜態(tài)鏈路聚合組,并實(shí)現(xiàn)設(shè)備間VLAN 10和VLAN 20分別互通倔丈。
2.組網(wǎng)拓?fù)鋱D
# 創(chuàng)建VLAN10,并將端口GigabitEthernet1/0/4加入到該VLAN中。
[DeviceA] vlan 10
[DeviceA-vlan10] port gigabitethernet1/0/4
[DeviceA-vlan10] quit
# 創(chuàng)建VLAN20桩皿,并將端口GigabitEthernet1/0/5加入到該VLAN中初橘。
[DeviceA-vlan20] port gigabitethernet1/0/5
[DeviceA-vlan20] quit
# 創(chuàng)建二層聚合接口1验游。
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1]quit
# 分別將端口GigabitEthernet1/0/1至GigabitEthernet1/0/3加入到聚合組1中。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-aggregation group 1
[DeviceA-GigabitEthernet1/0/1]quit
[DeviceA] interface gigabitethernet1/0/2
[DeviceA-GigabitEthernet1/0/2] port link-aggregation group 1
[DeviceA-GigabitEthernet1/0/2]quit
[DeviceA] interface gigabitethernet1/0/3
[DeviceA-GigabitEthernet1/0/3] port link-aggregation group 1
[DeviceA-GigabitEthernet1/0/3]quit
# 配置二層聚合接口1為Trunk端口保檐,并允許VLAN 10和20的報(bào)文通過批狱。
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] port link-type trunk
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10 20
[DeviceA-Bridge-Aggregation1]quit
Device B的配置與Device A相似,配置過程略展东。
# 查看DeviceA上所有聚合組的詳細(xì)信息赔硫。
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing,NonS -- Non-Loadsharing
Port Status: S -- Selected, U --Unselected, I -- Individual?
Flags:? A -- LACP_Activity, B --LACP_Timeout, C -- Aggregation,
??????????? D -- Synchronization, E --Collecting, F -- Distributing,
??????????? G -- Defaulted, H --Expired
Aggregate Interface:Bridge-Aggregation1?
Aggregation Mode: Static
Loadsharing Type: Shar
? Port????????? ?????Status? Priority? ?Oper-Key
--------------------------------------------------------------------------------
? GE1/0/1 ??????????S?????? 32768? ? ? ?1
? GE1/0/2? ?????????S?????? 32768? ? ? ?1
? GE1/0/3 ??????????S?????? 32768? ? ? ?1
以上信息表明,聚合組1為二層靜態(tài)聚合組盐肃,包含有三個(gè)選中端口爪膊。
二、 二層動態(tài)聚合配置舉例
·Device A與Device B通過各自的二層以太網(wǎng)接口GigabitEthernet1/0/1~GigabitEthernet1/0/3相互連接砸王。
·? 在DeviceA和DeviceB上分別配置二層動態(tài)鏈路聚合組推盛,并實(shí)現(xiàn)設(shè)備間VLAN 10和VLAN 20分別互通。
# 創(chuàng)建VLAN10谦铃,并將端口GigabitEthernet1/0/4加入到該VLAN中耘成。
[DeviceA] vlan 10
[DeviceA-vlan10] port gigabitethernet 1/0/4
[DeviceA-vlan10] quit
# 創(chuàng)建VLAN20,并將端口GigabitEthernet1/0/5加入到該VLAN中驹闰。
[DeviceA-vlan20] port gigabitethernet 1/0/5
[DeviceA-vlan20] quit
# 創(chuàng)建二層聚合接口1瘪菌,并配置該接口為動態(tài)聚合模式。
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic
注意嘹朗。這里是就是配置為動態(tài)模式师妙。
[DeviceA-Bridge-Aggregation1]quit
# 分別將端口GigabitEthernet1/0/1至GigabitEthernet1/0/3加入到聚合組1中。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-aggregation group 1
[DeviceA-GigabitEthernet1/0/1]quit
[DeviceA] interface gigabitethernet1/0/2
[DeviceA-GigabitEthernet1/0/2] port link-aggregation group 1
[DeviceA-GigabitEthernet1/0/2]quit
[DeviceA] interface gigabitethernet 1/0/3
[DeviceA-GigabitEthernet1/0/3] port link-aggregation group 1
[DeviceA-GigabitEthernet1/0/3]quit
# 配置二層聚合接口1為Trunk端口屹培,并允許VLAN 10和20的報(bào)文通過默穴。
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] port link-type trunk
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10 20
[DeviceA-Bridge-Aggregation1] quit
Device B的配置與Device A相似,配置過程略褪秀。
# 查看DeviceA上所有聚合組的詳細(xì)信息蓄诽。
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing,NonS -- Non-Loadsharing
Port Status: S -- Selected, U --Unselected, I -- Individual
Flags:? A -- LACP_Activity, B --LACP_Timeout, C -- Aggregation,
??????????? D -- Synchronization, E --Collecting, F -- Distributing,
? ? ? ?????G -- Defaulted, H --Expired
Aggregate Interface:Bridge-Aggregation1
Aggregation Mode: Dynamic Loadsharing Type: Shar
System ID: 0x8000,000f-e267-6c6a
Local:
? Port????????? ?????Status? Priority? ? Oper-Key? Flag
--------------------------------------------------------------------------------
? GE1/0/1????? ?????S?????? 32768? ?1???????? {ACDEF}
? GE1/0/2????? ?????S?????? 32768? ?1???????? {ACDEF}
? GE1/0/3????? ?????S?????? 32768? ?1???????? {ACDEF}
Remote:
? Actor????????? ????Partner Priority? Oper-Key? SystemID?????????????? Flag
--------------------------------------------------------------------------------
? GE1/0/1????? ?????1 ??????32768? ?1???????? 0x8000, 000f-e267-57ad {ACDEF}
? GE1/0/2????? ?????2 ??????32768? ?1???????? 0x8000, 000f-e267-57ad {ACDEF}
? GE1/0/3????? ?????3 ??????32768? ?1???????? 0x8000, 000f-e267-57ad {ACDEF}
以上信息表明,聚合組1為二層動態(tài)聚合組媒吗,包含有三個(gè)選中端口仑氛。
三、二層聚合負(fù)載分擔(dān)配置舉例
·? ? Device A與Device B通過各自的二層以太網(wǎng)接口GigabitEthernet1/0/1~GigabitEthernet1/0/4相互連接蝴猪。
·? ? 在DeviceA和DeviceB上分別配置兩個(gè)二層靜態(tài)鏈路聚合組调衰,并使兩端的VLAN 10通過二層聚合接口1互通膊爪、VLAN20通過二層聚合接口2互通。
·? ? 通過在聚合組1上按照源MAC地址進(jìn)行聚合負(fù)載分擔(dān)嚎莉、在聚合組2上按照目的MAC地址進(jìn)行聚合負(fù)載分擔(dān)的方式米酬,來實(shí)現(xiàn)數(shù)據(jù)流量在各成員端口間的負(fù)載分擔(dān)。
# 創(chuàng)建VLAN10趋箩,并將端口GigabitEthernet1/0/5加入到該VLAN中赃额。
[DeviceA] vlan 10
[DeviceA-vlan10] port gigabitethernet1/0/5
[DeviceA-vlan10] quit
# 創(chuàng)建VLAN20,并將端口GigabitEthernet1/0/6加入到該VLAN中叫确。
[DeviceA-vlan20] port gigabitethernet1/0/6
[DeviceA-vlan20] quit
# 創(chuàng)建二層聚合接口1跳芳,并配置該接口對應(yīng)的聚合組內(nèi)按照源MAC地址進(jìn)行聚合負(fù)載分擔(dān)。
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1]link-aggregation load-sharing mode source-mac
[DeviceA-Bridge-Aggregation1]quit
# 分別將端口GigabitEthernet1/0/1和GigabitEthernet1/0/2加入到聚合組1中竹勉。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-aggregation group 1
[DeviceA-GigabitEthernet1/0/1]quit
[DeviceA] interface gigabitethernet1/0/2
[DeviceA-GigabitEthernet1/0/2] portlink-aggregation group 1
[DeviceA-GigabitEthernet1/0/2]quit
# 配置二層聚合接口1為Trunk端口飞盆,并允許VLAN 10的報(bào)文通過。
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] port link-type trunk
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10
[DeviceA-Bridge-Aggregation1]quit
# 創(chuàng)建二層聚合接口2次乓,并配置該接口對應(yīng)的聚合組內(nèi)按照目的MAC地址進(jìn)行聚合負(fù)載分擔(dān)吓歇。
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2]link-aggregation load-sharing mode destination-mac
[DeviceA-Bridge-Aggregation2]quit
# 分別將端口GigabitEthernet1/0/3和GigabitEthernet1/0/4加入到聚合組2中。
[DeviceA] interface gigabitethernet 1/0/3
[DeviceA-GigabitEthernet1/0/3] port link-aggregation group 2
[DeviceA-GigabitEthernet1/0/3]quit
[DeviceA] interface gigabitethernet1/0/4
[DeviceA-GigabitEthernet1/0/4] port link-aggregation group 2
[DeviceA-GigabitEthernet1/0/4]quit
# 配置二層聚合接口2為Trunk端口票腰,并允許VLAN 20的報(bào)文通過城看。
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2] port link-type trunk
[DeviceA-Bridge-Aggregation2] port trunk permit vlan 20
[DeviceA-Bridge-Aggregation2]quit
Device B的配置與Device A相似,配置過程略杏慰。
# 查看DeviceA上所有聚合組的詳細(xì)信息测柠。
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing,NonS -- Non-Loadsharing
Port Status: S -- Selected, U --Unselected, I -- Individual
Flags:? A -- LACP_Activity, B --LACP_Timeout, C -- Aggregation,
??????????? D -- Synchronization, E --Collecting, F -- Distributing,
??????????? G -- Defaulted, H --Expired
Aggregate Interface:Bridge-Aggregation1
Aggregation Mode: Static
Loadsharing Type: Shar
? Port?????????? ????Status? Priority? ?Oper-Key
--------------------------------------------------------------------------------
? GE1/0/1 ??????????S? ? ? ? ? 32768? ? ????1
? GE1/0/2? ?????????S?????????? 32768? ? ? ?1
Aggregate Interface:Bridge-Aggregation2
Aggregation Mode: Static
Loadsharing Type: Shar
? Port?????????? ????Status? Priority????Oper-Key
--------------------------------------------------------------------------------
? GE1/0/3 ??????????S?????? 32768? ?????2
? GE1/0/4? ?????????S?????? 32768? ?????2
以上信息表明,聚合組1和聚合組2都是負(fù)載分擔(dān)類型的二層靜態(tài)聚合組缘滥,各包含有兩個(gè)選中端口轰胁。
# 查看DeviceA上所有聚合接口所對應(yīng)聚合組內(nèi)采用的聚合負(fù)載分擔(dān)類型。
[DeviceA] display link-aggregation load-sharing mode?interface?
Bridge-Aggregation1 Load-Sharing Mode:
source-mac address
Bridge-Aggregation2 Load-Sharing Mode:
destination-mac address
以上信息表明完域,二層聚合組1按照報(bào)文的源MAC地址進(jìn)行聚合負(fù)載分擔(dān)软吐,二層聚合組2按照報(bào)文的目的MAC地址進(jìn)行聚合負(fù)載分擔(dān)瘩将。
四吟税、三層動態(tài)聚合配置舉例
1. 組網(wǎng)需求
·? ?Device A與Device B通過各自的三層以太網(wǎng)接口GigabitEthernet1/0/1~GigabitEthernet1/0/3相互連接。
·? 在Device A和Device B上分別配置三層動態(tài)鏈路聚合組姿现,并為對應(yīng)的三層聚合接口配置IP地址和子網(wǎng)掩碼肠仪。
2. 組網(wǎng)圖
?三層動態(tài)聚合配置組網(wǎng)圖
3. 配置步驟
(1)? ? ? 配置Device A
# 創(chuàng)建三層聚合接口1,配置該接口為動態(tài)聚合模式备典,并為其配置IP地址和子網(wǎng)掩碼异旧。
<DeviceA> system-view
[DeviceA] interface route-aggregation 1
[DeviceA-Route-Aggregation1] link-aggregation mode dynamic
[DeviceA-Route-Aggregation1] ip address 192.168.1.1 24
[DeviceA-Route-Aggregation1] quit
# 分別將接口GigabitEthernet1/0/1至GigabitEthernet1/0/3加入到聚合組1中。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-aggregation group 1
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] port link-aggregation group 1
[DeviceA-GigabitEthernet1/0/2] quit
[DeviceA] interface gigabitethernet 1/0/3
[DeviceA-GigabitEthernet1/0/3] port link-aggregation group 1
[DeviceA-GigabitEthernet1/0/3] quit
(2)? ? ? 配置Device B
Device B的配置與Device A相似提佣,配置過程略吮蛹。
4. 驗(yàn)證配置
# 查看Device A上所有聚合組的詳細(xì)信息荤崇。
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Flags:? A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
? ? ? ? D -- Synchronization, E -- Collecting, F -- Distributing,
? ? ? ? G -- Defaulted, H -- Expired
Aggregate Interface: Route-Aggregation1
Aggregation Mode: Dynamic
Loadsharing Type: Shar
System ID: 0x8000, 000f-e267-6c6a
Local:
? Port? ? ? ? ? ? ? Status? Priority Oper-Key? Flag
--------------------------------------------------------------------------------
? GE1/0/1? ? ? ? ? S? ? ? 32768? ? 1? ? ? ? {ACDEF}
? GE1/0/2? ? ? ? ? S? ? ? 32768? ? 1? ? ? ? {ACDEF}
? GE1/0/3? ? ? ? ? S? ? ? 32768? ? 1? ? ? ? {ACDEF}
Remote:
? Actor? ? ? ? ? ? ? Partner Priority Oper-Key? SystemID? ? ? ? ? ? ? Flag
--------------------------------------------------------------------------------
? GE1/0/1? ? ? ? ? 1? ? ? 32768? ? 1? ? ? ? 0x8000, 000f-e267-57ad {ACDEF}
? GE1/0/2? ? ? ? ? 2? ? ? 32768? ? 1? ? ? ? 0x8000, 000f-e267-57ad {ACDEF}
? GE1/0/3? ? ? ? ? 3? ? ? 32768? ? 1? ? ? ? 0x8000, 000f-e267-57ad {ACDEF}
以上信息表明,聚合組1為非負(fù)載分擔(dān)類型的三層動態(tài)聚合組潮针,包含有三個(gè)選中端口术荤。