Lecture-2-IP Subnetting, Troubleshooting IP, and NAT
Computer Network & Communication Notes
1. Concepts and Characteristics of Routing and Switching
Understanding routing and switching is essential for network management.
Routing: Determines the best path for data packets to travel across networks.
Switching: Connects devices on a same network, creating a local area network (LAN).
2. Subnetting
2.1 Subnetting Basics
Definition: Subnetting divides a larger network into smaller, manageable networks.
Need for Subnetting: Necessary when one network address is to be split into several networks.
2.2 Benefits of Subnetting
Reduced Network Traffic: Routers manage traffic effectively, limiting broadcast domains to reduce congestion.
Optimized Network Performance: Less congestion leads to better overall performance.
Simplified Management: Easier to identify and troubleshoot problems.
Facilitated Spanning across Distances: Smaller networks are more efficient over slower WAN links.
3. How to Create Subnets
Subnets are created by borrowing bits from the host portion of an IP address, which reduces host availability but increases subnet quantity.
4. Subnet Masks
Definition: A 32-bit value that differentiates the network segment from the host segment in an IP address.
Example: A subnet mask comprises a series of 1s (network) and 0s (host).
5. Classless Inter-Domain Routing (CIDR)
CIDR Definition: Method for allocating IP addresses, allowing flexibility in how addresses are grouped.
**Default Subnet Masks:
Class A: 255.0.0.0 (/8)
Class B: 255.255.0.0 (/16)**
5.1 CIDR Values Table
Subnet Mask | CIDR Value |
|---|---|
255.0.0.0 | /8 |
255.128.0.0 | /9 |
255.192.0.0 | /10 |
255.255.0.0 | /16 |
255.255.255.0 | /24 |
6. Subnetting Class C Addresses
Host Bits: In Class C, only 8 bits are available for hosts.
Subnet Masks: Must be calculated without skipping bits.
6.1 Fast Method for Subnetting Class C
Answer these questions to subnet efficiently:
How many subnets?
Hosts per subnet?
Valid subnets?
Broadcast address per subnet?
Valid hosts per subnet?
7. Practice Examples
Class C Example: Subnet mask 255.255.255.128
Subnets: 2
Valid Hosts: 126
Valid subnets: 0, 128
Broadcast addresses: 127 (for 0 subnet)
8. Subnetting Class B Addresses
Class B offers broader subnetting options compared to Class C.
Example:
Network Address: 172.16.0.0
Subnet Mask: 255.255.128.0
Hosts: 32,766,
Subnets: 2
9. Troubleshooting IP Addressing
Start with basic checks: ping local address (127.0.0.1) to check IP stack initialization.
Ping local IP and default gateway to troubleshoot connectivity.
9.1 Common Troubleshooting Commands
Ping: Test IP connectivity (ICMP protocol).
Traceroute: Map routes taken by packets.
arp -a: Shows IP-to-MAC mappings.
ipconfig /all: Displays detailed IP configuration information.
10. Introduction to Network Address Translation (NAT)
Purpose: Allows multiple private IPs to share a public IP address, conserving address space.
Useful when merging networks or changing ISPs.
10.1 Types of NAT
Static NAT: One-to-one mapping for each internal host.
Dynamic NAT: Maps unregistered IPs to registered from a pool.
Overloading (PAT): Many-to-one mapping using port numbers to distinguish traffic.
11. NAT Functionality
Translation Process: Outbound packets are modified by NAT router, keeping a NAT table for tracking.
Allows multiple hosts to use one public IP by using ports for identification.