配置堆疊系統對接NLB服務器群集示例(通過物理鏈路環回方法)
設備通過物理鏈路環回方法對接NLB服務器群集簡介
NLB是微軟在Windows Server上開發的多服務器群集負載均衡特性。交換機與NLB服務器群集相連時,NLB服務器要求交換機能夠將目的IP地址是NLB服務器群集IP地址的報文發給NLB服務器群集中的每臺服務器。NLB服務器可以工作在單播模式、組播模式和IGMP多播模式。
目前交換機僅支持與工作在單播模式或組播模式的NLB服務器互連。如果交換機支持多端口ARP功能,建議使用多端口ARP方法實現與NLB服務器群集對接。對於不支持多端口ARP的交換機形態和版本,並且設備不足時,用戶可以採用物理鏈路環回的方法實現交換機與NLB服務器群集的對接。
配置注意事項
- 當NLB服務器群集工作在單播模式時,不需要在交換機上配置靜態ARP表項;當NLB服務器群集工作在組播模式時,需要在交換機上配置靜態ARP表項。
- 本舉例適用於S系列交換機所有產品的所有版本。
組網需求
如圖4-4所示,交換機Switch_1與Switch_2組成堆疊系統,通過接口GE0/0/1和GE1/0/1分別與兩臺NLB服務器直連。NLB服務器群集工作在組播模式下,群集IP地址為10.128.246.252/24,對應的群集MAC地址為03bf-0a80-f6fc。Switch與客戶端Client之間路由可達。
用戶希望網絡中客戶端Client訪問NLB服務器群集時,堆疊系統能夠將發往群集IP地址的報文發送給群集中的所有NLB服務器。
堆疊系統對接組播模式的NLB服務器群集
數據規劃
在開始配置之前,需要規劃好以下數據。
配置思路
通過物理鏈路環回方法實現對接的配置思路如下:
- 配置與NLB服務器直連的接口GE0/0/1和GE1/0/1加入VLAN100。
- 配置接口GE0/0/4和GE1/0/4加入Eth-Trunk4、接口GE0/0/5和GE1/0/5加入Eth-Trunk5。
- 去使能自環接口Eth-Trunk4和Eth-Trunk5的STP/RSTP/VBST/MSTP功能,並以Access類型分別加入VLAN100和VLAN200。
- 配置三層接口VLANIF200的IP地址,VLANIF200作為NLB服務器群集的網關。
- 配置靜態ARP表項。靜態ARP表項的IP地址為群集IP地址,MAC地址為群集組播MAC,出接口為自環口上NLB服務器群集網關VLAN所在的接口。
- 接口GE0/0/4和GE0/0/5、GE1/0/4和GE1/0/5。
操作步驟
步驟一 配置與NLB直連的接口加入VLAN100
配置接口GE0/0/1加入VLAN100。
<huawei> system-view
[HUAWEI] sysname Stack
[Stack] vlan batch 100 200
[Stack] interface gigabitethernet 0/0/1
[Stack-GigabitEthernet0/0/1] port link-type access ?
[Stack-GigabitEthernet0/0/1] port default vlan 100
[Stack-GigabitEthernet0/0/1] quit/<huawei>
# 配置接口GE1/0/1加入VLAN100。
[Stack] interface gigabitethernet 1/0/1
[Stack-GigabitEthernet1/0/1] port link-type access ?
[Stack-GigabitEthernet1/0/1] port default vlan 100
[Stack-GigabitEthernet1/0/1] quit
步驟二 配置接口加入Eth-Trunk
# 配置接口GE0/0/4和GE1/0/4加入Eth-Trunk4。
[Stack] interface eth-trunk 4
[Stack-Eth-Trunk4] quit
[Stack] interface gigabitethernet 0/0/4
[Stack-GigabitEthernet0/0/4]
[Stack-GigabitEthernet0/0/4] quit
[Stack] interface gigabitethernet 1/0/4
[Stack-GigabitEthernet1/0/4] eth-trunk 4
[Stack-GigabitEthernet1/0/4] quit
# 配置接口GE0/0/5和GE1/0/5加入Eth-Trunk5。
[Stack] interface eth-trunk 5
[Stack-Eth-Trunk5] quit
[Stack] interface gigabitethernet 0/0/5
[Stack-GigabitEthernet0/0/5] eth-trunk 5
[Stack-GigabitEthernet0/0/5] quit
[Stack] interface gigabitethernet 1/0/5
[Stack-GigabitEthernet1/0/5] eth-trunk 5
[Stack-GigabitEthernet1/0/5] quit
步驟三 配置自環口Eth-Trunk4和Eth-Trunk5
# 去使能接口Eth-Trunk4和Eth-Trunk5的STP/RSTP/VBST/MSTP功能。
[Stack] interface eth-trunk 4
[Stack-Eth-Trunk4] undo stp enable? //去使能STP/RSTP/VBST/MSTP功能
[Stack-Eth-Trunk4] quit
[Stack] interface eth-trunk 5
[Stack-Eth-Trunk5] undo stp enable? //去使能STP/RSTP/VBST/MSTP功能
[Stack-Eth-Trunk5] quit
# 配置接口Eth-Trunk4和Eth-Trunk5以Access類型分別加入VLAN100和VLAN200。
[Stack] interface eth-trunk 4
[Stack-Eth-Trunk4] port link-type access
[Stack-Eth-Trunk4] port default vlan 100
[Stack-Eth-Trunk4] quit
[Stack] interface eth-trunk 5
[Stack-Eth-Trunk5] port link-type access
[Stack-Eth-Trunk5] port default vlan 200
[Stack-Eth-Trunk5] quit
步驟四 配置NLB服務器群集網關的IP地址
[Stack] interface vlanif 200
[Stack-Vlanif200] ip address 10.128.246.250 24
[Stack-Vlanif200] quit
步驟五 配置靜態ARP表項,靜態ARP表項的IP地址為群集IP地址10.128.246.252,MAC地址為群集組播MAC地址03bf-0a80-f6fc,出接口為VLAN200所在的接口Eth-Trunk5
[Stack] arp static 10.128.246.252 03bf-0a80-f6fc vid 200 interface eth-trunk 5 ??//配置靜態ARP表項
步驟六 連接接口Switch_1上的GE0/0/4和GE0/0/5、Switch_2上的GE1/0/4和GE1/0/5
上述配置完成後,進行物理連線。
步驟七 檢查配置結果
上述配置完成後,發往NLB服務器群集IP地址的報文Server_1和Server_2都能收到。
----結束
配置文件
Stack的配置文件
#
sysname Stack
#
vlan batch 100 200
#
interface Vlanif200
?ip address 10.128.246.250 255.255.255.0
#
interface Eth-Trunk4
port link-type access
port default vlan 100
stp disable
#
interface Eth-Trunk5
port link-type access
port default vlan 200
stp disable
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
#
interface GigabitEthernet0/0/4
eth-trunk 4
#
interface GigabitEthernet0/0/5
eth-trunk 5
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 100
#
interface GigabitEthernet1/0/4
eth-trunk 4
#
interface GigabitEthernet1/0/5
eth-trunk 5
#
arp static 10.128.246.252 03bf-0a80-f6fc vid 200 interface Eth-Trunk5?
#
return
上期鏈接:
閱讀更多 弱電Bar 的文章