www.quake.ie/room101  

discord - the Ireland Gaming Club  
IEGC - www.irelandgamingclub.com  
Ireland Gaming Club - facebook  



search  
 room101.org | anonymous | login | register

room101.org help section basic networking theory
 24/04/2003   basic networking theory923 views | 0 replies 
BioHazRd
Richard Smith


I stole Mindphucks Donkey

posts : 209
lans : 18
site administrator


networking basics
a network is any collection of independent computers that communicate with one another over a shared

network medium. lans are networks usually confined to a geographic area, such as a single building or

a college campus. lans can be small, linking as few as three computers, but often link hundreds of

computers used by thousands of people. the development of standard networking protocols and media has

resulted in worldwide proliferation of lans throughout business and educational organizations, and

more importantly, for gaming and recreation
computers running on a lan typically communicate to each other using either the transmission control

protocol (tcp) or the user datagram protocol (udp).
tcp
when two applications want to communicate to each other reliably, they establish a connection and send

data back and forth over that connection. this is like making a telephone call. if you want to speak

to aunty mary in limerick, a connection is established when you dial her phone number and she answers.

you send data back and forth over the connection by speaking to one another over the phone lines. like

the phone company, tcp guarantees that data sent from one end of the connection actually gets to the

other end and in the same order it was sent. otherwise, an error is reported.
tcp provides a point-to-point channel for applications that require reliable communications. the

hypertext transfer protocol (http), file transfer protocol (ftp), and telnet are all examples of

applications that require a reliable communication channel. the order in which the data is sent and

received over the network is critical to the success of these applications. when http is used to read

from a url, the data must be received in the order in which it was sent. otherwise, you end up with a

jumbled html file, a corrupt zip file, or some other invalid information.
definition: tcp (transmission control protocol) is a connection-based protocol that provides a

reliable flow of data between two computers.
udp
the udp protocol provides for communication that is not guaranteed between two applications on the

network. udp is not connection-based like tcp. rather, it sends independent packets of data, called

datagrams, from one application to another. sending datagrams is much like sending a letter through

the postal service: the order of delivery is not important and is not guaranteed, and each message is

independent of any other.
definition: udp (user datagram protocol) is a protocol that sends independent packets of data, called

datagrams, from one computer to another with no guarantees about arrival. udp is not connection-based

like tcp.
for many applications, the guarantee of reliability is critical to the success of the transfer of

information from one end of the connection to the other. however, other forms of communication don't

require such strict standards. in fact, they may be slowed down by the extra overhead or the reliable

connection may invalidate the service altogether.
consider, for example, a quake 3 server that sends the current player positions to the client when

requested to do so. if the client misses a packet, it doesn't really make sense to resend it because

the players will have moved again by the time the client receives it on the second try. if the client

makes two requests and receives packets from the server out of order, it doesn't really matter because

the client can figure out that the packets are out of order and make another request. the reliability

of tcp is unnecessary in this instance because it causes performance degradation and may hinder the

usefulness of the service.
another example of a service that doesn't need the guarantee of a reliable channel is the ping

command. the purpose of the ping command is to test the communication between two programs over the

network. in fact, ping needs to know about dropped or out-of-order packets to determine how good or

bad the connection is. a reliable channel would invalidate this service altogether.
understanding ports
generally speaking, a computer has a single physical connection to the network. all data destined for

a particular computer arrives through that connection. however, the data may be intended for different

applications running on the computer. so how does the computer know to which application to forward

the data? through the use of ports.
data transmitted over the lan is accompanied by addressing information that identifies the computer

and the port for which it is destined. the computer is identified by its 32-bit ip address, which ip

uses to deliver data to the right computer on the network. ports are identified by a 16-bit number,

which tcp and udp use to deliver the data to the right application.
in connection-based communication such as tcp, a server application binds a socket to a specific port

number. this has the effect of registering the server with the system to receive all data destined for

that port. a client can then rendezvous with the server at the server's port, as illustrated here:



definition: the tcp and udp protocols use ports to map incoming data to a particular process running

on a computer.
in datagram-based communication such as udp, the datagram packet contains the port number of its

destination and udp routes the packet to the appropriate application, as illustrated in this figure:


port numbers range from 0 to 65,535 because ports are represented by 16-bit numbers. the port numbers

ranging from 0 - 1023 are restricted; they are reserved for use by well-known services such as http

and ftp and other system services. the more common ports in use by some games today are listed here.

remember, these are default ports, and may not be the same on the server to which you are trying to

connect.
half life – udp – 6003,7002,27010,27015,27025
quake ii – udp – 27910
quake iii – udp – 27660
starcraft – udp – 6112
an example of how one game may use many ports, can be best seen in the case of unreal tournament. see

below
udp 7777 (default gameplay port)
udp 7778 (server query port)
udp 7779 - 7781 (udp 7779+ are allocated dynamically for each helper udplink objects)
udp 27900 (server query, if master server uplink is enabled.)
tcp 8080 (port 8080 is for ut server admin)
 
     
you must be logged in to post replies.
click here to login.
click here to become a member.
click here to search.