Networking for Beginners – Tutorial 7
DHCP, DNS, NAT & PAT Explained
Automatic IP Addressing, Name Resolution & Internet Access
Course: Networking for Beginners to Advanced
Lesson: 7 of 30
Introduction
Imagine a company with:
- 💻 250 Computers
- 📷 300 Hikvision IP Cameras
- 🖨️ 20 Network Printers
- 💽 5 NVRs
- 🌐 Cisco Catalyst Core Switch
- 🔥 Firewall
- 🌍 Internet Connection
Without services like DHCP, DNS, NAT, and PAT, every device would need to be configured manually, making the network difficult to manage.
In this lesson, you'll learn how these technologies simplify modern networking.
What is DHCP?
DHCP stands for Dynamic Host Configuration Protocol.
It automatically assigns network settings to devices when they connect.
Instead of configuring every computer manually, the DHCP server provides:
- IP Address
- Subnet Mask
- Default Gateway
- DNS Server
DHCP Process (DORA)
The DHCP process follows DORA:
| Step | Description |
|---|---|
| Discover | Client searches for a DHCP server |
| Offer | DHCP server offers an IP address |
| Request | Client requests the offered address |
| Acknowledge | Server confirms the lease |
DHCP Flow
Computer │ │ DHCP Discover ▼ DHCP Server │ │ DHCP Offer ▼ Computer │ │ DHCP Request ▼ DHCP Server │ │ DHCP ACK ▼ Computer Receives IP Address
Example
Laptop boots up.
DHCP Server assigns:
IP Address : 192.168.10.100 Subnet Mask : 255.255.255.0 Gateway : 192.168.10.1 DNS Server : 8.8.8.8 Lease Time : 24 Hours
No manual configuration is required.
Static IP vs DHCP
| Device | Recommended |
|---|---|
| Cisco Switch | Static IP |
| Router | Static IP |
| Firewall | Static IP |
| Hikvision Camera | Static IP |
| NVR | Static IP |
| Printer | Static IP (recommended) |
| PC | DHCP |
| Laptop | DHCP |
| Mobile Phone | DHCP |
Cisco DHCP Configuration
configure terminal ip dhcp pool OFFICE network 192.168.10.0 255.255.255.0 default-router 192.168.10.1 dns-server 8.8.8.8 lease 7 end write memory
What is DNS?
DNS stands for Domain Name System.
DNS translates human-friendly names into IP addresses.
Example:
Instead of remembering:
142.250.xx.xx
You simply type:
www.google.com
The DNS server finds the correct IP address for you.
DNS Process
Computer ↓ DNS Query ↓ DNS Server ↓ IP Address Returned ↓ Website Opens
Common Public DNS Servers
| Provider | Primary | Secondary |
|---|---|---|
| 8.8.8.8 | 8.8.4.4 | |
| Cloudflare | 1.1.1.1 | 1.0.0.1 |
| OpenDNS | 208.67.222.222 | 208.67.220.220 |
Enterprise DNS Example
Internal devices can use hostnames:
| Hostname | IP Address |
|---|---|
| Core-SW | 192.168.10.1 |
| NVR-01 | 192.168.200.10 |
| Camera-F1-01 | 192.168.101.101 |
This makes devices easier to identify and manage.
What is NAT?
NAT stands for Network Address Translation.
It allows private IP addresses to communicate with the public Internet.
Without NAT:
192.168.10.100
cannot directly access the Internet because it is a private address.
The router or firewall translates it into a public IP address.
NAT Example
Office PC 192.168.10.100 │ ▼ Cisco Router / Firewall │ NAT Translation │ Public IP 203.0.113.25 │ Internet
Types of NAT
Static NAT
One private IP maps to one public IP.
Example:
192.168.10.10 ↓ 203.0.113.10
Best for:
- Web Servers
- VPN Servers
- Public CCTV Systems
Dynamic NAT
A private IP receives a public IP from a pool of available addresses.
Mostly used in enterprise environments with multiple public IPs.
What is PAT?
PAT stands for Port Address Translation.
Also called NAT Overload.
PAT allows many private devices to share a single public IP address by using different port numbers.
PAT Example
PC 192.168.10.10 ↓ Public IP 203.0.113.25:10001 ------------------------- Laptop 192.168.10.20 ↓ 203.0.113.25:10002 ------------------------- Camera 192.168.10.101 ↓ 203.0.113.25:10003
Many devices share one public IP without conflicts.
NAT vs PAT
| Feature | NAT | PAT |
|---|---|---|
| Public IPs | One or More | Usually One |
| Uses Port Numbers | No | Yes |
| Home Networks | Sometimes | Very Common |
| Enterprise | Yes | Yes |
| Saves Public IPs | Limited | Excellent |
Enterprise CCTV Example
Internet │ Public IP 203.0.113.25 │ Firewall / Router NAT / PAT Enabled │ Cisco Catalyst C9300X Core Switch │ 24-Port Gigabit Switch │ ┌───────────────┼───────────────┐ │ │ │ NVR-1 NVR-2 NVR-5 │ PoE Access Switches │ 300 Hikvision Cameras
Why Static IPs for Cameras?
For enterprise CCTV systems:
- Camera IP addresses should not change.
- NVRs expect cameras at fixed IP addresses.
- Static addressing simplifies maintenance and troubleshooting.
Example:
| Device | IP Address |
|---|---|
| Camera 1 | 192.168.101.101 |
| Camera 2 | 192.168.101.102 |
| Camera 3 | 192.168.101.103 |
| NVR-1 | 192.168.200.10 |
| Cisco Core | 192.168.10.1 |
Troubleshooting Tips
Computer Doesn't Receive an IP Address
Check:
- Is the DHCP server running?
- Is the switch port active?
- Is the VLAN correct?
- Is there an available IP address in the DHCP scope?
Website Doesn't Open
Check:
- DNS server configured correctly?
- Internet connection available?
- Gateway reachable?
- Firewall rules?
Camera Cannot Be Viewed Remotely
Check:
- NAT/PAT configuration
- Firewall rules
- Public IP address
- Remote access settings
- Port forwarding (if required)
Summary
After completing this lesson, you should understand:
- ✅ What DHCP is and how it works
- ✅ The DORA process
- ✅ Static IP vs DHCP
- ✅ What DNS is
- ✅ How DNS translates names into IP addresses
- ✅ What NAT is
- ✅ Static NAT vs Dynamic NAT
- ✅ What PAT (NAT Overload) is
- ✅ Real-world Cisco and Hikvision enterprise networking examples
Next Tutorial (Lesson 8)
VLAN Fundamentals – Access Port, Trunk Port & Inter-VLAN Routing
In the next lesson, you'll learn:
- What is a VLAN?
- Why VLANs are important
- Access Ports vs. Trunk Ports
- IEEE 802.1Q VLAN tagging
- Inter-VLAN Routing
- Cisco VLAN configuration
- VLAN design for a 9-floor, 300-camera Hikvision Enterprise CCTV Network
- Best practices for separating users, cameras, servers, and management traffic
This lesson will help you build secure, organized, and scalable enterprise networks using Cisco switches.
0 Comments