WEEK 1 Networking Fundamentals .....

ยท

3 min read

What is Internet?

It is a global network of interconnected computers and devices that communicate using standardized protocols. It enables data exchange, online communication, and access to information from anywhere in the world. It involve the huge amount of optic fiber cables under the oceans which is owned by tier 1 companies likes AT&T, Verizon. This companies rent their cables to tier 2 companies like BSNL, Jio, Airtel. And thereafter we get this internet services into our devices.

๐ŸŒ Understanding OSI and TCP/IP Models, Common Protocols, and AWS EC2 Security Groups

๐Ÿ”น OSI & TCP/IP Models: An Overview

๐Ÿ“Œ OSI Model (Open Systems Interconnection)

The OSI model is a conceptual framework used to understand network interactions in seven layers:

  1. Physical Layer โšก - Deals with physical connections (cables, switches, etc.)

  2. Data Link Layer ๐Ÿ“ถ - Handles MAC addresses and error detection (e.g., Ethernet, Wi-Fi)

  3. Network Layer ๐ŸŒŽ - Manages IP addressing and routing (e.g., IPv4, IPv6)

  4. Transport Layer ๐Ÿšš - Ensures reliable data transfer (e.g., TCP, UDP)

  5. Session Layer ๐Ÿ”„ - Manages sessions between applications (e.g., RPC, NetBIOS)

  6. Presentation Layer ๐ŸŽจ - Formats and encrypts data (e.g., SSL, TLS)

  7. Application Layer ๐ŸŒ - Interface for end-users (e.g., HTTP, FTP, SMTP)

๐Ÿ“Œ TCP/IP Model

A simplified version of OSI, the TCP/IP model consists of four layers:

  1. Network Interface Layer โšก (Combines Physical & Data Link layers)

  2. Internet Layer ๐ŸŒ (Equivalent to OSI's Network layer)

  3. Transport Layer ๐Ÿš€ (Handles data transport, similar to OSI Transport layer)

  4. Application Layer ๐Ÿ“ฉ (Includes OSI's Application, Presentation, and Session layers)

๐ŸŒŽ Real-World Examples of Each Layer

OSI Model:

  • Application Layer (๐ŸŒ): Web browsing using HTTP/HTTPS

  • Transport Layer (๐Ÿš€): Sending an email using TCP

  • Network Layer (๐ŸŒ): Routing data via IP

  • Data Link Layer (๐Ÿ“ก): Wi-Fi communication

  • Physical Layer (โšก): Ethernet cables

TCP/IP Model:

  • Application Layer (๐Ÿ“จ): Using SMTP for sending emails

  • Transport Layer (๐Ÿ“ก): Streaming video via UDP

  • Internet Layer (๐ŸŒŽ): Web browsing using IP routing

๐Ÿ”‘ Commonly Used Protocols & Their Port Numbers

ProtocolDescriptionPort Number
HTTP ๐ŸŒWeb browsing80
HTTPS ๐Ÿ”’Secure web browsing443
FTP ๐Ÿ“‚File Transfer Protocol21
SSH ๐Ÿ”Secure shell access22
DNS ๐ŸŒDomain Name System53

๐Ÿ” AWS EC2 Security Groups: Securing Your Cloud Instances

๐Ÿ“Œ What are Security Groups?

Security Groups act as virtual firewalls for your AWS EC2 instances, controlling inbound and outbound traffic.

๐Ÿ“Œ Security Group Rules

  • Inbound Rules ๐Ÿ“ฅ: Define what traffic is allowed to enter the instance (e.g., Allow SSH on port 22)

  • Outbound Rules ๐Ÿ“ค: Specify allowed outgoing traffic (e.g., Allow HTTP requests to the internet)

๐Ÿ“Œ Importance of Security Groups

โœ… Enhanced Security ๐Ÿ”’ - Blocks unauthorized access โœ… Granular Control ๐ŸŽ›๏ธ - Configurable rules for different instances โœ… Default Deny ๐Ÿšซ - Restricts all traffic unless explicitly allowed

๐Ÿ“Œ Example Security Group Configuration

Rule TypeProtocolPort RangeSource
SSH ๐Ÿ”‘TCP22Your IP (e.g., 192.168.1.1/32)
HTTP ๐ŸŒTCP80Anywhere (0.0.0.0/0)
HTTPS ๐Ÿ”’TCP443Anywhere (0.0.0.0/0)

๐ŸŽฏ Best Practices for AWS Security Groups

  • Use Least Privilege ๐Ÿšซ - Only allow necessary ports

  • Restrict SSH Access ๐Ÿ”‘ - Limit to known IPs

  • Enable Logging & Monitoring ๐Ÿ“Š - Track access logs

๐Ÿ”น By understanding the OSI and TCP/IP models, commonly used network protocols, and AWS EC2 security best practices, you can build and secure robust network architectures! ๐Ÿš€

ย