Advanced Networking Notes with Flowcharts
1. OSI Model Explained
Each layer in OSI has its function. Think of it like a ladder:
1. Physical: Sends bits over cables (e.g., Ethernet).
2. Data Link: Adds MAC address, frames the data.
3. Network: Adds IP address, finds route.
4. Transport: Ensures data delivery (TCP/UDP).
5. Session: Starts and ends the session.
6. Presentation: Encryption, compression.
7. Application: Interface with software (HTTP, FTP).
[FLOWCHART]
Data -> Application -> Presentation -> Session -> Transport -> Network -> Data Link -> Physical -> Cable
Advanced Networking Notes with Flowcharts
2. TCP/IP Stack
This is the real-world version of OSI:
- Application: Email, web, DNS
- Transport: TCP/UDP
- Internet: IP, ICMP
- Network Access: Ethernet, Wi-Fi
[FLOWCHART]
App > Transport (TCP) > IP > MAC > Cable
Advanced Networking Notes with Flowcharts
3. IP Addressing and Subnetting
- IPv4: 192.168.1.1
- Subnetting divides a network into smaller networks.
- CIDR notation: /24 = 255.255.255.0 = 256 IPs
Subnetting Flow:
1. Decide number of hosts needed.
2. Use formula: 2^n - 2 >= required hosts.
3. Assign subnet mask accordingly.
Advanced Networking Notes with Flowcharts
4. Routing Protocols Flow
- RIP: Uses hop count, max 15 hops.
- OSPF: Divides network into areas, uses Dijkstra's algorithm.
- BGP: Path vector protocol used for internet-level routing.
[FLOWCHART]
RIP <--- small networks
OSPF <--- medium networks
BGP <--- large ISP/internet
Advanced Networking Notes with Flowcharts
5. VLANs & Switching
- VLAN: Virtual LAN, logical group of devices.
- Switch assigns VLAN using port/tagging.
- Trunk ports carry multiple VLANs.
[FLOWCHART]
Host --(VLAN10)-- Switch --(Trunk)-- Switch --(VLAN10)-- Host2
Advanced Networking Notes with Flowcharts
6. Firewall Rules
Firewalls allow or deny traffic:
- Based on IP, Port, Protocol
- Example Rule:
Allow: 192.168.1.1 -> Any : Port 80 (HTTP)
[FLOWCHART]
INCOMING TRAFFIC
Check Source IP -> Check Port -> Allow/Deny
Advanced Networking Notes with Flowcharts
7. Troubleshooting Cheat Sheet
1. Check physical (cable, link light)
2. Use `ip link`, `ping`, `traceroute`
3. Verify DNS with `nslookup`
4. Use `netstat` or `ss` to check ports
5. Check firewall settings