Network Protocols (Set of Rules)
What?
- Networking protocols are like the rules of a game that ensure all participants play correctly and understand each other, crucial for the smooth operation of internet communications and web applications.
Why?
- Standardization: Makes sure different devices and software can communicate.
- Efficiency: Optimizes the use of network resources.
- Security: Protects data from unauthorized access and tampering.
- Reliability: Ensures data is accurately and consistently delivered.
- Scalability: Facilitates network growth and management.
How?
OSI Layer 7: Application Layer
-
HTTP/HTTPS (HyperText Transfer Protocol/Secure)
- What? : HTTP is for web data transfer, HTTPS adds encryption.
- Why? : Browsing websites, accessing web services securely.
- How? :
curl https://www.google.com
for HTTPS interaction.
-
DNS (Domain Name System)
- What?: Translates domain names to IP addresses.
- Usage: Resolving domain names to access websites.
- How to check? :
nslookup www.google.com
for DNS resolution.
-
FTP (File Transfer Protocol)
- How?: Transfers files between client and server.
- Why?: Uploading/downloading files to/from servers.
- How to check? :
ftp www.google.com
for FTP access.
OSI Layer 6: Presentation Layer
- SSL/TLS (Secure Sockets Layer/Transport Layer Security)
- How?: Provides encryption, data integrity, and authentication for secure communication.
- Why?: Ensures secure transmission of sensitive data over the internet.
- How to check?: Use
openssl s_client -connect www.google.com:443
to inspect SSL/TLS connection.
OSI Layer 5: Session Layer
- There is no Obvious Protcol here , Operating System maintains this layer.
- Session Establishment:
- How?: Handled by application layer protocols or the operating system's networking stack.
- Why?: Initiates communication sessions between applications.
- Data Synchronization:
- How?: Managed within application layer protocols (e.g., TCP) or the OS networking stack through sequencing and flow control.
- Why?: Ensures orderly and reliable data transmission.
- Session Management:
- How?: Application logic or the OS manages session timeouts, reconnections, and state.
- Why?: Maintains session integrity and continuity.
- Session Termination:
- How?: Initiated by applications or the OS by closing connections and releasing resources.
- Why?: Ends communication sessions when no longer needed.
OSI Layer 4: Transport Layer
-
TCP (Transmission Control Protocol)
- How? : Ensures reliable, ordered delivery of data.
- Why? : Transmission of web data.
- How to check? :
netstat | grep tcp
(t in atn - for TCP connectivity check).
-
UDP (User Datagram Protocol)
- How?: Provides faster but less reliable data transmission.
- Why? : Real-time applications like streaming.
- How to check? :
netstat | grep udp
(u in aun - for UDP connectivity check).
OSI Layer 3: Network Layer
-
IP (Internet Protocol)
- How?: Routes packets across networks.
- Why?: Identifying and addressing devices.
- How to check? :
traceroute www.google.com
for packet path analysis.
-
ICMP (Internet Control Message Protocol)
- How?: Handles network error messages.
- Why? : Network troubleshooting.
- How to check? :
ping www.google.com
for reachability check.
OSI Layer 2: Data Link Layer
- DHCP (Dynamic Host Configuration Protocol)
- How? : Dynamically assigns IP addresses to devices.
- Why? : Simplifies network setup and management.
- How to check? : No direct commands.
OSI Layer 1: Physical Layer
- Ethernet
- What? : Physical connection standard.
- Why? : Wired network connections.
- How to check? : No direct commands.