0% found this document useful (0 votes)
27 views4 pages

Core Networking Protocols Overview

Uploaded by

thestriker950
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views4 pages

Core Networking Protocols Overview

Uploaded by

thestriker950
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

-------------Networking-----------------------

OSI (Open Systems Interconnection) model-conceptual model developed by the


(ISO): describes how communications should occur in a computer network

LayerNo Layer Name Main Function


Example Protocols and Standards
Layer 7 Application layer Providing services and interfaces to application
HTTP, FTP, DNS, POP3, SMTP, IMAP
Layer 6 Presentation layer Data encoding, encryption, and compression
Unicode, MIME, JPEG, PNG, MPEG
Layer 5 Session layer Establishing, maintaining, and synchronising
sessions NFS, RPC
Layer 4 Transport layer End-to-end communication and data segmentation
UDP, TCP
Layer 3 Network layer Logical addressing and routing between networks
IP, ICMP, IPSec
Layer 2 Data link layer Reliable data transfer between adjacent nodes
Ethernet (802.3), WiFi (802.11)
Layer 1 Physical layer Physical data transmission media
Electrical, optical, and wireless signals

TCP/IP is a real-world networking model by U.S. Department of Defense.


Designed to keep working even if parts of the network fail.
Uses dynamic routing protocols.
Has 4 layers (sometimes shown as 5).
Application Layer
Transport Layer
Internet Layer
Link Layer

[Link] = network address (0)


[Link] = broadcast address (255)
[Link] = subnet mask ([Link]/24)
Private IP (RFC 1918): by NAT to public IP
[Link] - [Link] (10/8)
[Link] - [Link] (172.16/12)
[Link] - [Link] (192.168/16)

TCP-Transmission control protocol- ConnectionOriented


UDP-User Datagram Protocol-Connectionless
Ports 1-65535 (Port 0 is reserved)
Encapsulation: Each layer adds its own header (sometimes trailer) to data.
Layer Flow (Send side):
Application → creates data
Transport → adds TCP/UDP header → segment/datagram
Internet → adds IP header → packet
Link → adds Ethernet/WiFi header/trailer → frame
Decapsulation: Receiving system reverses this process.

DHCP(is based on udp) follows 4 steps: Discover, Offer, Request, and Acknowledge
(DORA):
DHCP Discover: The client broadcasts a DHCPDISCOVER message seeking the local
DHCP server if one exists. (“Is there any DHCP server out there?”)
DHCP Offer: The server responds with a DHCPOFFER message with an IP address
available for the client to accept.(“Yes! I can give you an IP address. How
about [Link]?”)
DHCP Request: The client responds with a DHCPREQUEST message to indicate that it
has accepted the offered IP.( “Okay, I’ll take [Link].”)
DHCP Acknowledge: The server responds with a DHCPACK message to confirm that the
offered IP address is now assigned to this client.(“Confirmed. You can now use
[Link].”)

ARP (Address Resolution Protocol) maps an IP address to a MAC address.


ARP process:
ARP Request: “Who has IP x.x.x.x? Tell me.”
ARP Reply: “I have IP x.x.x.x. My MAC is xx:xx:xx:xx:xx:xx.”
ARP messages are sent directly over Ethernet, not via IP.
Broadcast MAC (ff:ff:ff:ff:ff:ff) is used in ARP Request.
Once the MAC is known, normal Ethernet communication begins.
ARP works within local network only; routers are needed for outside networks.
ARP is essential for IP-to-MAC resolution.

OSPF (Open Shortest Path First): Link-state protocol; routers share link info to
build a complete network map and find the best path.
EIGRP (Enhanced Interior Gateway Routing Protocol): Cisco proprietary; combines
metrics like bandwidth and delay for efficient route selection.
BGP (Border Gateway Protocol): Path-vector protocol; used between different
networks (e.g., ISPs) to route data across the Internet.
RIP (Routing Information Protocol): Distance-vector protocol; uses hop count to
determine the best route; best for small networks.

NAT -> one public IP address to provide Internet access to many private IP
addresses.

DNS (Domain Name System) converts domain names (like [Link]) into IP
addresses (like [Link]).
Layer 7 (Application Layer).
Uses UDP port 53 (default) and TCP port 53 (for large queries or fallback).
Record Purpose
A Maps domain to IPv4 address
AAAA Maps domain to IPv6 address
CNAME Aliases one domain name to another
MX Points to the domain's mail server
nslookup [Link]=Returns both A (IPv4) and AAAA (IPv6) records.
DNS Packet Flow (4 total packets)
DNS Query → A record (IPv4)
DNS Response ← A record
DNS Query → AAAA record (IPv6)
DNS Response ← AAAA record

Telnet(port 23): network protocol and a command-line tool that lets you connect
to remote computers over a network
Connecting to remote servers and sending commands directly
Accessing services manually, like HTTP, SMTP, FTP, etc., by typing raw commands
Sends everything in plain text

SSH (Secure Shell) is a secure alternative to Telnet.(port 22)


Encryption: All data (commands, passwords) is encrypted.

WHOIS records of any registered domain name using one of the online services or
via the command-line tool
whois [Link]

HTTP: to retrieve webpages (uses port 80, HTTPS uses port 443.)
Common HTTP Methods
Method Description
GET Retrieve data from the server (e.g., view a web page).
POST Submit data (e.g., form submission).
PUT Create or update a resource on the server.
DELETE Delete a resource on the server.
telnet lets you manually talk to a web server.> telnet [Link] 80

File Transfer Protocol (FTP) is designed to transfer files (port 21):Used


specifically to transfer files between two computers over a network. (not to
download from the browser)
USER is used to input the username
PASS is used to enter the password
RETR (retrieve) is used to download a file from the FTP server to the client.
STOR (store) is used to upload a file from the client to the FTP server.
cmd: ftp [Link] ,enter user name, password, "type ascii", "gte [Link]"
Because both FTP and HTTP can transfer files, but:
HTTP is for general web use.
FTP is for dedicated file transfer operations.
FTP is insecure by default (no encryption).
Modern systems often use SFTP (Secure FTP over SSH) or HTTPS instead.

SMTP:SENDING EMAIL
Simple Mail Transfer Protocol (SMTP) defines how a mail client talks with a mail
server and how a mail server talks with another.(port 25)
HELO or EHLO initiates an SMTP session
MAIL FROM specifies the sender’s email address
RCPT TO specifies the recipient’s email address
DATA indicates that the client will begin sending the content of the email
message
. is sent on a line by itself to indicate the end of the email message

POP3: RECEIVING EMAIL


Post Office Protocol version 3 (POP3) is designed to allow the client to
communicate with a mail server and retrieve email messages.(port 110)
USER <username> identifies the user
PASS <password> provides the user’s password
STAT requests the number of messages and total size
LIST lists all messages and their sizes
RETR <message_number> retrieves the specified message
DELE <message_number> marks a message for deletion
QUIT ends the POP3 session applying changes, such as deletions

IMAP allows synchronizing read, moved, and deleted messages.(port 143)


Unlike POP3, which tends to minimize server storage as email is downloaded and
deleted from the remote server, IMAP tends to use more storage as email is kept
on the server and synchronized across the email clients.
LOGIN <username> <password> authenticates the user
SELECT <mailbox> selects the mailbox folder to work with
FETCH <mail_number> <data_item_name> Example fetch 3 body[] to fetch message
number 3, header and body.
MOVE <sequence_set> <mailbox> moves the specified messages to another mailbox
COPY <sequence_set> <data_item_name> copies the specified messages to another
mailbox
LOGOUT logs out

SMTP = Sending emails


POP3 = Download-only (outdated for most users)
IMAP = Syncing across devices (used today)
Gmail uses SMTP + IMAP under the hood for most users.

SSL/TLS are security protocols used for encrypting data over networks.
TLS replaced SSL; the latest version is TLS 1.3.
TLS ensures:
Confidentiality (no one can read your data)
Integrity (no one can tamper with it)
Authentication (you know who you're talking to)
TLS is used in HTTPS, email (SMTPS, IMAPS, POP3S), and secure DNS.
Websites need a TLS certificate issued by a Certificate Authority (CA).
Browsers check if the TLS certificate is valid and trusted.
Without TLS, the internet would be unsafe for banking, messaging, shopping, etc.

HTTP (Hypertext Transfer Protocol)


Application layer protocol used by web browsers to communicate with web servers.
Uses TCP port 80 by default.
All data is sent in plain text → anyone with access to the network can intercept
it.
HTTPS (HTTP Secure)
HTTP over TLS (previously SSL).
Uses TCP port 443 by default.
Encrypts all HTTP data between browser and server using TLS.
HTTP:
[Link] resolves domain name (e.g., [Link] → [Link]).
[Link] TCP 3-way handshake with server (SYN, SYN-ACK, ACK).
[Link] sends HTTP request (e.g., GET / HTTP/1.1).
[Link] responds with HTTP response (e.g., web page).
[Link] session ends.
HTTPS:
[Link] domain name.
[Link] TCP handshake.
[Link] TLS session (via TLS handshake):
Exchange supported algorithms
Share certificate
Agree on a session key
[Link] HTTP communication begins (browser sends HTTP inside TLS).
[Link] session securely.

HTTPS = HTTP + TLS


IMAPS = IMAP + TLS
POP3S = POP3 + TLS
SMTPS = SMTP + TLS
DoT = DNS over TLS

SFTP vs FTPS – Key Differences


Feature SFTP FTPS
Stands for SSH File Transfer Protocol FTP Secure (FTP over SSL/TLS)
Protocol Based on SSH (port 22) Based on FTP + SSL/TLS (ports
990/21)
Port 22 21 (explicit) or 990 (implicit)
Encryption data & commands encrypted via SSH via SSL/TLS
Setup Easier (just SSH access) More complex (needs SSL/TLS
certificates)

A VPN (Virtual Private Network) is like a secure tunnel that connects your
device to another network over the Internet.
when we try to access an Internet service or web application, they will not see
our public IP address but the VPN server’s.

You might also like