14.1 Protocols Flashcards
What is a protocol?
A protocol is a set of rules which govern how data is meant to be sent, received, transmitted, and interpreted.
What is a protocol suite?
A collection of protocols which act together
What is the physical/application layer of the TCP/IP Protocol Suite?
The physical layer is concerned with sending data through a physical medium from one device to another. Physical-layer protocols are typically low-level.
Physical/application-layer protocols may be subcategorised into:
Mechanical protocols
Electrical/Optical protocols
Functional protocols
Procedural protocols
Mechanical protocols
Protocols about the size and shape of the connector.
Electrical/Optical protocols
Protocols that determine which voltage levels represent the data values of 0 and 1.
Functional protocols
Protocols which determine what each pin of the connector is responsible for.
Procedural protocols
Protocols which define the sequence of actions that need to take place in order to send data.
For a given network, physical-layer protocols may determine:
Data rate Bit synchronisation Configuration Topology Mode
Data rate
The number of bits to expect in a given amount of time.
Bit synchronisation
A method of ensuring that the sender and receiver are at the same data rate.
Configuration
Whether the links between systems are point-to-point or multipoint connections.
Topology
How the end-systems in a network are connected to one another.
Mode
Whether the connections are simplex (one way), half-duplex (both ways, but not at the same time), or full-duplex (both ways simultaneously).
What is the Data-Link layer of the TCP/IP Protocol Suite?
The data-link layer is responsible for framing data so that it is ready to be transmitted in the physical layer. The data-link layer adds both a header and a trailer to the data coming from the network layer.
Frame header
The frame header consists of the physical addresses of the source and destination devices. These physical addresses are usually Media Access Control (MAC) addresses, which uniquely identify a Network Interface Card (NIC) that is used to connect a device to the network
Frame trailer
The frame trailer may contain an error control mechanism, such as parity checking.
What happens when data is being transmitted across the network?
frames are used to bring data from one system to the next. This is known as hop-by-hop forwarding.
hop-by-hop forwarding
When data is sent through many intermediate systems, each intermediate system receives a frame, removes the original frame header and trailer, frames the data with a new header and trailer for the next hop, and forwards it to the next system.
What are the four layers of the TCP?
Physical/Application layer
Data-Link layer
Network layer
Transport layer
What is the Network layer of the TCP/IP Protocol Suite?
The network layer is concerned with sending packets across many links in a network. Whereas the data-link layer transmits data from system to system, the network layer sends data from end to end.
What does the Network layer add in order to be able to send data from end to end?
Packet Header
What does the Packet Header consist of?
The source network address
The destination network address
The version of the network protocol being used.
Difference between network address and physical address?
Each network address identifies an end-system, whereas physical addresses uniquely identify every system connected to the network.
How does the network layer deliver packets on a big network?
packets are sent from end-system to end-system via a series of intermediate systems. Each intermediate system forwards the packet from one system to the next through hop-by-hop forwarding of frames, resulting in end-to-end delivery of the packet.
What is the Transport layer of the TCP/IP Protocol Suite?
The transport layer is in charge of process-to-process delivery: it makes sure the sender and receiver both know what to do with the packets being sent. It is also responsible for making sure that packets do not exceed their maximum allowable size.
What does the transoprt header consist of?
The sender port address
The receiver port address
The packet sequence number
Error control information
What do the port addresses tell us?
The port addresses tell the receiver what application was responsible for sending the data and what application should be used for receiving the data.
What is the sequence number?
The sequence number is used when a large message needs to be split into pieces. This will tell the receiver if all packets have been received, and what order to put the packets in to assemble the message.
What are transport layers responsible for?
Process addressing and multiplexing Segment handling Connection control Flow control Error control
Process addressing and multiplexing
Determining which process originated the message and which process should receive the message. (This is accomplished using the port addresses)
Segment handling
Assigning sequence numbers to packets so that the message can be reassembled at the other end.
Connection control
Sending control signals to establish a connection before sending data. (This applies if the protocol is connection-oriented)
Flow control
Ensuring that fast senders do not overwhelm slow receivers when data is sent between two different systems.
Error control
Detecting and correcting errors which occur during transmission.
What is the Application layer of the TCP/IP Protocol Suite?
The application layer is the interface between the user and the network. It determines what the message is.
Example of application layer
For instance, when using the application HTTP to access a website, the message is a GET request. This means that you want to GET data from the server. Thus, the message that is sent to the transport layer is GET www.example.net 1.0:
GET is the method.
www. example.net is the URL of the target.
1. 0 is the version number of the protocol being used.
Using the TCP/IP Protocol Suite
Suppose we wanted to access a website. To do so, we typically either key in the URL or click a bookmark in the browser. The application protocol, HTTP, then forms the message: GET www.example.net 1.0␍␊.
This message is then sent to the transport layer, where it will likely be handled by TCP. TCP will, if necessary, split up the message into packets, assign each packet a sequence number, then give the packets to the network-layer protocol. If the transport protocol being used is connection-oriented, the first packet is used to establish a connection before sending other packets.
In order for the network-layer protocol to send the message, it first needs to know the network address of the destination. To find this, it uses the Domain Name System (DNS) to find the address which corresponds with the URL www.example.net. Once it finds the address, it then attaches the packet header to the packets so that they end up at the correct destination.
The data-link layer sends these packets from system to system using hop-by-hop forwarding. The physical layer is where the data is actually sent.
At the server end, the first packet is received by the network-layer protocol, then forwarded to the transport layer. If a connection-oriented protocol is being used, the server will send an acknowledgement to establish the connection. Once the connection has been established, the remaining packets are sent.
The request is thus received and reassembled, so the server needs to respond to it. It sends the response to the client in much the same way the client sent the request to the server.
What is the BitTorrent Protocol?
The BitTorrent Protocol is a way of sharing files in a decentralised peer-to-peer model, as opposed to the traditional, more centralised, client and server model.
Differnce between client and server model and BitTorrent Protocol
Whereas the client and server model has clients downloading files from a central server, the BitTorrent protocol has a swarm of peers who provide regular uploads and downloads for each other. This has the advantage of preventing a single device from being overwhelmed, as all devices share with only a few others.
How to use BitTorrent protocol?
a peer loads a .torrent file into a BitTorrent client, which provides a connection to a tracker.
What is a tracker?
a device which keeps a list of peers connected to the tracker and keeps track of which peers have which chunks of what files. The tracker does not store files, it only keeps track of them. Periodically, peers will update the tracker so that they are not sent chunks that they already have.
What is a seed?
A peer that has all of the chunks of a desired file
What do seeds do?
Seeds distribute chunks of the file to peers that do not have all of the file. Once a peer obtains every chunk of the file, it becomes a new seed, and can then send more chunks to other peers. To ensure that the speed of downloads is high, rarer chunks are prioritised.
What is the main advantage of BitTorrent?
It scales well. If you have thousands of people trying to download a file from the same server, that server may become overwhelmed and crash, which slows down the speed of downloads; whereas with BitTorrent, a larger swarm can actually result in faster downloads.
Application layer protocols:
HyperText Transfer Protocol (HTTP)
File Transfer Protocol (FTP)
Mail protocols (SMTP & POP3)
HTTP
HTTP is a request-response protocol for transferring webpages across the internet. It is based on the client-server architecture. There are two main methods associated with HTTP: GET & POST.
GET is for retrieving data from a server.
POST is for putting data into a server’s database
FTP
FTP is a protocol for transferring files in a client-server architecture. An FTP server hosts files, and clients can upload, download, or remove files if they have permission.
SMPT
The Simple Mail Transfer Protocol (SMTP) is for sending mail to a mail server
POP3
Post Office Protocol version 3 (POP3) is for receiving mail from a mail server.
IMAP
nternet Message Access Protocol (IMAP), which is sometimes used in place of POP3, and serves roughly the same function.
However, it is common for mail to be sent and received using other protocols, such as HTTP. SMTP is still used for moving mail between mail servers.