Understand OSI & TCP/IP Models π§©
The OSI (Open Systems Interconnection) and TCP/IP (Transmission Control Protocol/Internet Protocol) models are frameworks used to understand how data flows across networks.
OSI Model (7 Layers) π
Application Layer π₯οΈ
Purpose: Provides network services directly to applications.
Example: HTTP/HTTPS (used for web browsing), FTP (file transfer), SMTP (email).
Presentation Layer π¨
Purpose: Translates data into a format the application can understand (e.g., encryption, compression).
Example: SSL/TLS (encryption for HTTPS).
Session Layer π€
Purpose: Manages connections between devices.
Example: RPC (Remote Procedure Call).
Transport Layer π
Purpose: Ensures reliable data transfer between devices.
Example: TCP (reliable, connection-oriented), UDP (fast, connectionless).
Network Layer π
Purpose: Handles routing and forwarding of data packets.
Example: IP (Internet Protocol), ICMP (used by
ping
).
Data Link Layer π
Purpose: Manages data transfer between devices on the same network.
Example: Ethernet, MAC addresses.
Physical Layer β‘
Purpose: Transmits raw bits over a physical medium.
Example: Cables, switches, and hubs.
TCP/IP Model (4 Layers) π¦
Application Layer π₯οΈ
Combines OSIβs Application, Presentation, and Session layers.
Example: HTTP, DNS, SSH.
Transport Layer π
Same as OSIβs Transport Layer.
Example: TCP, UDP.
Internet Layer π
Same as OSIβs Network Layer.
Example: IP, ICMP.
Network Access Layer π
Combines OSIβs Data Link and Physical layers.
Example: Ethernet, Wi-Fi.
Protocols and Ports for DevOps π
In DevOps, understanding protocols and ports is crucial for configuring servers, deploying applications, and ensuring secure communication. we are using ports like Http 80,ssh 22, https 443, SMTP 25 in devops
AWS EC2 and Security Groups βοΈ
AWS EC2 (Elastic Compute Cloud) is a popular service for launching virtual servers. Security Groups act as virtual firewalls to control inbound and outbound traffic to your EC2 instances
Security groups in AWS act like firewalls for EC2. You can set rules for inbound and outbound traffic on any ports you choose.
Hands-On with Networking Commands π»
Hereβs a cheat sheet for essential networking commands every DevOps engineer should know:
Command | Purpose | Example | |
ping | Check connectivity to a host. | ping google.com | |
traceroute /tracert | Trace the route packets take to a host. | traceroute google.com | |
netstat | Display network statistics and connections. | `netstat -an | grep LISTEN` |
curl | Make HTTP requests from the command line. | curl -I https://google.com | |
dig /nslookup | Perform DNS lookups. | dig google.com |
Conclusion π―
Understanding the OSI & TCP/IP models, mastering protocols and ports, configuring AWS EC2 Security Groups, and using networking commands are essential skills for anyone in DevOps or cloud engineering