Please enable JavaScript.
Coggle requires JavaScript to display documents.
Networks: Internet Communications (TCP/IP protocol stack (TCP/IP uses four…
Networks: Internet Communications
Circuit Switching
Circuit switching involves creating a communication connection between two endpoints for the durations of a phone call or transfer of data.
This does not work for the billions of interconnected parts of the Internet.
-
Packet switching
was developed to allow a communications channel to be shared so that when one communication was temporarily not using it another could.
Data Packets
When sending across a network, data is broken into chunks (units) called
data packets
and assembled again at the receiving end.
-
This increases network efficiency and reliability
Chunking Data
Consider that a 10GB video file needs to be transformed across a network.
If each packet can send 1,500 bytes of data.
-
10,000,000,000 bytes to send would require...
-
10,000,000,000/ 1,500
-
6,666,667 packets
Time of travel
A packet of data from London to Sydney, Australia might take 40ms to reach its destination.
In comparison a packet from London to France might only take 5ms.
-
This is known as latency
Packet Switching
Packets are often sent across networks that have multiple connections with multiple routes through to a destination.
-
These networks are also often shared
A visualisation
Each packet takes the fastest available route.
-
Once received, packets are reordered by the receiving node:
Routing
Routers forward data packets from one network to another.
-
Each router stores data about the available routes to the destination node.
-
Looks up the destination IP address in its routing table to find the best router to forward the packet to.
-
Each transfer between routers is known as a
hop
.
-
Routers continue to forward the packet until it reaches its destination.
Building a packet
At its core, a data packet is a segmented of data that needs to be sent, often referred to as the
payload
.
-
This part of the packet will often vary in size from 500 to 1,500 bytes.
-
Packets also include additional information called
headers
and
trailers
.
Packet size
Packets are deliberately kept small to ensure that individual packets do not take excessive time to transfer preventing other packets from moving.
-
However, they should not be too small as the additional data added makes data transfer inefficient as unnecessary headers and trailers would be required each time.
-
500-1,500 bytes is an ideal compromise
Packet Header
The header contains the recipient's address so that it can be directed appropriately across the network.
-
The address of the sender is also included so that replies can be sent appropriately.
-
The packet number and overall number of packets in the transmission is attached to assist in reassembling the data.
-
The Time To Live (TTL) or hop limit is also included.
Packet Trailer
Similarly, at the end of the packet a
trailer
is added.
-
This contains error checking components that verify the data received in the payload has not been corrupted on transfer.
-
Techniques such as checksums or Cyclical Redundancy Checks (CRCs) are used to check the data by the receiving host.
-
The same checksum is recalculated at the destination end.
-
If they do not match, the data has become corrupted and its refused and a new copy is requested to be sent again.
What is a protocol?
A protocol is a set of rules, or a formal description, of the format of a digital transmission.
It will cover, for example, the size of the packets. the contents and format of the header, the error detection and correction procedure.
Gateways
A gateway is required where data is travelling from one network to another that use different protocols.
-
Networks using different transmission media can require this
-
Header data are removed and reapplied using the correct format of the new network.
A router and gateway can often be combined into one integrated device.
The importance of protocols and standards
A protocol defines a set of rules for data communication.
These must be standard across all devices, in all networks in order for communication to work.
-
TCP/IP has become the global standard suite of networking protocols.
-
These operate in a stack consisting of four layers.
TCP/IP protocol stack
TCP/IP uses four connected layers to allow network communication to take place.
Each layer wraps the packets with its own header data:
-
Application layer
-
Transport layer
-
Network layer
-
Link layer
Application layer
Used to provide services for applications that want to communicate across a network, often the Internet.
-
Uses high-level protocols that set an agreed standard between the communicating end-points.
-
For example, SMTP (for email), FTP (for file transfer) and HTTP (for web browsing).
-
Does not actually determine how the data is transmitted, rather specifies the rules of what should be sent.
Sending data
A web page is requested by a client computer.
-
As part of the web page, the following .png web image is to be requested from a web server by the client browser using the HTTP protocol:
Transport layer
Uses the Transmission Control Protocol (TCP) to establish an end-to-end connection with the recipient computer.
-
Splits data into packets and numbers them sequentially.
-
Adds port number to be used based on HTTP protocol.
-
At the receiving end this layer confirms that packets have been received and requests any missing packets be resent.
Network layer
Uses the Internet Protocol (IP) to address packets with the source and destination IP addresses.
-
A router forwards each packet towards an endpoint called a socket, defined by the combination of IP address and port number: 42.205.110.140:80
-
Each router uses a routing table to instruct the next hop.
Link layer
The link layer operates across a physical connection.
-
Adds the MAC address of the physical NIC that packets should be sent to based on the destination IP address.
-
MAC addresses change with each hop
Receiving data
At the destination, the message is passed back up through the layers.
-
The Link Layer removes the MAC address from each packet and passes it to the Network Layer.
-
The Network Layer removes the IP address from each packet and passes it to the Transport Layer.
-
The Transport Layer removes the port number from each packet, reassembles the packets in the correct order and passes them to the Application Layer.
-
The Application Layer presents the image data for the user in a browser.
The TCP/IP stack is a set of rules used in turn, to format a message so it can be sent over a network.
-
Each layer provides a specific function within the transmission of the message.
Media Access Control (MAC)
A MAC address uniquely identifies a physical device with a Network Interface Card (NIC)
4B:24:A2:73:0E:F1
-
This may be the destination computer, or a router in transit.
-
Packets move up and down the lower layers of the stack as they hop across routers, changing their source and destination MAC addresses as they go.
Port numbers
A port is used to alert a specific application to deal with data sent to a computer.
-
These are used by protocols to specify what data is being sent.
Common port numbers
Several common application level protocols use standard ports:
Transferring files with FTP
File Transfer Protocol
is an application level protocol used to move files across a network.
-
FTP uses the client-server model with separate data and control channels operating on ports 20 and 21.
Usernames and passwords are frequently used to protect access to files and to identify users.
-
Access can also be provided anonymously where any user can access the FTP site.
Sending and receiving email
Mail servers are dedicated computers that are responsible for storing email, providing access to clients and providing services to send emails
They use three protocols:
-
SMTP: Used to send emails and forward them between mail servers to their destination
-
POP3: Downloads email stored on a remote server to a local client (removed after download)
-
IMAP: Manages emails on a sever so multiple clients can access the same email account in synchronicity
Email protocol comparison
IMAP holds mail on the server so that multiple devices can access all mail.
POP downloads mail to a local device and removes it from the server.
-
What happens if you log in to access mail using a second device with POP or IMAP?