Complete guide to managing and troubleshooting networks – click a topic to jump
Network administration involves the day-to-day management, operation, and maintenance of computer networks. Tasks include configuring network devices, monitoring performance, ensuring security, troubleshooting issues, and planning for growth.
Key responsibilities: IP address management (DHCP), DNS administration, firewall configuration, network monitoring, and user support.
नेटवर्क एडमिनिस्ट्रेशन का मतलब है नेटवर्क को चलाना, उसकी देखभाल करना, और समस्याओं को हल करना। इसमें डिवाइस कॉन्फ़िगर करना, सुरक्षा सुनिश्चित करना, और यूजर्स की मदद करना शामिल है।
# A network administrator's mantra: Monitor, log, automate, secure.
Static vs Dynamic: Static IPs are manually set; dynamic IPs are assigned by DHCP. In Linux, interfaces are configured via /etc/network/interfaces or netplan (Ubuntu). In Windows, use Network Control Panel or netsh.
Key commands: ip addr, ifconfig, route, ip route.
नेटवर्क इंटरफेस को स्टैटिक (खुद से IP देना) या डायनामिक (DHCP से) कॉन्फ़िगर कर सकते हैं। Linux में ip कमांड से IP सेट करते हैं।
# Linux static IP example (using ip command)
sudo ip addr add 192.168.1.100/24 dev eth0
sudo ip link set eth0 up
sudo ip route add default via 192.168.1.1
# Netplan (Ubuntu) - /etc/netplan/01-netcfg.yaml
network:
version: 2
ethernets:
eth0:
addresses:
- 192.168.1.100/24
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
DHCP automatically assigns IP addresses and other network parameters (subnet mask, gateway, DNS) to devices. Common DHCP servers: isc-dhcp-server (Linux), Windows Server DHCP role. DHCP operations: DISCOVER, OFFER, REQUEST, ACK (DORA).
DHCP अपने आप डिवाइस को IP एड्रेस देता है। इससे हर डिवाइस पर मैनually IP सेट नहीं करना पड़ता। DHCP में चार चरण होते हैं: DISCOVER, OFFER, REQUEST, ACK।
# Install DHCP server on Ubuntu
sudo apt install isc-dhcp-server
# Edit /etc/dhcp/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
option routers 192.168.1.1;
option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 600;
max-lease-time 7200;
}
DNS (Domain Name System) translates domain names to IP addresses. Popular DNS servers: BIND9 (full-featured), Unbound (resolver), dnsmasq (lightweight). DNS record types: A, AAAA, CNAME, MX, NS, PTR, TXT.
DNS नामों (जैसे google.com) को IP एड्रेस में बदलता है। BIND9 सबसे प्रचलित DNS सर्वर है। इसमें विभिन्न रिकॉर्ड होते हैं: A (IPv4), AAAA (IPv6), CNAME (उपनाम), MX (मेल सर्वर)।
# BIND9 zone file example (forward lookup)
$TTL 86400
@ IN SOA ns1.example.com. admin.example.com. (
2025021801 ; serial
3600 ; refresh
1800 ; retry
604800 ; expire
86400 ) ; minimum
@ IN NS ns1.example.com.
@ IN A 192.168.1.10
www IN A 192.168.1.10
mail IN A 192.168.1.20
Firewalls control incoming/outgoing traffic based on rules. Linux: iptables (classic), nftables (modern), or firewalld (frontend). Windows: Windows Firewall with Advanced Security. Common tasks: allow SSH, block unauthorized access, NAT.
फ़ायरवॉल नियमों के अनुसार ट्रैफिक को रोकता या अनुमति देता है। Linux में iptables, firewalld का उपयोग होता है। उदाहरण: केवल SSH (पोर्ट 22) को अनुमति देना।
# iptables examples # Allow established connections iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Allow SSH iptables -A INPUT -p tcp --dport 22 -j ACCEPT # Allow HTTP/HTTPS iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 443 -j ACCEPT # Block everything else iptables -P INPUT DROP iptables -P FORWARD DROP # Save rules (Debian/Ubuntu) iptables-save > /etc/iptables/rules.v4
Essential monitoring commands: ping, traceroute, netstat, ss, tcpdump, nmap, iftop, nethogs. For continuous monitoring: Nagios, Zabbix, Prometheus, Grafana.
नेटवर्क मॉनिटरिंग के लिए ping, traceroute, tcpdump, nmap जैसे टूल्स का उपयोग करते हैं। इनसे पता चलता है कि नेटवर्क में क्या हो रहा है।
# Capture packets on interface eth0 sudo tcpdump -i eth0 -n # Show listening ports ss -tulpn # Scan network for open ports nmap -sP 192.168.1.0/24 # ping scan nmap -sS 192.168.1.10 # stealth SYN scan
SNMP is used to monitor and manage network devices. It uses a manager-agent model. MIB (Management Information Base) defines what data can be queried. Versions: SNMPv1, v2c (community strings), v3 (security). Tools: snmpwalk, snmpget, MIB browsers.
SNMP से नेटवर्क डिवाइस (राउटर, स्विच) की निगरानी और प्रबंधन कर सकते हैं। SNMPv3 सुरक्षित है। snmpwalk कमांड से डिवाइस से सारा डेटा निकाल सकते हैं।
# Install SNMP tools sudo apt install snmp snmp-mibs-downloader # Query a device (v2c) snmpwalk -v 2c -c public 192.168.1.1 # snmpget for specific OID snmpget -v 2c -c public 192.168.1.1 sysUpTime.0
Step-by-step approach: 1) Identify the problem. 2) Establish a theory of probable cause. 3) Test the theory. 4) Establish a plan of action. 5) Implement the solution. 6) Verify full functionality. 7) Document findings.
Common checks: physical connectivity, IP configuration, default gateway, DNS resolution, firewall rules.
समस्या सुलझाने के चरण: पहले समस्या पहचानें, फिर कारण का अनुमान लगाएँ, उसे जाँचें, समाधान लागू करें, और अंत में जाँच करें कि काम ठीक है या नहीं। सब कुछ नोट करें।
# Quick troubleshooting checklist ping 127.0.0.1 # loopback (TCP/IP stack) ping localhost # hostname resolution ping gateway IP # local network ping 8.8.8.8 # internet connectivity nslookup google.com # DNS resolution
VLANs (Virtual LANs) logically segment a physical network into separate broadcast domains. Trunking carries multiple VLANs over a single link (using 802.1Q tagging). Configuration is done on managed switches.
VLAN से एक ही स्विच पर अलग-अलग नेटवर्क बना सकते हैं, जैसे अलग विभागों के लिए। ट्रंकिंग एक ही केबल पर कई VLAN को ले जाती है।
# On a Cisco switch (example) vlan 10 name Sales vlan 20 name Engineering interface fastEthernet 0/1 switchport mode access switchport access vlan 10 interface fastEthernet 0/24 switchport mode trunk switchport trunk allowed vlan 10,20
VPNs create encrypted tunnels over public networks, allowing secure remote access. Common protocols: OpenVPN, WireGuard, IPsec, PPTP (insecure). VPN servers require authentication and encryption configuration.
VPN सार्वजनिक इंटरनेट पर एक निजी, सुरक्षित सुरंग बनाता है। OpenVPN और WireGuard आम प्रोटोकॉल हैं। इससे दूरस्थ कर्मचारी कार्यालय नेटवर्क से जुड़ सकते हैं।
# WireGuard quick setup (server) [Interface] Address = 10.0.0.1/24 ListenPort = 51820 PrivateKey = server_private_key [Peer] PublicKey = client_public_key AllowedIPs = 10.0.0.2/32
NFS (Network File System): used for file sharing between Unix-like systems. Samba: implements SMB/CIFS protocol for sharing with Windows clients. Both require proper exports/shares and permissions.
NFS से Linux/Unix सिस्टम आपस में फाइल शेयर करते हैं। Samba से Linux सर्वर Windows क्लाइंट के साथ फाइल शेयर कर सकता है।
# NFS export example (/etc/exports) /shared 192.168.1.0/24(rw,sync,no_subtree_check) # After editing, run: exportfs -ra # Samba share example (/etc/samba/smb.conf) [shared] path = /srv/share browseable = yes read only = no guest ok = yes create mask = 0755
NTP synchronizes system clocks over a network. Accurate time is critical for logs, authentication (Kerberos), and security. Servers can sync with public NTP pools or a local stratum 1 source. Common implementation: chrony (modern) or ntpd.
NTP सभी सिस्टम की घड़ी को एक जैसा रखता है। लॉग और सुरक्षा के लिए सही समय जरूरी है। chrony आम NTP क्लाइंट/सर्वर है।
# /etc/chrony/chrony.conf (client) pool 0.ubuntu.pool.ntp.org iburst makestep 1.0 3 # Check status chronyc sources -v
Automation reduces manual errors and saves time. Ansible is widely used for network automation (no agent required). It uses YAML playbooks to configure devices. Python scripts with Netmiko or NAPALM are also popular.
ऑटोमेशन से नेटवर्क कॉन्फ़िगरेशन जल्दी और सही होता है। Ansible का उपयोग आम है। इसमें YAML में प्लेबुक लिखकर कई डिवाइस एक साथ कॉन्फ़िगर कर सकते हैं।
# Ansible playbook to configure VLAN on Cisco switch
- name: Configure VLAN
hosts: switches
gather_facts: no
tasks:
- name: Ensure VLAN 10 exists
cisco.ios.ios_vlans:
config:
- name: Sales
vlan_id: 10
state: active
Backup network device configurations regularly. Use tools like RANCID, Oxidized, or simple scripts to fetch configs via SSH/TFTP. Store backups securely and test restoration periodically.
नेटवर्क डिवाइस (राउटर, स्विच) की कॉन्फ़िगरेशन का नियमित बैकअप लेना चाहिए। Oxidized या स्क्रिप्ट से बैकअप ले सकते हैं। बैकअप सुरक्षित जगह रखें और रीस्टोर करके जाँच करें।
# Simple script to backup Cisco config via SSH (using sshpass)
#!/bin/bash
DEVICES="192.168.1.1 192.168.1.2"
for ip in $DEVICES; do
sshpass -p 'password' ssh user@$ip "show running-config" > backup_$ip.txt
done
# Example: backup current config and document # Use git for version control of configs git init git add . git commit -m "Initial network configs"
Quick reference of most used commands:
| Command | Description |
|---|---|
| ping | Test connectivity |
| traceroute | Trace path to host |
| ip addr / ifconfig | Show IP addresses |
| ip route / route | Show routing table |
| ss / netstat | Show sockets/connections |
| tcpdump | Capture packets |
| nmap | Network scanner |
| dig / nslookup | DNS lookup |
| iptables -L | List firewall rules |
| systemctl restart networking | Restart network services |
महत्वपूर्ण कमांड्स: ping, traceroute, ip addr, route, netstat, tcpdump, nmap, dig, iptables, systemctl.
# Quick network health check echo "=== Network Check ===" ip -br addr ping -c 2 8.8.8.8 &> /dev/null && echo "Internet: OK" || echo "Internet: FAIL" ss -tulpn | grep LISTEN