netCD.gif

networking curriculum
support CD for senior
secondary studies

networking > protocols
Telnet
terminal emulation program for remote login to network hosts.
SMTP
simple mail transfer protocol
POP3
post office protocol version three
FTP
file transfer protocol
HTTP
hyper text transfer protocol
NNTP
network news transfer protocol
TCP/IP - the Internet Protocol
Transport control protocol / internet protocol

Client server principles and sockets

Packets and transport protocols

A data stream transmitted on a network is done so in packets. The logic of packets involves breaking the data stream into identifiable packets. Not all the network bandwidth will be used by one host at any one time (the hosts will need time to set up and send each packet) and there will be times when interleaving of packets from different hosts will give users a better impression of the responsiveness of the network. The bandwidth will also be shared more efficiently and greater use of the maximum bandwidth is more likely. By providing an address for the source and the destination hosts, the total bandwidth of the network can also be utilised where alternative pathways exist.

For example some packets may be routed through a slower section of the network that might otherwise be under utilised. Even though it is slower, and arrives after other packets, the network protocol inserts the data into the correct place in the overall file. Packets also mean error correcting software only has to fix small parts by resending incorrect packets, and not begin the whole file over again. Finally the concept of packets means a small standard building block that can have other data structures built within it to create the many different protocols seen today on the Internet.

Each of the OSI layers deal with blocks of data, called or datagrams or packets. The protocol used adds extra information to the original data for each layer it passes through. These headers are then used by the receiving system to unravel the packet back to the original, entire data.

The headers are put on like layers of paint so that the original chunk of data is given a different appearance in the different layers and then these are stripped back off as the data returns through the OSI layers

The length of a packet is not set and can vary. If the data is likely to have errors then small packets make the sections with errors easier to correct and take less time. For short sequences of data, short packets will mean there will be less space wasted as a multiple of packets will probably end close to the end of the data. Using long packets in this situation with short data can cause excessive nearly empty packets which waste bandwidth. However for very long files, short packets can cause a significant increase in the overall percentage of bandwidth used in the repetition of the packet information.

The traffic with Name Servers (DNS) is through another type of network standard called UDP/IP, which simply sends requests for data and does not request re-transmission if the data is faulty (UDP is connectionless and uses datagrams). The host requesting it has to retry after a period of time if the request has not been responded to. The request for a URL to IP lookup is such a small amount of data, it is not considered necessary to make the request in TCP as the size of the packet and the overheads for connections, error checking and re-transmission requests are far in excess of the size of the original packets. In other words the network could get bogged down establishing error correcting links with much more overheads than the DNS data deserves. Another application of the UDP protocol is DHCP.

Obviously the reverse is true when downloading a 10 mega-byte file and one or two packets are corrupted or "gone missing", which is when the TCP/IP algorithms for example tries again for the missing packets and only requests the required packets and not the whole file. TCP/IP provides end-to-end reliability, sequencing, and flow control.

Now how can packets "go missing"? Each packet has a set time to stay alive on the network. When this is reached, any routing device that detects its life has run out, discards the packet. This is necessary to stop packets flying around forever in segments of networks where there is no hope of them being delivered. Consequently if a packet hits a very long alternative path, it may not make it through in time. The receiving host would declare it missing and request the sending host to re-transmit.

Finally, different segments of a network connection may break up the packets into smaller packets if that will optimise the use of any particular network segment. These sub-packets are then sent and reassembled into the original packet at the other end (or even further divided into smaller sub-sub-packets!). This may optimise maximum bandwidth usage and responsiveness, but if one of the sub-packets or fragments goes missing then the whole packet from the origin must be requested as only it can recreate the full packet again

Application

Port Number

Transport Protocol

Telnet

23

TCP

FTP (File Transfer Protocol)

20, 21

TCP

SMTP (Simple Mail transfer Protocol)

POP3 (Post Office Protocol ver3)

25 (Client Send)

110 (Client Receive)

TCP

HTTP (Hyper Text Transfer Protocol)

80

TCP/UDP

NNTP (Network News Transfer Protocol)

119

TCP

NFS (Network Filling System)

Negotiated

UDP

DNS (Domain Names System)

53

UDP

Server Processes have well defined port numbers lower than 1000 as shown above. The user is assigned dynamic numbers above 1000.