Internet Protocols
A computer network protocol definies a format and order of messages sent and recieved among network entities, and actions taken on message transmission and reciept.
Transmission Control Protocol (TCP)

TCP is one of the underlying protocols of the Internet, it is an end-to-end transport protocol with responsibility for data reliability, congestion control, flow control and sequeneced delivery.
TCP connections are established by a three-way handshake where the server is passive (listens for connections) and the client is active (it initiates connection).
- Client sends a Synchronize (SYN) message to the server.
- Server responds with a Sychronize-Acknowledge (SYN-ACK) message to the client.
- Client responds with an Acknowledge (ACK) message to the server.
TCP connections are terminated by (normally) a four-way handshake, each end-point sends a Finished (FIN) message which is Acknowledged (ACK) by the other end point (thus a normal termination is a pair of FIN, ACK messages).
TCP provides both Flow Control (prevents senders overrunning the capacity of recievers) and Congestion Control (prevents too much data being injected into the network causing switches to become overloaded).
User Datagram Protocol (UDP)

UDP provides a "best effort" service, where segments may be lost or delviered out of order to the application. It is also connectionless, it does not have handshake and each segment may be handled independently.This means there is no congestion control in UDP, and the segment header is much smaller than a TCP packet.
This makes UDP suitable for steaming applications where the system is loss tolerant and rate sensitive. It is also used in DNS and SNMP.
IP Protocol (IP)
The IP Protocol is a routing protocol, which specifies an IP address (a 32bit identified) for every host in a network. Conceptually an IP address is made up of a Network Address and a Host Address, a Network Mask specifies how many bits of an address are for the Network ID and how many are for the Host ID.
Classes are an outdated model for organising network structures, which are now obsolete. They divded address structures up such that:
- Class A Networks have mask 255.0.0.0 and allow addresses in the range 1.0.0.0 - 126.255.255.255
- Class B Networks have mask 255.255.0.0 and allow addresses in the range 128.0.0.0 - 191.255.255.255
- Class C Networks have mask 255.255.255.0 and allow addresses in the range 192.0.0.0 - 223.255.255.255
- Class D Networks are multicast addresses (224.0.0.0 - 239.255.255.255)
The IANA has reserved certain IP blocks for use in private networks.