原理
1. 网络负载平衡,使用Windows Network Load Balance.
参考微软技术文档,[url]http://www.microsoft.com/china/technet/prodtechnol/windowsserver2003/technologies/clustering/nlbbp.mspx[/url]网络负载平衡:Windows 2000 和 Windows Server 2003 的配置最佳实践
2. 互为备份,实现方法
  • 两台ISA各自周期限性的检查自己的Default Gateway,通过ICMP (PING)来确定物理链路是否正常工作。
  • 发现ICMP 结果失败,停止本机的NLB服务,这样双节点的NLB 自动Failover 到另一个节点
  • 写了一个服务程序来实现此功能,附源代码及工程文件。
网络拓朴图如下
network1.jpg
DG : Default Gateway
NLB: Network Load Balance
具体实现
因为实验环境有限,修改网络 拓朴图如下,道理相信大家都明白的。
sample_network.jpg
1. Windows 2003 Server (Enterprise Edition) x 2 或 Windows 2000 Advanced Server x 2.
只有Windows 2000 Advanced Server/Windows 2003 Enterprise Edition才支持Network Load Balancing
2. 安装ISA Server 2000 (Standard Edition), Standalone, 集成模式,双网卡
安装次序,
  • All Windows Critical Updates
  • ISA Server 2000 Service Pack 1
  • ISA Server 2000 Feature Pack 1
  • ISA Server 2000 Service Pack 2
     
原理1 网络配置 部分
ISA Server 1 (ISA1)
Windows IP Configuration
Host Name . . . . . . . . . . . . : ISA1
Primary Dns Suffix . . . . . . . : vnet.net
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : Yes
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : vnet.net
Ethernet adapter InternalNIC:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel 21140-Based PCI Fast Ethernet Adapter (Generic) #2
Physical Address. . . . . . . . . : 02-BF-0A-00-00-03
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 10.0.0.3
Subnet Mask . . . . . . . . . . . : 255.0.0.0
IP Address. . . . . . . . . . . . : 10.0.0.1
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 10.0.0.1
10.0.0.2
Ethernet adapter ExternalNIC:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel 21140-Based PCI Fast Ethernet Adapter (Generic)
Physical Address. . . . . . . . . : 00-03-FF-C0-68-CD
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.0.252
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.230
DHCP Server . . . . . . . . . . . : 192.168.0.230
DNS Servers . . . . . . . . . . . : 202.96.209.5
202.96.209.133
Lease Obtained. . . . . . . . . . : Saturday, August 14, 2004 4:00:02 PM
Lease Expires . . . . . . . . . . : Saturday, August 14, 2004 5:00:02 PM
络负载平衡配置图
isa1-net1.jpg
isa12-net2.jpg
isa1-net3.jpg
ISA Server 2 (ISA2)
Windows IP Configuration
Host Name . . . . . . . . . . . . : ISA2
Primary Dns Suffix . . . . . . . : vnet.net
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : Yes
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : vnet.net
Ethernet adapter ExternalNIC:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel 21140-Based PCI Fast Ethernet Adapter (Generic)
Physical Address. . . . . . . . . : 00-03-FF-C1-68-CD
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.0.251
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.230
DHCP Server . . . . . . . . . . . : 192.168.0.230
DNS Servers . . . . . . . . . . . : 202.96.209.5
202.96.209.133
Lease Obtained. . . . . . . . . . : Saturday, August 14, 2004 4:00:14 PM
Lease Expires . . . . . . . . . . : Saturday, August 14, 2004 5:00:14 PM
Ethernet adapter InternalNIC:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel 21140-Based PCI Fast Ethernet Adapter (Generic) #2
Physical Address. . . . . . . . . : 02-BF-0A-00-00-03
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 10.0.0.3
Subnet Mask . . . . . . . . . . . : 255.0.0.0
IP Address. . . . . . . . . . . . : 10.0.0.2
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 10.0.0.1
10.0.0.2
络负载平衡配置 图
isa12-net2.jpg
isa2-net3.jpg
完成上述配置后,要对网络负载平衡配置进行复核,确保其能正常工作。 请在任一ISA上运行wlbs query。
如出现下图所示的结果,一切正常。如果最后一行只有1或只有2,NLB工作不正常。这边不展开讨论NLB的问题。
C:\Documents and Settings\Administrator>wlbs query
WLBS Cluster Control Utility V2.4 (c) 1997-2003 Microsoft Corporation.
Cluster 10.0.0.3
Host 2 has entered a converging state 6 time(s) since joining the cluster
and the last convergence completed at approximately: 8/14/2004 4:23:15 PM
Host 2 converged with the following host(s) as part of the cluster:
1, 2
继续在ISA1/ISA2上建立相应的协议规则(Protocol Rule/Site and Content Rule),客户端就可以使用10.0.0.3的地址访问Internet,
做得更加完美的话,可以在DNS加入一条A记录ISA -> 10.0.0.3
下图所示
dns.jpg
ISA的客户配置中作如下的设定
webproxy.jpg
目前为止我们完成了原理1 部分的配置,ISA 能够提供网络负载平衡,对内网用户实现不间断的服务。任一节点的关机,都不会影响内网用户对Internet的访问
原理2. 互为备份,实现方法
下载ispcheck.rar
分别在两台ISA服务器上完成如下配置。
  • 复制ispcheck.exe到%windir%\system32 目录
  • 运行 "ispcheck -install". 会安装ispcheck 系统服务
  • 打开注册表
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ispcheck]
    DestinationIP : ISP的网关地址
    PingInterval :检查的时间间隔,默认为10秒 。
    ConfirmInterval :在实际检查中并不会因为一次失败而立刻断开NLB,会再尝试多次,确认失败才断开NLB,默认为2。
    TimeOut : 为ping的超时设定,默认为2。
  • 启动ispcheck服务。
注意ISPCheck服务 会生成一个日志文件c:\ispcheck.txt

0

收藏

zgcisco

28篇文章,17W+人气,0粉丝

Ctrl+Enter 发布

发布

取消

推荐专栏更多

5353379fc95da1d7d34fd243b9ace17f.jpg
全局视角看大型园区网

路由交换+安全+无线+优化+运维

共40章 | 51CTO夏杰
¥51.00 1697人订阅
45862f289339dc922ffda669fd74ad9b.jpg
网工2.0晋级攻略 ——零基础入门Python/Ansible

网络工程师2.0进阶指南

共30章 | 姜汁啤酒
¥51.00 1570人订阅
a940c66317ecbe58436a2ad3831c2d7d.png
基于Python的DevOps实战

自动化运维开发新概念

共20章 | 抚琴煮酒
¥51.00 431人订阅
629650e188ddde78b213e564c2e9ebff.jpg
负载均衡高手炼成记

高并发架构之路

共15章 | sery
¥51.00 507人订阅
dc6736c5fd50474b5df8b76b040e3d03.jpg
带你玩转高可用

前百度高级工程师的架构高可用实战

共15章 | 曹林华
¥51.00 462人订阅
f92360e227f9d91cdff7ea95120630ef.png
left-qr.jpg

扫一扫,领取大礼包

0

1
分享
qr-url?url=https%3A%2F%2Fblog.51cto.com%2Fzg888%2F59130
zgcisco
noavatar_middle.gif