0

Suppose there are 3 Lan users A(192.168.0.2) , B(192.168.0.3) & C(192.168.0.4). All of them are connected with home wifi router R(192.168.0.1). Now suppose user A hosts counter-strike with IP as mentioned above and port "27015". How B&C will be able to connect to A because each time they send request to A that request will be dropped by router because A didn't send any data to them first. So for this A has to instruct router via "uPnP" that pass those packets which are coming for port "27015". If I'm not correct then tell me how Lan wi-fi users connect with each other for multiplayer?If "uPnP" is not valid here then how user B&C are able to connect with A? I guess using ARP?

6
  • Port forwarding (which is what uPnP does) is only relevant to communications that go from WAN to LAN. Local connections are made directly to the other pc. EDIT: If you want help specific to counter strike, not general networking, then you should probably post on Arquade, not SuperUser.
    – SilentVoid
    Aug 12, 2016 at 2:40
  • Counter strike was used just for a refrence to clarify my question. Using examples makes it more clear to understand what I'm actually asking else my question will be put on hold as unclear. I'm not interested in that game. My question is related with the set of network protocols being used among those users in order to play multiplayer.
    – user612978
    Aug 12, 2016 at 2:54
  • I specifically need answer with general networking and not with that game
    – user612978
    Aug 12, 2016 at 3:07
  • UPNP encapsulates more than just port-forwarding auto configuration; within the LAN, it also provides service advertisement, discovery, zero-configuration networking configuration, etc. It is primarily used for making home/SOHO-grade tech easier to set up by novices. The extent to which any game relies on these capabilities is specific to that title. Many Internet play games will use UPNP, but not all routers support it, so it isn't required in most cases. a correctly port-forwarded router is sufficient. For lan games, it may be required or add additional features for lan play. Aug 12, 2016 at 3:42
  • If you are just asking for a definition of port forwarding, it is a concept related to NAT, where a port on the WAN side of the router is allowed to initiate a connection to a specific IP and port on the LAN side. See more here: en.wikipedia.org/wiki/Port_forwarding The site portforward.com has instructions for configuring port forwarding on thousands of differant kinds of routers. just search for your model number. LAN play does not require UPNP for port forwarding configuration, but may use it for discovery of other players via SSDP. Aug 12, 2016 at 3:53

1 Answer 1

1

uPnP does port forwarding (among other things) which is used when the client is connecting to a server that's behind a gateway (the server is on a separate LAN). A home router is assigned a single IP address which is shared by all devices on the LAN. This works fine when talking to the WAN, but on incoming connection your router has no idea what internal address to forward it to. Port forewarning solves this problem by setting up a table that maps a port to an internal IP for incoming connections, and uPnP is a protocol for programs on your computer to create these rules themselves instead of just telling you to dig through your routers admin panel and set up so and so port forwarding rule. Keep in mind, this is only relevant if B&C want to conect to A from the WAN (using R's public IP address, not 192.168.0.1 which is its LAN address). In your setup (all clients on a LAN) B&C would just connect to 192.168.0.2:27015 and completely ignore R.

You must log in to answer this question.