2008 April 14th Monday (四月 十四日 月曜日)

本文详细解释了服务器重启后无法绑定本地地址的现象,涉及到TCP/IP协议中的2MSL状态,以及如何解决该问题。通过理解最大段生存时间(MSL)的概念,了解应用程序关闭时地址和端口的状态以及重新使用限制。
This moring I got a mail that tell me how to set my mail box which is used to communicate with Japanese customers.  After tring again and again, it still can not be used.  It was delayed about one week.  The skype also can not be used.  Until now I can apply an account for myself.   Why after a server program reboot can not bind its own local address?  It is the root of 2MSL.  An application based on TCP/IP will be at 2MSL(TIME_WAIT) time out state when it close a connection actively.  At 2MSL state TCP layer will wait the Last Ack from its peer.  The MSL(Maximum Segment Lifetime) is a segment maximum live time.  Double that is for the peer to can resend the Last Ack so as to lost it.   So, when an application was shutdwon, the local addresss and port used is still at 2MSL state.  It usually is 1~4 minutes.  At 2MSL, the socket pair(client and server addresses and ports) can not be reused.  As a rule, local address and port is prohibitted from reusing unless time out.  It can approach the TCP requiremenet of 2MSL.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值