|
Reload this page using its associated frames
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Clarifying the basicsWhen internet protocol (IP) addresses became a valuable resource over the past years of the Internet boom different approaches have been taken to stretch the available address range. For instance most Internet Service Providers (ISP) assign IP addresses from a pool rather than giving each of their customers a static IP that would never change.While dynamic IP address assignment is no problem at all when playing TA the other approach to overcome the limited range of IP addresses causes some trouble. The idea was to create private networks that may reuse the same IP address range other private networks use too but to separate those private networks from the Internet so the overlapping address ranges wouldn't interfere. In order to allow computers from within the private networks to access the public Internet additional measures had to be taken: it's clear the computers couldn't use their private IP addresses because those are only guaranteeed to be unique within the private networks. That's where Network Address Translation (NAT) comes in. The NAT solution which may exist as hardware implementation (router, cable modem, DSL modem etc.) or as software implementation (f. ex. Microsoft's Internet Connection Sharing ICS) is the point each network packet going from the private network to the Internet or vice versa has to pass. For this purpose the NAT solution is integrated in both networks by using (at least) two different IP addresses. The first address is a Internet wide unique outer IP address assigned by the ISP. The second IP address is taken from the address range used in the private network. Although this inner IP address is unique within the private network (often denoted as Local Area Network LAN) it's non unique within the Internet since other private networks world wide use them as well. As you can see the NAT device has two 'sides': one communicating with the Internet and one with the private network. For the sake of simplicity the following explanations assume that the terms router and NAT are exchangable. NAT and connections initiated from the private networkThis is the usual scenario for contacting a so called server application on the Internet. On the local computer a client application performs an active open to the server which plain means the connection process is initiated by this program. A typical example for client applications are web browsers, the according counterpart on the server side was for example the Apache web server or Microsoft's Internet Information Server. It's important to understand the difference between clients and servers because this will have an impact on NAT too (as you will see later).Without going too much into details lets take a look what happens when a connection to an Internet computer is actively opened from within the private network. Suppose the private network is using addresses in the range 192.168.1.0 - 192.168.1.255. The outer NAT IP assigned by the ISP was 217.180.180.5, the inner IP of the NAT by which it's integrated into the private network was 192.168.1.1 and the sending computer in the private network had the IP 192.168.1.45 assigned. As soon the network interface of the sending computer concludes that the destination IP in the packet containing the connection request is not within the range of the IPs associated with the local network it will forward the packet to a so called gateway which is supposed to have information about how to reach IPs outside of the LAN IP address range. In simple LANs (and I talk only about home networks here) the gateway is identical with the NAT entity. So, in our example the local computer just forwards the connection request packet to the NAT entity's LAN interface at IP 192.168.1.1. Once it has arrived there the NAT solution will modify the packet's IP header (which carries the destination and source address information) by replacing its (at Internet scale) non unique source IP 192.168.1.45 with the NAT solution's outer (Internet) IP address, in our example 217.80.180.5. Usually the source port data in the header is also changed and then the original source IP and original and new source port information are put on internal lists maintained within the NAT entity. These book keeping is required in order to allow the NAT entity to associate the initiatior of a particular (outgoing) connection request with response packets from the targeted Internet computer later on. But principle the exchange of the LAN source IP by the NAT's ISP assigned Internet IP address is the actual translation process. Once the translation is done the NAT solution puts the connection request packet on the Internet where it finds its way to the destination computer by travelling from router to router until it reaches the destination computer. The receiving computer replies to the incomming connection request by sending a response packet to the source IP address it reads from the IP header of the connection request packet which it has just received. Since the NAT entity has replaced the original (LAN) source IP 192.168.1.45 with its own Internet IP 217.80.180.5 before the conncetion request packet was put on the Internet this is exactly the address the response packet gets directed to. As soon as the response packet arrives at the NAT entity's Internet interface it'll look up its internal list in order to figure out which computer in the LAN is associated with the packet that triggered the response. It then replaces the destination IP address which still points to the NAT entity's Internet interface IP 217.80.180.5 with the LAN IP of the computer which initiated the outgoing connection, which was IP 192.168.1.45 in our example. Then it injects the modified packet via its LAN interface into the LAN. From there the response packet will finally find its way to the computer which had originally initated the connection to the Internet computer, the circle is closed. Now, what could go wrong if NAT entities wouldn't translate possibly ambiguous LAN IP addresses to unique Internet IP addresses? To answer this question imagine the following situation: Two computers located in two different private networks are using the same non unique IP 192.168.1.45 and are sending connection request packets to computers on the Internet at the same time. Once the destination computers are replying with their response packets directed to the source IP they found in the connection request packet the Internet is spoiled with packets directed to an IP address which does actually represent two different receivers. Or imagine the two LAN computers are trying to open a connection to the same Internet computer at the same time: One of the senders would lose and never receive a response packet since as soon it hits a router which knows a route to the destination IP address it will go there. There is no way to tell this router something like 'the first packet with this destination IP address has to go this way, the second you do just forward elsewhere' (so it had a second chance to be delivered to the other computer by hitting a router that would know the other computer under the same ambiguous IP address). At this point I should mention that there are mechanims in place to avoid such ambiguouties from start by defining special IP address ranges that are supposed to be used for private networks that are actually connected to the Internet by NAT entities: network packets with destination addresses in the range 192.168.x.x respectively 10.x.x.x are generally dropped by Internet routers which is exactly the reason why they are supposed to be picked for running NATted LANs. Even if something goes terrible wrong and a LAN IP spoiled packet makes it into the Internet it won't be able to cause much confusion since any reply packet directed to its sender's source IP address is immmediatly filtered out by the first router encountering such a packet. NAT and connections initiated from the InternetAs we learned above the NAT solution can gather all required information to associate the computer's private IP with the respones packets for active opens on the fly. Now, things get a bit ugly when the role of client and server is exchanged. Imagine you run a web server like Apache in the private network. Since this is a server program it won't perform active opens but just wait for connection requests from clients. It does this by listening on a well known network port, for web servers usually port number 80 (think of network port numbers as house numbers while IP addresses are the street names - the combination of both identifies a location in the IP world). The problem is, how can a web browser on the Internet reach this web server? As we already know by now you cant just tell the web browser to contact IP 192.168.1.45 at port 80 where the server is listening since the whole private network is hidden behind the NAT's outer IP 217.80.180.5.The first idea you probably have is to tell the web browser to connect the NAT's outer unique IP address. Now, with the attempt to contact 217.80.180.5 at port 80 you would get the packet containing the active open request of the web browser to the NAT's outer interface. But what then? The NAT solution is not able to handle web browser requests the only option it has is to discard the packet. Now, to get the packet over the gap from the NAT's outer IP interface to the waiting web server application running on IP 192.168.1.45 the NAT solution needs additional information which can't be gathered on the fly. You have to explicitly tell it which computer in the private network is running a server application that can take care of active open requests comming from the Internet which are directed to a certain network port. All NAT solutions offer configuration options for explicit assignement of active open requests arriving at the outer NAT IP and directed to a particular network port to a single private network IP where the server application supposed to handle those connection requests runs. The process is also denoted as inverse masquerading, port forwarding or setting up a Virtual Server. While rules are usually defined based on a destination port --> private network IP mapping there exist less accurate configuration options also which allow to redirect all incomming active open requests regardless of the destination network port to a single private network IP. The computer on that IP is then supposed to run all the server applications handling the incomming requests. This single computer is often labled as Demilitarized Zone (DMZ) in the setup menues of the NAT solutions. Newer routers may offer a Virtual Server configuration which basically takes care of all incomming traffic from the Internet: from port forwarding to automatically open the firewall for the forwarded ports everything is possible. Now back to our example. In order to tie the web browser up with the web server we define a inverse masquerading rule that tells the NAT solution to forward all active open requests for network port 80 arriving from the Internet to the private network IP 192.168.1.45 where the web server application is listening on port 80 for connection requests. Now our web browser is able to reach the web server hidden behind the NAT solution by using the NAT's outer IP address: the packet starts at the Internet computer with destination IP 217.80.180.5 and destination network port 80 in the IP header of the packet carrying the active open connection request. Once it arrives at the NAT's outer interface the NAT solution will lookup the destination network port in the packet which is 80. Since a rule was configured to forward all connection requests for port 80 to the private IP 192.168.1.45 the NAT now knows how to handle this packet: it'll replace the destination IP in the header still pointing to the outer NAT IP 217.80.180.5 with the private network IP of the computer associated with network port 80, which is 192.168.1.45 in our example. Then the packet is injected into the private network where it finally reaches the computer running the web server. NAT and TAThe only reason why you have problems to get TA running from behind a NAT solution is the approach Microsoft took when implementing the - nowadays legacy - DirectPlay interface comming with the DirectX software package: TA is an old game that had been developed before 1997 and is thus utilising that back then brand new but nowadays outdated legacy DirectPlay interface so in a TA multiplayer game every TA instance acts as a server and client application at the same time. This implies that each TA instance will actively open connections to each other TA computer in the game and will listen for connection requests from the other TA computers in the game at the same time. To stick to our examples above: TA acts like a web browser/web server hybrid.The client role (initiating connections to the other TA computers from inside the LAN) is no problem at all since the NAT entity can handle those on the fly. It's the TA instances server role that causes the trouble: In a multiplayer game each TA instance will listen on two ports taken somewhere from the range between 2300 and 2400. That's a bit like a web server which decides to pick a random listen port from range 2300 to 2400 rather than using the single, well known port 80 when starting up. If TA had a configuration entry in the totala.ini file that would allow to set two well known ports for the TA network communication then things would be way easier, but that is not the case. The two sections below introduce two possible ways to configure the NAT entity so it allows you to play TA on the Internet from behind it. Note that more complex scenarios (like participating in the same TA Internet game from behind the NAT solution with more than one computer) require the NAT entity to provide support for a special kind of network traffic handling. So not all scenarios described in either of the two sections may work for you, simply because the NAT solution may lack this kind of functionality. Configuring a router without using Universal Plug and Play (UPnP)Older hardware routers or software routers may not support UPnP or the router supports it but you have decided to turn it off (probably due to security concerns, see explanations in the UPnP conclusions section below).In any case, without UPnP you have to create the port forwarding rules for TA in the router setup interactively and you may also have to configure a firewall possibly residing in the router device itself for the TA network traffic. When it comes to special TA/router scenarios (like entering the same TA game with two TA instances from behind the same router) it might also be needed to configure and run additional tools on the LAN computers involved. Playing TA Internt games from behind the router with a single computerIt's basically like setting up inverse masquerading, port forwarding or a Virtual Server for a Web Server as described in the general NAT section. The only difference is that you have to configure more than one network port.Since you go for manual port fowarding make sure that you setup the forwarding rules in the correct section of the router setup. Avoid any port forwarding menu sporting the terms UPnP or trigger. The menues you are looking for do usually feature terms like Virtual Server, inverse masquerading or simply port forwarding. Below follows the description of three different ways to configure a router/firewall manually for TA Internet games, each having its own advantages and disadvantages.
Single computer conclusionsRemember, port forwarding on a particular port is always asscoicated with a fixed inner IP. For example, if you set up a router so it forwards the connection requests to IP 192.168.1.45 because that's the computer TA is installed on and you install TA later on a second computer that has the IP 192.168.1.70 assigned then you can't play TA Internet games on the 2nd computer unless you change the IP in the forwarding rules from 192.168.1.45 to 192.168.1.70. On the other hand, once you changed the forwarding rules so they now suite the IP of the 2nd computer you can't play Internet TA games on the 1st computer anymore.If the router assigns each LAN computer a IP from an IP pool every time it boots then the IP of the TA computer might change after rebooting it, effectively invalidating the IPs in the the port forwarding rules for TA. This kind of dynamic IP assignment is implemented by a functionality called Dynamic Host Configuration Protocol (DHCP). A good DHCP implementation should try to assign a computer the same IP it had the last time it got tied into the LAN so chances are slim that the assigned IP address would ever change, even with DHCP enabled. Still, if you notice that Internet TA stops working out of a sudden and you are using DHCP in your LAN then an IP address change might be the reason. In such an event you have two options:
Playing TA Internt games from behind the router with multiple computersThe basic problem to solve here is to make each TA instance running on a LAN computer to use a unique pair of TCP/UDP listen ports so an incomming connection request network packet arriving at the NAT entity's WAN interface being directed to a LAN computer represented by the destination information WAN IP:ta instance listen port can be forwarded to the final LAN destination by applying the port forwarding rule for ta instance listen port.Basically the goal is to overcome the ambiguity of the WAN IP shared between all LAN computers by associating each LAN computer with a unique TA listen port. This way the port forwarding rules allow to split the incomming connection request based on their destination port number: The combination of WAN IP:ta instance listen port must be unique for each TA instance. Also note that when it comes to splitting the incomming connection requests by port forwarding rules it doesn't matter whether you would like to join the same Internet TA game or different Internet TA games with the TA instances in the LAN, you'll need the splitting setup in any case.Keep in mind too that because the initial TA client-->TA host join traffic is always directed to the static TCP port number 47624 and since a single port can only be configured to point to a single LAN IP in the NAT solution's port forwarding setup it's not possible to host more than one TA game from behind a NAT solution. This also implies that you can't switch the hosting role between the LAN computers without changing the LAN IP for the port 47624 rule in the port forwarding configuration of the NAT entity to the new host's LAN IP. Unfortunately neither TA nor the legacy DirectX 7 network interface allow to configure the TA listen port numbers to use explicitly, thus DirectPlay will pick the two listen ports for each TA instance somewhere out of the range from 2300-2400. Because of this default behavior you will most likely end up with two identical pairs of TA listen ports on each TA computer, at least so long as the DirectX versions and/or Windows operating system versions don't differ. In either case the first task is to figure out whether you end up with different listen port pairs on each TA computer and if not so to force some of the TA instances to use differnt ports. For the time being, I know of two possibilties to gurantee the uniqueness of ta instance listen ports described below:
If the firewall is residing in the router then creating a port forwading rule may automatically create an according firewall opening rule for the incomming traffic on the forwarded port so you may not have to create such a rule explictly in the router's firewall configuration settings:
Whether you can join the same TA Internet game instance with more than one of the TA LAN computers depends on how the router you use implements a very special kind of network traffic routing I liek to call U-bend forwarding. So if you don't plan to join the same game with more than one of the LAN computers you are pretty much done here and can stop reading on. Router prerequisites for joining the same Internet game with multiple computersWhen you want to join the same game instance hosted on a Internet game service with more than one LAN TA computer then your router needs to support what I call U bend forwarding. Depending on the way U bend forwarding is implemented by the router certain scenarios may or may not work. This issue is completely detached from the topic on how to pin TA running on different LAN computers on different ports. If your router doesn't implement proper U bend forwarding then having successfully pinned all LAN TA instances on different port numbers won't help to fix anything. Keep in mind that if you want to join different Internet games with each of the TA LAN instances then the U bend forwarding capabilities of the router don't play a role at all. Below follows a description of the possible scenarios and the prerequisites the router has to fulfill U-bend forwarding wise to get them working:
Multiple computer conclusionsThe same considerations as in the Single computer conclusions section do apply here as well. Besides that joining different games with multiple LAN TA clients should always work when you were able to get it working for a single LAN comouter beforehand. It only results in more port forwarding rules and possibly additional configuration efforts for DXport on some of the LAN TA computers. Whether you get multiple LAN TA clients into a single TA Internet game depends only on the U-bend forwarding capabilities of your routing solution and nothing else. Compared to using UPnP (see next section) setting up the multi TA client enviornment manually can become a quite annoying exercise but I still recommend to use the manual approach instead of the UPnP option so long as you get things technically working. The UPnP conclusions section states in detail why I think so.Configuring a router by utilising UPnPUPnP is a relative new method to negoiate a LAN/WAN port mapping for incomming connection requests between an application running in the LAN and a WAN router. When TA had been coded UPnP didn't even exist so the game itself lacks the ability to negoiate said mapping. The reason why it works nevertheless is the DirectPlay interface which is part of Microsoft's DirectX software package. It's the DirectPlay program code which handles the port negoiations with the router on behalf of the legacy applications utilising DirectPlay. Because the UPnP protocol allows any LAN computer to gather the current mapping table from the central hub (the router) port mappings can even be negoiated across LAN computers (which is a great advantage for certain kinds of scenarios). In order to get UPnP working properly you should check the following issues:
Joining TA games on the Internet from behind a routerOnce you have UPnP enabled in the router any join scenario should work, no matter how many LAN TA clients are involved. Neither does it play a role whether you try to join the same or different games.It's worth to note that the question whether or not the UPnP enabled router supports U-bend forwarding is of no relevance since it seems that the DirectPlay layer on all involved LAN computers is aware of the fact that the other LAN computers can be reached directly by using their respective LAN IP. So the inter LAN traffic is not detouring over the router's WAN IP interface but is rather exchanged directly between the LAN TA clients. Although the router firewall and any Microsoft software firewall possibly running on the TA computer(s) involved in the game(s) should automatically become opened for the ports utilised by UPnP managed connections it's theoretically possible that another 3rd party firewall residing anywhere between the UPnP enabled router and a LAN TA computer might block the traffic. If such a firewall exists make sure that it's open for traffic directed to any of the LAN TA computers on the ports 2300-2400. Since TA clients on the Internet can be located behind a UPnP entity as well you can't just restrict the allowed outgoing traffic to the range 2300-2400 too since it's absolutely unpredictable what port number a UPnP entity uses at its WAN interface to expose and map one of the ports used by a TA client in its LAN. So you have no choice but to allow outgoing traffic on all ports directed to all IPs. Hosting TA games on the Internet from behind the routerAt least with the UPnP router model I used for the tests it wasn't possible to setup a TA host in the LAN. First of all no port mapping had been created in the router for port 47624 once the TA host instance was up and running in the LAN so joining the TA server instance from the Internet was impossible. After I added a port forwarding rule for port 47624 manually in the router configuration that pointed to the LAN IP the TA host was running on an Internet TA client saw the game but was still unable to join it.So for now I assume that hosting with UpnP is not always possible. It may depend on the router too, though. If hosting in UPnP mode doesn't work for you then disabling UPnP and setting stuff up manually is an option, at least so long as you are not planning to run some of the more complex scenarios (like joining the same Internet game with more than one LAN TA client). UPnP conclusionsWhile UPnP saves you from configuring port forwarding rules in the router setup manually and also makes certain scenarios that would otherwise require a great deal of additional configuration efforts work without much hassle it also poses a security threat to your LAN: Creating a new port mapping rule via the UPnP protocol is done without any authentication of the port mapping requester entity for whatsoever which means that any program running on one of the LAN computers can open additional ports in the router without any user interaction or user notification. Think about that: Enabling UPnP is pretty much like disabling the user/password login for the interactive router configuration at least when it comes to the port forwarding menu setup access. For example, with UPnP functionalities enabled a trojan or virus that could successfully infect one of the LAN computers beforehand can open additional ports in the router on the fly, allowing maleware software to run in an anonymous broadcast listen modus (by waiting on commands on the opened ports) rather than making it necessary for it to contact a well known server for further instructions (whoms IP had to be put somwhere into the program code then which is much of a give away that makes it much easier for anti virus manufactors and Internet Provioders to stop the virus right in its tracks). If you haven't noticed it by now: Due to the security risks comming bundled with UPnP I'm not a great fan of it. To make things worse some router manufactors like Netgear did start to ship router firmware upgrades for their devices which turn on the optional UPnP interface on default.Security and UPnP are two basic principles that can't be fused together into a working concept: UPnP stands for the 'easy to use' approach (as in don't annoy the user with a learning curve that my frustrate him to the point where he drops the product) while the term security always requires at least some basic understanding of what one is doing (as in setting up firewall and/or port forwarding rules explicitly and not leaving that task to some piece of software). It doesn't come as a suprise that Microsoft is one of the driving forces behind UPnP - the 'easy to use' approach has helped to make their products such a success but one has always to realize that this simplicity comes for a price. My advice is: Disable the UPnP support in the router if it's available at all and take the time to configure port forwarding and firewalls manually. Even for complex scenarios (like getting two TA instances into the same TA game hosted on the Internet) exist alternatives which make use of UPnP unnecessary. I'm well aware that many people lack the knowledge required to configure a router for a particular game in something like two minutes but it's my strong opinion that in the times of the Internet you should have some basic knowledge about what you are dealing with. The concept of Internet connection addressing is not more complex than the concept of streets (IP addresses) and house numbers (ports). If you understand how the postman is able to deliver your real world mail then you should also be able to grasp the concept of how Internet computers contact each other. Just take the time to understand this stuff - it may cost you one week of research and fiddling around with the router for your first type of Internet game but it won't take that long again for the next type of game afterwards. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Page last updated 2006/06/18 by tcbw@tcbw.net | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||