Lesson 05
Lesson 05
Lesson 05
IP Address Structure
• IPv4 Address: Consists of 32 bits, divided into four octets (e.g., 192.168.1.1).
• Subnet Mask: Defines the network and host portions of the IP address. Example:
255.255.255.0 (/24).
• CIDR Notation: Represents the subnet mask using a slash (/) followed by the number of bits
set to 1. Example: /24.
Subnetting
1. Determine Subnets: Identify the number of required subnets and round up to the nearest
power of 2.
2. Calculate Hosts per Subnet: Use the formula 2n−22^n - 22n−2, where nnn is the number of
host bits.
3. Subnet Mask Calculation: Add the number of subnet bits to the network prefix. Example: If
using a /16 network and needing 4 subnets, add 2 bits: /18.
4. Identify Subnet IDs: Calculate using the least significant octet. Example: For a /18 subnet
mask (255.255.192.0), the subnet IDs increment by 64: 172.30.0.0, 172.30.64.0, etc.
5. Determine Host Ranges: Subtract 1 from the next subnet ID for the broadcast address and
subtract 2 to find the last host address.
• Considerations:
o Number of required subnets.
o Number of hosts per subnet.
o Use of valid public or private ranges.
o Avoid reserved ranges (e.g., loopback, link local).
o Ensure unique network and host IDs.
o Plan for future growth.
Subnet Calculation Example
• Broadcast Domain: Network segment where a broadcast packet is forwarded to all devices.
• Collision Domain: Network segment where data packets can collide with each other.
• Switch: Network device that forwards frames based on MAC addresses.
• Router: Network device that forwards packets based on IP addresses, used to connect
different networks.
• Default Gateway: The router's IP address that acts as an access point for traffic
destined for other networks.
• Dynamic Host Configuration Protocol (DHCP): Protocol for automatically assigning
IP addresses to devices on a network.
Broadcast Domain:
• Definition: A network segment in which any broadcast sent by a device is heard by all
other devices in the same segment.
• Example: All devices in the same VLAN or connected to the same switch.
Collision Domain:
• Definition: A network segment where data packets can collide with each other if sent
simultaneously.
• Example: All devices connected to a single Ethernet hub.
Switch:
• Definition: A network device that uses MAC addresses to forward frames at the data
link layer (Layer 2).
• Function: Reduces collision domains by creating a separate collision domain per
switch port.
Router:
Default Gateway:
• Definition: The IP address of a router that acts as an access point for traffic to exit the
local network.
• Function: Provides a way for devices in a network to communicate with devices in
other networks.
Considerations:
Scenario: You need to design a subnetting scheme for a network with the address
172.30.0.0/16, requiring 12 subnets.