1.6 Configure and verify IPv4 addressing and subnetting

Understanding IPv4 Addressing

IPv4 (Internet Protocol version 4) is the most commonly used protocol for assigning addresses to devices on a network. Each IPv4 address is a 32-bit number divided into four octets, written in decimal format (e.g., 192.168.1.1).

An IPv4 address is made up of two main parts:

For example, in the IP address 192.168.1.10 with a subnet mask of 255.255.255.0, 192.168.1 is the network portion, and 10 is the host portion.

Subnetting

Subnetting involves dividing a larger network into smaller, manageable subnetworks. This helps in efficient IP address management and enhances network security and performance.

Subnet Mask

A subnet mask is used to distinguish between the network and host portions of an IP address. It's also a 32-bit number that follows the same format as an IP address (e.g., 255.255.255.0).

Calculating Subnets

To calculate subnets, follow these steps:

  1. Determine the Number of Required Subnets: Based on the network size and design requirements.
  2. Select a Subnet Mask: This mask defines how many bits are used for the network and how many for hosts.
  3. Divide the IP Address Range: Use the subnet mask to create subnets and allocate IP ranges accordingly.

For example, with a base network of 192.168.1.0/24 and a subnet mask of 255.255.255.192, you can create four subnets:

Each subnet will have 64 addresses (62 usable for hosts).

Configuring IPv4 Addressing

On a Router or Switch

1. Enter Global Configuration Mode:

Router# configure terminal

2. Select the Interface to Configure:

Router(config)# interface gigabitethernet0/1

3. Assign an IP Address and Subnet Mask:

Router(config-if)# ip address 192.168.1.1 255.255.255.0

4. Activate the Interface:

Router(config-if)# no shutdown

On a Host

1. Open Network Settings:

2. Select the Network Interface:

3. Enter IP Address and Subnet Mask:

Verifying IPv4 Addressing

On a Router or Switch

1. Show IP Interface Brief:

Router# show ip interface brief

This command displays a summary of the IP addresses and status of interfaces.

2. Show IP Route:

Router# show ip route

This command displays the routing table to verify the network routes.

On a Host

1. Check IP Configuration:

2. Ping Test:

ping 192.168.1.1

This command checks connectivity to another device in the network.

Sum Up

Configuring and verifying IPv4 addressing and subnetting are fundamental skills in network management. IPv4 addresses are structured into a network and host portion, and subnetting divides a network into smaller, manageable subnets. Configuration involves assigning IP addresses to interfaces and verifying connectivity and routing. Mastering these concepts ensures efficient network design and troubleshooting capabilities.