When communicating over networks, it is essential that some form ofprotocolis used by the sender and receiver of the data. Both parties need to agreethe protocol being used to ensure successful communication takes place. In Chapter 6, we discussed parity checking as a way of determining whetherdata was transmitted correctly. With this method, it was essential to agree the protocol: even or odd parity. Without agreeing this protocol, it would be impossible to use parity checking. Many different protocols exist since there are several activities taking place over the internet.
This is the four-layer structure for TCP/IP protocols:
Using layers breaks the process down into manageableself-containedmodules (this process is known asdecomposition), making it easier to develop and easier to makesoftware and hardware compatible.When sending data across the internet (network), the layers are used in the order layer 4 to layer 1; when receiving data across the internet (network), the layers are used in the order layer 1 to layer 4. Each of the layers is implemented using software.
The application layer contains all the programs that exchange data, such as webbrowsers or serversoftware; it sends files to the transportlayer. This layer allows applications to access the servicesused in other layers and also defines the protocols that any app uses to allow the exchange of data.
simple network management protocol; protocol used when exchangingnetworkmanagementinformation between networkmanagement and networkdevices (such as routers, servers and other network devices)
Messages are splitup into smallgroups of bits calledpackets(for example, a web page would be splitup into a number of packets before sending over the network).
A router is used to transmitpackets of data; routers contain connections to many other routers; when packets arrive at a router it decides where next to sendthem.
HTTPis probably the most importantapplicationlayerprotocol. Essentially, this protocol underpins the worldwideweb. It is used when, for example, fetching an HTMLdocument from a webserver (Figure 14.2).
This makes use of hyperlinks (rules for the transferring of data over the internet). HTTP is a client/server protocol: request messages are sent out to the web servers which then respond.
HTTP protocols define the format of the messages sent and received. The web browser (which is part of the application layer) initiates the web page request and also convertsHTML into a format which canbedisplayed on the user’sscreen or can be played through their media player.
Thefiletransferprotocol (FTP)is a network protocol used when transferringfiles from onecomputer/device to another via the internet or othernetworks. It is similar to HTTP and SMTP, but FTP’s only task is the applicationprotocol for the transfer of files over a network. Web browsers can be used to connect to an FTP address in a way similar to HTTP, for example, ftp://username@ftp.example.gov/video serverweb serveradverts server
-anonymous ftp– this allows a user to accessfileswithout the need to identifywho they are to the ftp server; for example, ‘331 Anonymous access allowed’ would be a message received to confirmanonymous access-ftp commands– a user is able to carry out actions that can changefiles stored on the ftp server; for example, delete, close, rename, cd (change directory on a remote machine), lcd (change directory on a local machine)-ftp server– this is where the files, which can be downloaded as required by a user, are stored.
A session would be started by typing in the ftphost_name (of remote system), followed by a userid and password. The user would then be able to use ftp commands to carry out a number of actions.
Simple mail transfer protocol (SMTP)is a text-based (and connection-based) protocol used when sending emails. It is sometimes referred to as apushprotocol(in other words, a client opens a connection to a server and keeps the connection activeallthetime; the client then uploads a new email to the server).Since SMTP is text-based only, it doesn’t handlebinaryfiles(a binary file is a file containing media/images as well as text and is regarded as being computer-readable only). If an email contains attachments made up of, for example, images, video, music then it is necessary to use themulti-purpose internet mail extension (MIME)protocol instead. A MIME header is used at the beginning of the transmission; clients use this header to select which media player is needed when the attachment is opened.
POP3/4 and IMAP (post office protocol and internet message access protocol)
Postoffice protocol (POP3/4)andinternetmessage access protocol (IMAP)are protocols used when receiving emails from the emailserver. These are known aspullprotocols(the clientperiodicallyconnects to a server; checks for and downloadsnewemails from the server – the connection is then closed; this process is repeated to ensure the client is updated). IMAP is a more a recentprotocol than POP3/4, but both have really been superseded by the increasing use of HTTPprotocols. However, SMTP is still used when transferringemails between email servers.
The main difference between POP3/4 and IMAP is synchronisation:
POP3/4
POP3/4 does notkeep the server and client in synchronisation; when emails are downloaded by the client, they are then deleted from the server which means it is not further updated.
IMAP keeps the server and client in synchronisation; only a copy of the email is downloaded with the original remaining on the server until the client manually deletes it.
The transport layer regulates the network connections; this is where data is brokenup into packets which are then sent to the internet/networklayer (IP protocol). The transport layer ensures that packets arriveinsequence, without errors, by swapping acknowledgements and retransmitting packets if they become lost or corrupted. The main protocols associated with the transport layer aretransmission control protocol (TCP), user datagram protocol (UDP) and SCTP. We will only consider TCP.
TCP is responsible for the safedelivery of a message by creatingsufficientpackets for transmission. It uses positiveacknowledgement with re-transmission (PAR) which means it automatically re-sends a data packet ifit has notreceived a positiveacknowledgement. TCP is also connection-orientated since it establishes an end-to-endconnection between two hostcomputers using handshakes. For this last reason, TCP is often referred to as ahost-to-hosttransmission protocol.
The termhosthas been used previously; this refers to a computer or device that can communicate with anothercomputer/device (host). Hosts can include clients and servers that send/receive data, provideservices or apps.
These are the steps taken when host computer 'X' communicates with another host 'Y' (this is an expansion of what happens during TCP involvement shown in the HTTP algorithm earlier on):
- Host 'X' will first of all send host 'Y' a segment (packet) which will include synchronisation sequence bits so that segments will be received in the correctorder.
- Host 'Y' will now respond by sending back its ownsegment (containing an acknowledgement together with its own synchronisation sequence bits).
- Host 'X' now sends out its own acknowledgement that the segment from 'Y' was received.
- Transmission of data between 'X' and 'Y' can now take place.
Internet/network layer and network/data-link layer
The internet layer identifies the intendednetwork and host. The common protocol is IP (internet protocol). The concept of IPv4 and IPv6 was covered in depth in Chapter 2.
The network/data-linklayeridentifies and movestrafficacross local segments, encapsulatesIPpackets into frames for transmission, maps IP addresses to MAC (physical) addresses and ensures correctprotocols are followed. The physical network layer specifies requirements of the hardware to be used for the network. The data-linklayer identifies networkprotocols in the packetheader (TCP/IP in the case here) and deliverspackets to the network.
Ethernet is a system that connects a number of computers or devices together to form a LAN. It uses protocols to control the movement of frames between computers or devices and to avoidsimultaneoustransmission by two or more devices. It is a local protocol and does not provide any means to communicate with external devices; this requires the use of IP which sits ontop of the Ethernet protocol.
If VLAN is used, the Ethernet data size increases from 1539bytes to around
this is the MACaddress of the destinationcomputer or device (it is possible to use the value FF:FF:FF:FF:FF:FF as the MAC address if the sender wishes to target every device (for example, to advertise services) or if they do not know the MAC address of the destination device)
if the frame length <= 1539 then the value here is the length of the ethernetframe; if the frame length > 1539 then the value here is the Ethernettype (IPv4 or IPv6 in our example)
Wireless LANs (standard IEEE 802.11 protocol) use a MACprotocol called carrier sense multiple access with collision avoidance (CSMA/CA) (not to be confused with CSMA/CD considered in Chapter 2, since this is a totally different concept).
CSMA/CA uses distributed control function (DCF) to ensure a WiFi device can onlytransmit when there is a freechannelavailable. Since all transmissions are acknowledged when using DCF, if a device does notreceive an acknowledgement it will assume a collision will occur and waits for a randomtimeinterval before trying again. This is an important protocol to ensure the security and integrity of data being sent over a wirelessnetwork (such as WLAN).
Bluetooth was considered in Chapter 2; it uses the standardIEEE 802.15 protocol for short-range data transmission/communication. There are numerous additional Bluetooth protocols due to the many applications that may use this wirelessconnectivity; this is outside the scope of this textbook.
Worldwideinteroperability for microwave access (WiMax) runs under IEEE 802.16 protocol. This connectivity was designed originally for wirelessMANs (WMAN). Fixed WiMax networks are based on the IEEE 802.16-2004 protocol, whereas mobile WiMax is based on IEEE 802.16-2005 protocol.
TheBitTorrentis a protocol which is based on the peer-to-peer networking concept (this was covered in Chapter 2). This allows for veryfastsharing of files between computers (known aspeers). While peer-to-peer networks only work well with very smallnumbers of computers, the concept of sharing files using BitTorrent can be used by thousands of users who connect together over the internet. Because user computers are sharingfiles directly with each other (rather than using a web server) they are sharing files in a way similar to that used in a peer-to-peer network; the maindifference is that the BitTorrent protocol allows many computers (acting as peers) to share files.
Suppose computer 'A' wishes to share a file with a number of other interested peers. How can we use the BitTorrent protocol to allow this file sharing?
1:
Initially, to share a file, the peer (computer ‘A’) creates a smallfile called a torrent (for example, MyVideoFile.torrent). The torrent contains meta data about the file about to be shared.