Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

It used to be the case that you had to open ports on your router to play some multiplayer games. I haven't had to do that in many years -- pretty much every game works online out of the box. What changed?

share|improve this question
    
Hm, that's a good question! I remember having to open ports for D2... –  SaintWacko Jan 28 '13 at 1:59
add comment

1 Answer

up vote 23 down vote accepted

It helps to understand why you need/needed to open ports in the first place. Once upon a time, every computer on the internet had a unique IP address. However, with the rise of residential internet (and the decline in IPv4 address space), it became more and more popular to share an IP address amongst multiple devices via a scheme called network address translation (NAT).

NAT works fine for outbound connections, which accounts for most of the connections an average internet user makes. However, in order to act as a server, you have to decide which computer that is sharing a public IP will accept a connection on a given port. This process is called forwarding or opening ports.

Some PC games and many console games (your Halos and your Calls of Duty) still work on a peer-to-peer networking, where one player in the game is the host and must be able to accept the incoming connections from other players. Thus, someone needs to open ports on their router in order for the game to be played.

However, many PC games these days use centralized servers to establish connections between different users. This means that the players in the games only need to be able to establish outbound connections. This is no problem, even when NAT is involved, so there's no need to open ports.

There's also a protocol called universal plug and play or UPnP, which allows routers to automatically understand what ports need to be routed where by communicating with the devices that need the ports. This is gaining in popularity, but isn't supported by all routers and devices.

tl;dr: Games with dedicated servers don't require you to open ports, unless you're hosting the server yourself.

share|improve this answer
2  
Also, now we have UPnP. –  kotekzot Jan 28 '13 at 4:38
6  
There's also UDP hole punching with which you can host a server behind most types of NAT as long as there is a central (light) server that helps with establishing connections (i.e. not a full game server). –  Joachim Sauer Jan 28 '13 at 8:14
    
UPnP is referenced in the answer. I've not seen many UDP hole punching schemes in use for games, although they don't always make the protocols they use known to us gamers. –  agent86 Jan 28 '13 at 15:33
1  
@Archagon, no worries, we're all new to something. :) It has to do with the way NAT works - as long as someone on your network is initiating the connection, NAT knows how to route the data between the two hosts. If someone outside your network is starting the connection, NAT doesn't know what to do with that without being told. –  agent86 Jan 30 '13 at 0:22
3  
Think about a house full of people with cell phones but sharing just one phone number. If you call out, the phone company knows to connect you to whoever you called, rather than, say, your roommate. But if someone calls in, which phone should ring? You'd have to work some system out. In phones we might give everyone an extension, and specify which phone should ring for a given extension. In NAT, "phone extensions" become "ports" that are forwarded. –  agent86 Jan 30 '13 at 0:25
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.