Back to course

Understanding the Network ID and Host ID

Networking Fundamentals: The 0 to Hero Guide

Lesson 33: Understanding the Network ID and Host ID

Every IP address is logically divided into two parts: the Network ID and the Host ID. This division is fundamental to routing.

The Network ID (The Street)

  • Purpose: Identifies the specific network segment (the street) where the device resides.
  • Routing: Routers use the Network ID to determine where to forward a packet. If the destination packet has a different Network ID, the router sends it out a different interface toward the destination network.
  • Requirement: All devices on the same physical or logical LAN must share the exact same Network ID.

The Host ID (The House Number)

  • Purpose: Uniquely identifies a specific device (the host) within that network segment (the street).
  • Requirement: The Host ID must be unique for every device on the network.

Identifying Network and Host IDs

If we use the old Class C default structure (192.168.1.1):

  • Network ID: The first three octets (192.168.1).
  • Host ID: The last octet (1).

There are two special addresses derived from this split:

  1. Network Address: The address where all host bits are set to 0. (e.g., 192.168.1.0). This address is used to refer to the network itself and cannot be assigned to a host.
  2. Broadcast Address: The address where all host bits are set to 1. (e.g., 192.168.1.255). Packets sent to this address are delivered to every device on that specific network segment. It cannot be assigned to a host.