您的位置:首页 > 其它

对LVS DR模式的理解

2014-04-16 11:27 29 查看


Client向vip发请求,lvs接收

Src mac

Dst mac

type



Src ip

Src port

Dst ip

Dst port



CRC

Mac1

Mac2





192.168.1.168



192.168.1.169

80





Lvs根据算法选择一台realserver,将rip所在的网卡mac作为目标mac

Src mac

Dst mac

type



Src ip

Src port

Dst ip

Dst port



CRC

Mac2

Mac3



192.168.1.168



192.168.1.169

80





Realserver收到这个帧,拆开后发现目标ip(vip)与本地匹配,于是处理这个报文。然后重新封装报文,发送到局域网。

Src mac

Dst mac

type



Src ip

Src port

Dst ip

Dst port



CRC

Mac3

Mac1





192.168.1.169

80

192.168.1.168







如果client与LVS同一网段,则client将收到这个回复报文。如果跨网段,则报文通过gateway经由internet返回给用户。

参考:http://os.51cto.com/art/201105/264303.htm
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: