Both sides previous revisionPrevious revisionNext revision | Previous revision |
en:network_terms:port [2022-04-01-21-39] – ↷ Page moved from en:games:network_terms:port to en:network_terms:port 7saturn | en:network_terms:port [2022-04-02-11-08] (current) – 7saturn |
---|
When working with [[TCP]] or [[UDP]] protocol, this is part of a connection's information. Target and source are defined by the [[network address]], like 192.168.0.1 communicating with 8.8.8.8. But as you are aware, there can be many programs running on the same computer. Like you are using your web browser while having a chat program open, and maybe at the same time, listening to a web radio or watching a video. In order to make communication with multiple programs on the same computer possible, every connection information does not only consist of target and source addresses but also target and source ports. | When working with [[TCP]] or [[UDP]] protocol, this is part of a connection's information. Target and source are defined by the [[network address]], like 192.168.0.1 communicating with 8.8.8.8. But as you are aware, there can be many programs running on the same computer. Like you are using your web browser while having a chat program open, and maybe at the same time, listening to a web radio or watching a video. In order to make communication with multiple programs on the same computer possible, every connection information does not only consist of target and source addresses but also target and source ports. |
| |
A port in the TCP/IP sense is a number between 0 and 65535. So every program that want's to communicate with another (even when it is connecting to its own [[host]]) uses a destination port, which it tries to communicate with, and expects replies to it on the port it uses itself. One full communication's participant's information therefore would be 8.8.8.8:53 (UDP). This is for one of Google's [[..:dns]] servers, 8.8.8.8 being the IP address, while 53 is the port number and UDP the [[..:protocol]] that is to be used. One program can use multiple ports simultaneously and multiple programs use different ports than other programs. There are two different situations: | A port in the TCP/IP sense is a number between 0 and 65535. So every program that want's to communicate with another (even when it is connecting to its own [[host]]) uses a destination port, which it tries to communicate with, and expects replies to it on the port it uses itself. One full communication's participant's information therefore would be 8.8.8.8:53 (UDP). This is for one of Google's [[..:network terms:dns]] servers, 8.8.8.8 being the IP address, while 53 is the port number and UDP the [[..:network terms:protocol]] that is to be used. One program can use multiple ports simultaneously and multiple programs use different ports than other programs. There are two different situations: |
===== Working as Server ===== | ===== Working as Server ===== |
When a program works as a server (e. g. a [[..:gaming_theory:server_types#dedicated server|dedicated server]]), the own port of that server is pre-defined. This is where the server waits for incoming communication. This is important, because [[client|clients]] must know in advance, at which port they will have to send their request. E. g. when connecting to [[https://www.google.de]], the HTTPS protocol tells your web browser already in advance, that this connection will most likely use port 443 TCP and it will try that. Normal HTTP works on standard port 80. You don't have to guess a random number this way. For a server that is the norm. | When a program works as a server (e. g. a [[..:gaming_theory:server_types#dedicated server|dedicated server]]), the own port of that server is pre-defined. This is where the server waits for incoming communication. This is important, because [[client|clients]] must know in advance, at which port they will have to send their request. E. g. when connecting to [[https://www.google.de]], the HTTPS protocol tells your web browser already in advance, that this connection will most likely use port 443 TCP and it will try that. Normal HTTP works on standard port 80. You don't have to guess a random number this way. For a server that is the norm. |
This also allowed techniques such as [[Network Address Translation]] (NAT), where your router acts as if it were doing all the requests all by itself, while it actually only relays requests of other computers. And in turn makes [[port forwarding]] an issue. | This also allowed techniques such as [[Network Address Translation]] (NAT), where your router acts as if it were doing all the requests all by itself, while it actually only relays requests of other computers. And in turn makes [[port forwarding]] an issue. |
| |
[ [[..:games_database]] ] [ [[..:game_related_terms]] ] [ [[..:network_terms]] ] | [ [[..:Games Database]] ] [ [[..:Game Related Terms]] ] [ [[..:Network Terms]] ] |