IPVS源代码分析----FTP的处理

FTP有自己的特殊性,在IPVS中进行了特殊的处理。在这一节中把关于FTP的处理择出来,缕清楚。

FTP有两种模式 主动和被动,主动和被动是针对服务器说的,指的是对于数据连接,服务器主动连接到客户端,还是服务器被动接收客户端的连接。

主动模式(active)是 client主动通告服务器它所开启的数据端口,服务器用20端口来连接client的数据端口。client通告服务器端口的消息有一个固定的格式,"PORT xxx,xxx,xxx,xxx,ppp,ppp\n" 这个数据包,

被动模式(passive)是 服务器 告诉客户端它监听的数据端口,客户端主动连接到服务器。"227 Entering Passive Mode (xxx,xxx,xxx,xxx,ppp,ppp)".xxx,xxx,xxx,xxx is the server address, ppp,ppp is the server port number.

先分析主动模式的处理。
To setup ftp with LVS, you schedule only port 21 for forwarding. While the realserver is listening on port 21, it calls the client from port 20 (i.e. it's not listening on port 20) rather than the client calling the realserver (through the director). You do not add entries for port 20 with ipvsadm. Port 20 is handled by persistence for LVS-DR and LVS-Tun. For active ftp with LVS-NAT, you don't need the ipvs ftp helper module (the ftp helper module is only needed for passive ftp, Wensong 17 Sep 2002) (however see ftp helper module.)
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值