CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Chat on WAN

  1. #1

    Chat on WAN

    chat on( sorry, my english is so poor that i don`t whether on or in ) WAN.
    i have seen the programs from Matthew Millman and Yi Hai, but they all work on LAN only.
    i found a article Peer-to-Peer (P2P) communication across middleboxes from google
    quote from that article
    Server S
    18.181.0.31:1234
    |
    |
    +----------------------+----------------------+
    | |
    NAT A NAT B
    155.99.25.11:62000 138.76.29.7:31000
    | |
    | |
    Client A Client B
    10.0.0.1:1234 10.1.1.3:1234

    Suppose A starts sending UDP messages to B's public address, however, and simultaneously relays a request through server S to B, asking B to start sending UDP messages to A's public address. A's outgoing messages directed to B's public address (138.76.29.7:31000) cause NAT A to open up a new communication session between A's private address and B's public address. At the same time, B's messages to A's public address (155.99.25.11:62000) cause NAT B to open up a new communication session between B's private address and A's public address. Once the new UDP sessions have been opened up in each direction, client A and B can communicate with each other directly without further burden on the "introduction" server S.
    now, my question is that client A and client B send UDP messages to NAT B and NAT A without server S, whether the communication can be build.
    Last edited by blacksource; October 12th, 2006 at 05:31 AM.

  2. #2
    Join Date
    Nov 2002
    Location
    California
    Posts
    4,556

    Re: Chat on WAN

    Quote Originally Posted by blacksource
    ...now, my question is that client A and client B send UDP messages to NAT B and NAT A without server S, whether the communication can be build.
    No. Without the server S, the communication cannot be established.

    The technique described in the article is called "hole punching". The"hole punching" technique is described in the excellent paper "Peer-to-Peer Communication Across Network Address Translators" by Bryan Ford, Pyda Srisuresh, Dan Kegel at http://www.brynosaurus.com/pub/net/p2pnat/ . Bryan Ford's site (at http://midcom-p2p.sourceforge.net/ ) includes a link to source code for "hole punching".

    However, "hole punching" relies on the server S, which is sometimes called a "rendezvous server".

    Quote Originally Posted by blacksource
    ... ihave seen the programs from Matthew Millman and Yi Hai, but they all work on LAN only.
    These programs will (probably) work across a WAN too. However, to work across a WAN, each user must know the external (public) IP address on the Internet (as opposed to the private and non-routable IP address on the LAN), and routers on both LANs must be configured to port-forward incoming connections to the correct machine on the LAN. This is more of a network configuration issue. The chat program itself is unaffected and does not need any changes; rather, you must configure the two LANs so that the chat programs can run correctly.

    Mike

  3. #3

    Re: Chat on WAN

    thank you very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured