在昨天的游戏测试中出现了一个好玩的问题,我因为有事请假没有在第一现场,但我也通过QQ全程关注了事情经过- –

我们游戏服务器部署用了两个主要端口,一个2000一个3000。在测试过程中,发现有些包能正常连接3000端口的服务器,2000端口的服务器却连接不上。排查问题的时候,先是让对方用telenet链接服务器的2000端口,发现是通的。于是对2000端口的服务器进行抓包,发现在建立TCP连接的时候,会向客户端返回RST包

通过网上搜索相关资料,发现2000端口被用于思科的SCCP()。如果一个支持SCCP的思科网络访问端口2000的服务,

Firewalls tend to treat port 2000 as a special port and do some funny thing with the data.

解决的办法固然有两种

  1. 关闭SCCP功能

  2. 更换服务器的端口

从长远考虑,我们选择更换服务器端口

关于问题原因的样验证

我晚上查到了几个同类问题的帖子,几乎都是英文,也没有太多详细信息,只有这一篇Connecting to the HFS Through a Firewall | IT Services Help Site写了比较详细的原因:

Some departments have reported problems related to deep packet inspection (DPI) firewalls and access to the archive service (please note this does not affect the backup service). The HFS archive service uses TCP port 2000, and this port is also used by SCCP (Cisco\’s Skinny Client Control Protocol). DPI firewalls with support for SCCP expect only to see SCCP connections using port 2000 – they view the TSM connection to the HFS archive service as erroneous and terminate it.

其实因为一些原因,没有对这一块深入探究,对思科设备也不了解。一开始我以为是我们服务器使用了思科的原因,但是看到大部分IP可以正常连接我们的服务器,所以推测问题可能出在连接请求方,但也没有实际证据。姑且先认为,TCP连接的任何一方端口如果是2000端口,在思科网络中就会出现连接异常

如果有其他大神了解这一块,能够详细说明一下是最好不过了。

另附上我搜到的好多同类型问题贴:

  1. Connecting to the HFS Through a Firewall | IT Services Help Site

  2. Field Notice: NAT Enabled Routers Encounter Problems with Cisco IOS 12.1(5)T – Cisco

  3. PeteNetLive – KB0000027 – Cannot Connect to TCP Port 2000 (Even over VPN) | PeteNetLive

  4. Problem with an Hitahci AMS SAN on a Cisco Network Using Port 2000 – Geeks Hangout

  5. Connect to TCP port 2000 on a Cisco Router with NAT