IP Addressing
          
  
    
    
    
      
      
      
        
        
          1 minute read
        
      
        
  
        
      
      
        
        
1. Introduction to IP Addressing
  - 
IP Address: A unique identifier assigned to each device connected to a network.
 
  - 
Types of IP Addresses:
    
      - 
IPv4: 32-bit address, e.g., 192.168.1.1
 
      - 
IPv6: 128-bit address, e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334
 
    
   
2. IPv4 Addressing
  - 
Structure: Consists of four octets (8 bits each), separated by dots.
 
  - 
Classes:
    
      - 
Class A: 1.0.0.0 to 126.255.255.255 (Large networks)
 
      - 
Class B: 128.0.0.0 to 191.255.255.255 (Medium-sized networks)
 
      - 
Class C: 192.0.0.0 to 223.255.255.255 (Small networks)
 
      - 
Class D: 224.0.0.0 to 239.255.255.255 (Multicast)
 
      - 
Class E: 240.0.0.0 to 255.255.255.255 (Experimental)
 
    
   
3. Subnetting
  - 
Purpose: Divides a larger network into smaller sub-networks.
 
  - 
Subnet Mask: Determines the network and host portions of an IP address.
    
      - 
Example: 255.255.255.0 (/24)
 
    
   
  - 
CIDR Notation: Represents the subnet mask using a slash and the number of network bits.
    
  
 
4. Common Subnet Masks
  - 
/8: 255.0.0.0 (Class A)
 
  - 
/16: 255.255.0.0 (Class B)
 
  - 
/24: 255.255.255.0 (Class C)
 
  - 
/29: 255.255.255.248 (Small subnets)
 
5. Calculating Subnets
  - 
Network Address: The first address in the subnet.
 
  - 
Broadcast Address: The last address in the subnet.
 
  - 
Usable IP Addresses: Total IP addresses minus network and broadcast addresses.
 
6. Example of /29 Subnet
  - 
Subnet Mask: 255.255.255.248
 
  - 
Total IP Addresses: 8
 
  - 
Usable IP Addresses: 6
 
  - 
Network Address: 192.168.1.0
 
  - 
Usable IP Range: 192.168.1.1 to 192.168.1.6
 
  - 
Broadcast Address: 192.168.1.7
 
7. IPv6 Addressing
  - 
Structure: 128-bit address, represented in hexadecimal.
 
  - 
Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
 
  - 
Advantages: Larger address space, improved routing, and security features.
 
8. Special IP Addresses
  - 
Loopback Address: 127.0.0.1 (IPv4) or ::1 (IPv6)
 
  - 
Private IP Addresses:
    
      - 
IPv4:
        
          - Class A: 10.0.0.0 to 10.255.255.255
 
          - Class B: 172.16.0.0 to 172.31.255.255
 
          - Class C: 192.168.0.0 to 192.168.255.255
 
        
       
      - 
IPv6: fc00::/7
 
    
   
9. NAT (Network Address Translation)
  - 
Purpose: Allows multiple devices on a local network to share a single public IP address.
 
  - 
Types:
    
      - 
Static NAT: One-to-one mapping between local and global addresses.
 
      - 
Dynamic NAT: Maps local addresses to a pool of global addresses.
 
      - 
PAT (Port Address Translation): Maps multiple local addresses to a single global address using different ports.
 
    
   
10. DHCP (Dynamic Host Configuration Protocol)
  - 
Purpose: Automatically assigns IP addresses to devices on a network.
 
  - 
Components:
    
      - 
DHCP Server: Assigns IP addresses.
 
      - 
DHCP Client: Receives IP addresses.
 
      - 
DHCP Lease: The duration an IP address is assigned to a device.