2007-05-07

对P2P应用不友好的NAT

Views: 11608 | Add Comments

根据微软的资料, 为了更好的支持peer-to-peer应用, Windows的NAT这样表现:

If a client on the private network sends UDP packets to two different computers on the public network from the same source port, the NAT driver will use the same source port for both mappings.

但是, 我遇到一些几十元钱的NAT盒子, 它们并不这样工作. 它们为每一个不同的远端EndPoint分配一个新的外出EndPoint, 一般是上一个端口加1. 这就是Symmetric NAT. 它们仍然执行“loose matching behavior”. 也就是说, 内网(NAT之后)的同一个EndPoint可以拥有多个外出EndPoint. 这对使用基于连接的UDP是个麻烦.

Related posts:

  1. P2P穿透NAT的思路
  2. 使用 Ideawu.P2P.Core.UdpLink 进行 NAT 穿透
  3. 经典的”服务器最多65536个连接”误解
  4. 要记得清除 sockaddr_in
  5. endless_tcp – 一种适应极端网络环境的网络软件架构
Posted by ideawu at 2007-05-07 12:07:53

Leave a Comment