14 Communication And Internet Technologies

发布于 2024-10-23  287 次阅读


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 / code

It 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

  1. Identifies the target network and host.
  2. Transmits packets to the Link or Physical Layer.
  3. Routes packets through the best path.
  4. Adds source and destination IP addresses to the packets.
  5. Combines IP address and port number to create a socket. [5]

Transport Layer

FUNCTION

  1. Breaks data into smaller, manageable packets.
  2. Add headers and sequences to the packets.
  3. Sends packets to the Network Layer and receives data from the Application Layer.
  4. Controls the flow of packets.
  5. Manages packet loss/corruption and ensures error-free delivery. [5]

Application Layer

FUNCTION

  1. Provides the interface for communication between user applications and network services.
  2. Supports high-level protocols like HTTP, SMTP, and FTP.
  3. Encodes and decodes data for applications.
  4. Manages application-specific errors.
  5. 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?

  1. BitTorrent software is installed on friends’ and family’s computers.
  2. The file to be shared is split into small pieces.
  3. The torrent file (a small file with information about the main file) is shared.
  4. A user joins the network (called a swarm) by loading the torrent file into their BitTorrent software.
  5. The user’s computer starts downloading pieces of the file from other swarm members.
  6. Rare pieces (those that fewer people have) are downloaded first to ensure everyone has the whole file.
  7. Once a computer has a piece (or the whole file), it can upload to others in the swarm.
  8. All computers in the swarm both download and upload file pieces.
  9. 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

  1. Dedicated circuit/channel/(physical) path
  2. connection established before/at the start of the communication
  3. Which lasts for the duration of the connection // circuit released at the end of the communication
  4. 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

  1. Data is divided into packets with necessary information (e.g., headers) added.
  2. Packets are sent independently of each other.
  3. Each packet can take a different route through the network.
  4. Packets are reassembled at the destination in the correct order.
  5. 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
N/A

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.


You're never ready, you go when you're ready enough.
最后更新于 2024-10-23