Computer Network basically allows computers to exchange data. Computer networks support an enormous number of applications and services such as: accessing the World Wide Web, digital video, digital audio, shared use of application and storage servers, printers, fax machines, email, and instant messaging applications.
In most cases, applications-specific communication is layered using the Open Systems Interconnection model (OSI model) which is a conceptual model that characterizes and standardizes the communication functions of telecommunication.
The layer’s general approach is that each layer serves the layer above it and is served by the layer below. The original version of the model defined seven layers:
- Application – the host network application
- Presentation– interpret the meaning of the data: formats, encryption
- Session – manage the application sessions
- Transport – Reliable transmission of segments between hosts
- Network – forwarding and routing datagrams between network nodes (translates logical network address into physical machine address)
- Link – transfer frames between the network nodes
- Physical – transfer bits on the physical link
The Internet protocol stack implements the presentation and the session layers in the application layer meaning that we have a more simple 5 layers’ model.
The basic example of a network connection between two hosts is as follows (numbers are correlated with the graph below):
- the source host uses a network application and sends a message
- to the source host encapsulate the message into segments containing a destination host IP address.
- the source host encapsulates the segments into packets containing the source host and the router Mac addresses.
- the source host sends the packets to the router frame by frame, bit by bit over top wire connection.
- The router receives the bits and frames and read from the segment the destination IP address and find it’s mac in the forwarding table.
- The router encapsulates the segment back a packet with the router and the destination host mac addresses.
- The router sends to the destination host the packets frame by frame, bit by bit over the relevant physical wire connected to the destination host.
- The destination host receives the bits and frames and reads the message from the segment.
OSI layers protocols
1. Application Layer
- Client-Server – the server provides service for many clients via internet connection (websites)
- Peer to Peer (P2P) – the application distributes tasks between the peers (file sharing)
- HTTP (Hypertext Transfer Protocol) – a client (browser) requests a webpage from a server (webserver) and the server response to the request with an HTML format webpage. HTTP request types are: GET request for data from the server, POST when the client sends data to the web-server.
- FTP (File Transfer Protocol) – a client requests a file from the server
- DNS (Domain Name System) – a system that translates names into IP address, a browser gets from the user a website name, then it uses the DNS protocol to translate the domain name to an IP address in order to send an HTTP request.
- SMTP (Simple Mail Transfer Protocol) – Email is submitted by a mail client (mail user agent, MUA) to a mail server (mail submission agent, MSA) The MSA delivers the mail to its mail transfer agent (mail transfer agent, MTA).
- POP3 (Post Office Protocol) – supports download-and-delete requirements for access to remote mailboxes, e-mail clients using POP generally connect, retrieve all messages, store them on the user’s PC as new messages, delete them from the server, and then disconnect.
- DHCP (Dynamic Host Configuration Protocol) – a standardized network protocol used on Internet Protocol (IP) networks. The DHCP protocol is controlled by a DHCP server that dynamically distributes network configuration parameters, such as IP addresses, for interfaces and services.
2-4. Transport Layer
- TCP (Transmission Control Protocol) – provides reliable, ordered, and error-checked delivery of a stream of octets between applications running on hosts communicating over an IP network
- UDP (User Datagram Protocol) – computer applications can send messages, in this case, referred to as datagrams, to other hosts on an Internet Protocol(IP) network. Prior communications are not required to set up transmission channels or data paths.
5. Network Layer
- IP address – is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. Type of IPs:
- IPv4 – address consists of 32 bits
- IPv6 – the most recent version of the Internet Protocol(IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet
- Private addresses – IP addresses that are used in the private network of computers.
- NAT (Network address translation) – a method of remapping one IP address space into another by modifying network address information in Internet Protocol (IP) datagram packet headers while they are transit across a traffic routing device.
6. Data Link Layer
- Mac (media access control) – a unique identifier assigned to network interfaces for communications at the data link layer of a network segment.
- ARP (Address Resolution Protocol) – used for mapping a network address (IP address) to a physical address (MAC address).