English 中文(简体)
是什么原因造成TCP/IP重新造船旗?
原标题:What causes a TCP/IP reset (RST) flag to be sent?

我试图指出,我对TCP/IP的连接为什么每10分钟(实际上在1-2秒内)就停止。 我发现,在10分钟的不活动之后,另一端是寄出一只带有 re(RST)国旗的包裹。 go角搜索告诉我,“RESET旗帜表明,接收者已变得混淆不清,因此希望断绝联系”,但这比我需要的细节少一些。 怎样才能做到这一点? 某些路由人对路由谁负责,或者这是否总是从另一个终点开始?

<><>Edit>: 我的计算机与另一端点之间有一条路由(具体地说是联系人WRT-54G)——在路由时,我是否应当找任何东西?

最佳回答

航道者可以做任何事情,特别是可能涉及与交通有关的大量隐藏的肉类。

一种原因是,一个装置将发送一份区域电子数据表,以回应接收一份封闭式袖珍的包装单。

很难给出一个坚定但一般性的答案,因为自清洁发展机制成立以来,已经访问了每一种可能的转化,所有的人都可能加入区域贸易协定,企图阻止交通。 (例如,一些国家的防火墙类似工作)

问题回答

还在同侪上开一个包裹(例如,电带),看看看它是否向寄出《皇家法令》的同龄人或中间的人。

需了解的一个问题是,许多六氯环己烷净过滤器防火墙被错误地配置。

如果有:

-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT 

-A FORWARD -p tcp -j REJECT --reject-with tcp-reset 

然后,包装重新排序可能导致防火墙,因为包装单无效,从而产生脂肪,从而打破健康的连接。

排队特别可能有一个无线网络。

而是应当:

-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT 

-A FORWARD -m state --state INVALID -j DROP 

-A FORWARD -p tcp -j REJECT --reject-with tcp-reset 

基本是:

... -m state --state RELATED,ESTABLISHED -j ACCEPT 

应紧接着:

... -m state --state INVALID -j DROP

It s better to drop a packet then to generate a potentially protocol disrupting tcp reset. Resets are better when they re provably the correct thing to send... since this eliminates timeouts. But if there s any chance they re invalid then they can cause this sort of pain.

I ve just spent quite some time troubleshooting this very problem. None of the proposed solutions worked. Turned out that our sysadmin by mistake assigned the same static IP to two unrelated servers belonging to different groups, but sitting on the same network. The end results were intermittently dropped vnc connections, browser that had to be refreshed several times to fetch the web page, and other strange things.

在某些情况下,可发送TCP重新定位。

  • Non-Existence TCP endpoint
    • The client sends SYN to a non-existing TCP port or IP on the server side. The server will send a reset to the client.
  • SYN matches the existing TCP endpoint
    • The client sends SYN to an existing TCP endpoint, which means the same 5-tuple. The server will send a reset to the client.
  • Accept Queue Full
    • When the accept queue is full on the server side, tcp_abort_on_overflow is set. The server will send a reset to the client.
  • Half-Open Connections
    • When the server restarts itself. Then all connections before would receive a reset from the server side.
  • Firewall
    • The firewall could send a reset to the client or server
  • Time-Wait Assassination
    • When the client in the time-wait state, receives a message from the server-side, the client will send a reset to the server.
  • Aborting Connection
    • When the client or server aborts the connection, it could send a reset to the server or client
  • Connection Timeout
    • If a TCP connection is idle for an extended period, one of the parties might send a reset packet to close the connection.

注册会计师事务所由一方派到现场,因为它是最后一批捷克克朗的一方。 因此,如果它从一方收到在错误的国家进行被动关闭的证券,它就会寄出一份表明有错误的RST包。

如果有一条航道,特别是使用少量资源的低端航道,将首先举行最老的结核病防治会议。 为此,在包装单上打上了<代码>RST的旗帜,有效地将接收站贴近(非常平凡的)连接。 这样做是为了节约资源。

一些防火墙确实是,如果连接点为X分钟。 一些ISP还出于各种原因安排其路由人这样做。

在今天和现在,你需要勇敢地处理(视需要重建)这一状况。

这是因为在网络中,有另一个程序向您的TCP联系发送了RST。

通常情况下,将在以下情况下发出区域ST:

  • A process close the socket when socket using SO_LINGER option is enabled
  • OS is doing the resource cleanup when your process exit without closing socket.

就你而言,它像一个进程一样,把你的联系(IP+港口)连接起来,并在建立联系后继续发送区域电子数据。

In most applications, the socket connection has a timeout. If there is no communication between the client and the server within the timeout, the connection is reset as you observe. A great example is a FTP server, if you connect to the server and just leave the connection without browsing or downloading files, the server will kick you off the connection, usually to allow other to be able to connect. I guess this is what you are experiencing with your connection. So take a look in the server application, if that is where you get the reset from, and see if it indeed has a timeout set for the connection in the source code.

Just had a case. Client1 connected to Server. They are sending data via websocket protocol and the TCP connection is kept alived. Server is python flask and listening on Port 5000. Then Client2(same IP address as Client1) send a HTTP request to Server. Now if you interrupt Client1 to make it quit. Then a "connection reset by peer 104" happens in Server side and Client2.

Simply put, the previous connection is not safely closed and a request is sent immediately for a 3 way handshake. The Server side got confused and sent a RST message.

在一般装置(另一端)中,我认为,在你的案件中,保留时间为10分钟。 申请需要在此之前对装置进行污染,如果不是另一端,则发送了TCP RST国旗以关闭该连接。 你可能必须延长这一时间,或修改你的请求,更经常地发出10分钟的请求。





相关问题
C# Networking API s [closed]

Lately I ve been looking for a good networking API i could possibly use and/or reference some of the code within, but i have mere luck searching for some on Google/Bing. Hopefully somebody here has ...

Listen to a port that is in use [duplicate]

Possible Duplicate: Get connecting IP from specified ports that using by other program. If a port is used by a program, is there any way I can listen that port and get the connected IP on that ...

Twisted Spread suitable for multiplayer racing sim?

Do you think that Twisted Spread may be suitable (in terms of performance) for a multiplayer racing simulator? The rest of the application is based on Python-Ogre. Can Perspective Broker run upon (...

Optimizing a LAN server for a game

I m the network programmer on a school game project. We want to have up to 16 players at once on a LAN. I am using the Server-Client model and am creating a new thread per client that joins. ...

multicast ip address - blocked in call to recvfrom

i am writing a simple multicast application. i intend to run it on localhost. i have done the following: char *maddr; . . . sendfd = socket(...); struct sockaddr_in sasend; sasend.sin_family = ...

Java HTTPAUTH

我试图把桌面应用程序连接起来,我是同D.icio.us api @ Delicious Alan书写的,简单地向他们提供我的用户名和密码,并请他把书记上写给我......。

热门标签