๐Ÿ“˜ Networking Summary Guide

 ๐Ÿ“˜ Networking Summary Guide



I. What is Networking?

Computer Networking refers to the interconnection of computers and devices that share data and resources. It underpins nearly all IT and DevOps systems, including cloud infrastructure, server communication, and service discovery.


II. Basic Networking Concepts

TermDescription
IP AddressUnique identifier for a device on a network. IPv4 (e.g., 192.168.1.1), IPv6 (e.g., fe80::1).
MAC AddressHardware address of a NIC (e.g., 00:1A:2B:3C:4D:5E).
SubnetLogical segmentation of a network (e.g., /24 = 255.255.255.0).
GatewayA router that connects a subnet to external networks.
DNSDomain Name System – resolves domain names to IP addresses.
DHCPDynamic Host Configuration Protocol – assigns IPs automatically.

III. OSI Model (7 Layers)

Layer  NameFunction
7ApplicationUser interaction (HTTP, FTP, DNS)
6PresentationData formatting (SSL, JPEG)
5SessionSession management
4TransportData delivery (TCP/UDP)
3NetworkRouting (IP)
2Data LinkMAC addressing, frames
1PhysicalHardware, cables, NICs

IV. Key Protocols

ProtocolLayer     Purpose
IP3Addressing and routing
TCP4Reliable communication
UDP4Faster, connectionless communication
HTTP/HTTPS7Web communication
DNS7Name resolution
SSH7Secure shell access
ICMP3Ping/traceroute functionality
FTP/SFTP7File transfer

V. Networking Tools (Linux CLI)

CommandUsage
ip aShow network interfaces & IPs
pingTest connectivity
tracerouteTrace packet path
netstat -tuln or ss -tulnShow listening ports
dig / nslookupDNS resolution info
curl / wgetHTTP requests
tcpdumpNetwork packet capture
nmapNetwork scanning

VI. Private vs Public IP

  • Private IP ranges (RFC1918):

    • 10.0.0.0/8

    • 172.16.0.0/12

    • 192.168.0.0/16

  • Public IP: Routable on the internet.

  • NAT (Network Address Translation): Maps private to public IPs.


VII. TCP vs UDP

FeatureTCPUDP
ConnectionConnection-orientedConnectionless
ReliabilityGuaranteed, ordered deliveryNo guarantee/order
SpeedSlowerFaster
Use CasesWeb, email, SSHDNS, video streaming

VIII. Port Numbers

PortService
22SSH
53DNS
80HTTP
443HTTPS
25SMTP
3306MySQL
5432PostgreSQL
6379Redis
8080HTTP-alt (apps)

IX. CIDR Notation & Subnetting

CIDRSubnet MaskHosts
/8255.0.0.0~16M
/16255.255.0.0~65K
/24255.255.255.0  254
/32255.255.255.255   1

X. Firewalls and Security

  • iptables or nftables: Linux-based firewall tools.

  • UFW (Uncomplicated Firewall): Easy firewall management.

  • Security best practices:

    • Allow only required ports.

    • Block unused protocols.

    • Use VPNs for private access.

    • Monitor traffic with IDS/IPS (Snort, Suricata).


XI. DNS Concepts

TermDescription
A RecordMaps domain to IPv4 address
AAAAMaps domain to IPv6
CNAMEAlias to another domain
MXMail exchange server
NSNameservers for a domain
TTLTime to live (cache duration)

XII. Network Services in DevOps

  • Load Balancers: Distribute traffic across servers (e.g., NGINX, HAProxy).

  • Reverse Proxies: Handle incoming requests and forward to services.

  • Service Discovery: Identify service locations dynamically (e.g., Consul, Kubernetes DNS).

  • Overlay Networks: Used in containers for cross-node communication (Flannel, Calico).

  • VPNs: Secure access to private networks (WireGuard, OpenVPN).


XIII. Common Network Troubleshooting Steps

  1. Check IP: ip a

  2. Check DNS: dig google.com

  3. Test ping: ping 8.8.8.8

  4. Route check: traceroute google.com

  5. Port check: ss -tuln, nmap localhost

  6. Logs: /var/log/syslog, /var/log/messages

  7. Capture traffic: tcpdump -i eth0


XIV. Best Practices

  1. Use private networks and subnets for internal services.

  2. Apply strict firewall rules.

  3. Monitor traffic with tools like Netdata, Nagios, Prometheus.

  4. Encrypt data in transit (TLS, VPN).

  5. Use role-based access for network devices.



Comments

Popular posts from this blog

SAVE TAX ๐Ÿ’ต

LIFE A JOURNEY

๐ŸฆŸ The Truth About Mosquitoes: More Than Just an Itchy Bite