IP Addressing, Subnetting, and basic networking commands
1. IP Addressing 🏷️
-
Definition: An IP (Internet Protocol) address is a unique number assigned to each device on a network to identify it.
-
Format: IPv4 is most common → 4 numbers separated by dots (e.g.,
192.168.1.10) -
IPv4 Classes:
-
Class A: 1.0.0.0 – 126.255.255.255 → Large networks 🌍
-
Class B: 128.0.0.0 – 191.255.255.255 → Medium networks 🏢
-
Class C: 192.0.0.0 – 223.255.255.255 → Small networks 🏠
-
Types of IP Address:
-
Private IP: Used inside LAN (e.g.,
192.168.x.x) 🏠 -
Public IP: Used on the internet 🌐
2. Subnetting ✂️🖧
-
Definition: Subnetting divides a large network into smaller, manageable networks called subnets.
-
Purpose:
-
Efficient IP address usage 💡
-
Better network performance ⚡
-
Enhanced security 🔐
-
Example:
-
Network:
192.168.1.0/24→ 256 IP addresses (192.168.1.0to192.168.1.255) -
Subnet into 2 smaller networks:
-
192.168.1.0/25→ 128 IPs -
192.168.1.128/25→ 128 IPs
-
Subnet Mask: Determines which part of IP is network and which is host
-
/24→255.255.255.0 -
/25→255.255.255.128
3. Basic Networking Commands 🖥️💻
A. Windows Commands ⚡
| Command | Use | Example |
|---|---|---|
ipconfig | Shows IP address & network info | ipconfig |
ping | Tests connectivity to another device | ping 8.8.8.8 |
tracert | Shows path to a device/website | tracert google.com |
nslookup | Checks DNS resolution | nslookup example.com |
netstat | Shows active connections & ports | netstat -an |
B. Linux Commands 🐧
| Command | Use | Example |
|---|---|---|
ifconfig or ip addr | Show network interfaces | ifconfig |
ping | Test connectivity | ping 8.8.8.8 |
traceroute | Show path to host | traceroute google.com |
dig | DNS query | dig example.com |
netstat | Active connections | netstat -tuln |
4. Practical Tips 💡
-
Use
pingto check if another device is reachable 🏓 -
Use
ipconfig/ifconfigto verify your device IP before connecting to a network -
Subnetting helps avoid IP conflicts in LAN
-
Label network devices and IP ranges for easier management 🏷️
💡 Quick Summary:
-
IP Address: Unique device identifier
-
Subnetting: Divide networks for efficiency and security
-
Commands: Ping, tracert, ipconfig/ifconfig, netstat, nslookup/dig → troubleshoot and manage networks
Comments
Post a Comment