updated: 2024-09-26 10:58
14.1 Protocol
Necessity Of Protocol
- All data is sent and received using the same rules
- Allows communications between devices operating on different platforms.
- The communication is independent of the software/hardware used. [3]
The protocols in a stack determine the interconnectivity rules for a layered network model such as the TCP/IP model.
TCP/IP Protocol Suite(Transmission control protocol/Internet protocol)
QUOTE
Layer of stack is implemented by: software/module / program / codeIt organizes how data packets are communicated and makes sure packets have the following information:
- Source - which computer the message came from
- Destination - where the message should go
- Packet sequence - the order the message data should be re-assembled
- Data - the data of the message
- Error check - the check to see that the message has been sent correctly
TCP Function
- Allows applications to exchange data
- Establishes and maintains a connection until the exchange of data is complete
- Determines how to break application data into packets
- Sends packets to and accepts packets from the network
- Reassemble packets into the correct order
- Retransmitting missing packets
IP Function
- routes the packets around the network
- adds to the IP header a source/destination address for each packet
- passes datagram to the network access layer (for transmission on the LAN)// passes datagram to the transport layer (on arrival at destination)
TCP/IP Protocol Stack
LAYER | PROTOCOL | FUNCTION | |
---|---|---|---|
1 | Link Network | Ethernet/WIFI | Handle how data physically sent |
2 | Network/Internet | Internet Protocol(IP) | Handles transmission of data /routing / IP addressing |
3 | Transport | TCP, UDP | Handles the forwarding of packets |
4 | Application | FTP, HTTP, SSH, TELENET, P2P | Handles access to services // manages data exchange // defines protocols used |
Link Layer
FUNCTION
- The Link layer in the TCP/IP protocol suite packages raw data into frames to be transmitted over the physical medium
- Mapping IP addresses to MAC addresses
- Moving traffic across local network segments
- Ensuring that the correct protocols are followed.
Network Layer
FUNCTION
- Identifies the target network and host.
- Transmits packets to the Link or Physical Layer.
- Routes packets through the best path.
- Adds source and destination IP addresses to the packets.
- Combines IP address and port number to create a socket. [5]
Transport Layer
FUNCTION
- Breaks data into smaller, manageable packets.
- Add headers and sequences to the packets.
- Sends packets to the Network Layer and receives data from the Application Layer.
- Controls the flow of packets.
- Manages packet loss/corruption and ensures error-free delivery. [5]
Application Layer
FUNCTION
- Provides the interface for communication between user applications and network services.
- Supports high-level protocols like HTTP, SMTP, and FTP.
- Encodes and decodes data for applications.
- Manages application-specific errors.
- Enables seamless data exchange between applications over the network.
Communication Protocol
Protocal | Description | Use |
---|---|---|
HTTP | transfer of web pages/hypertext | browsing websites |
SMTP | Protocol for sending emails | used by mail servers to forward email messages |
POP3/4, IMAP | mail is held for you by a remote server until you download it | To receive email |
FTP | To directly transfer data between two computers over a network | upload and download files over the Internet |
Ethernet | To send/receive data along a cable | for local area networks |
BitTorrent(P2P) | protocol for peer-to-peer file sharing | decentralized distribution of data |
Bit Torrent
Use of BitTorrent
File sharing
HOW IT WORK?
- BitTorrent software is installed on friends’ and family’s computers.
- The file to be shared is split into small pieces.
- The torrent file (a small file with information about the main file) is shared.
- A user joins the network (called a swarm) by loading the torrent file into their BitTorrent software.
- The user’s computer starts downloading pieces of the file from other swarm members.
- Rare pieces (those that fewer people have) are downloaded first to ensure everyone has the whole file.
- Once a computer has a piece (or the whole file), it can upload to others in the swarm.
- All computers in the swarm both download and upload file pieces.
- A tracker computer keeps track of all the computers in the swarm and shares their IP addresses so they can connect and share file pieces.
14.2 Circuit Switching And Packet Switching
Circuit Switching
[!quote] Definition
- Dedicated circuit/channel/(physical) path
- connection established before/at the start of the communication
- Which lasts for the duration of the connection // circuit released at the end of the communication
- all data is transmitted along the same route
:RiThumbUpFill: Benefits and Drawback
Benefits | Drawbacks |
---|---|
Whole of bandwidth is available | A dedicated connection makes it impossible to transmit other data even if the channel is free |
Dedicated communication channel increases quality | Not very flexible |
Data is transmitted with a fixed data rate | No alternative route in case of failure |
No waiting time at switches | Time required to establish the physical link can be too long |
Suitable for long continuous communication | Need to establish a dedicated path can have cost implications |
Fast method of data transfer | Dedicated channels require the whole bandwidth / bandwidth can't be shared |
Data arrives in the same order as it was sent | |
Data can’t get lost | |
Data all follows the same path / route | |
Better for real-time | |
Simple method of data transfer |
Packet Switching
DEFINITION
- Data is divided into packets with necessary information (e.g., headers) added.
- Packets are sent independently of each other.
- Each packet can take a different route through the network.
- Packets are reassembled at the destination in the correct order.
- Missing or corrupt packets can be resent.
:RiThumbUpFill: Benefits and Drawback
Benefits | Drawbacks |
---|---|
Accuracy – Ensures accurate delivery of the message | packets can be dropped/delayed |
Completeness – Missing packets can be easily detected and a re-send request sent so the message arrives complete | Requires complex protocols for delivery |
Resilience – if a network changes the router can detect this and send the data another way to ensure it arrives | Unsuitable for real time transmission applications |
Path also available to other users // Doesn’t use whole bandwidth // allows simultaneous use of the channel by multiple users |
Router In Packet Switching
How it works
The router examines the packet’s header and reads the destination IP address. It then accesses a routing table, which contains information about available hops, netmask, and the gateway used, along with the status of the routes. Based on this information, the router decides on the next hop or the best route and forwards the packet to its next destination.
How packet Switching Applied to the network
How it works
A large message is divided into smaller chunks of the same size called packets, each containing a header and a payload. The header includes the source IP address, destination IP address, and a sequence number. Each packet is dispatched independently and may take different routes to the destination. As a result, packets may arrive out of order, but they are reassembled into the original message at the destination. If any packets are missing or corrupted, a re-transmission request is sent.
Comments NOTHING