As far as I Know, NAT will set a timeout value for every tcp or udp mapping entry, suppose here is a NAT and it has two mapping entries: one as udp pair, and the other as tcp pair. My questions are:
据我所知,NAT将为每个tcp或udp映射条目设置一个超时值,假设这是一个NAT,它有两个映射条目:一个作为udp对,另一个作为tcp对。我的问题是:
When the tcp/udp pair mapping is dropped because of timeout, what would happen to the endpoints? Will the endpoints get notified by NAT? What would happen if the endpoints still try to send packets to their communication peers?
当tcp / udp对映射由于超时而被丢弃时,端点会发生什么? NAT会通知端点吗?如果端点仍尝试将数据包发送到其通信对等端,会发生什么?
1 个解决方案
#1
-1
TCP connections have a 'keep communication alive' mechanism, which will keep the mapping alive too. So you are unlikely to face a timeout. But, let's imagine you reach a timeout (with UDP or not), your code will throw an error, at most when you try to write a packet. This is handled by the TCP layer.
TCP连接具有“保持通信活动”机制,这将使映射保持活动状态。所以你不太可能面临暂停。但是,让我们假设您达到超时(无论是否使用UDP),当您尝试编写数据包时,您的代码最多会抛出错误。这由TCP层处理。
#1
-1
TCP connections have a 'keep communication alive' mechanism, which will keep the mapping alive too. So you are unlikely to face a timeout. But, let's imagine you reach a timeout (with UDP or not), your code will throw an error, at most when you try to write a packet. This is handled by the TCP layer.
TCP连接具有“保持通信活动”机制,这将使映射保持活动状态。所以你不太可能面临暂停。但是,让我们假设您达到超时(无论是否使用UDP),当您尝试编写数据包时,您的代码最多会抛出错误。这由TCP层处理。