Internet Protocols  «Prev  Next»
Lesson 4 TCP/IP addresses and classifications
ObjectiveDescribe TCP/IP Addresses and how they are classified.

Characteristics of TCP/IP Addresses

TCP/IP addresses, more commonly known as IP addresses, serve as unique identifiers for devices on a network using the Transmission Control Protocol/Internet Protocol suite. The characteristics of IP addresses are as follows:
  1. Uniqueness
    • Each device on a TCP/IP network must have a unique IP address to communicate. No two devices on the same network segment can share the same address.
  2. Binary Representation
    • IP addresses are represented as binary numbers, but are usually expressed in human-readable formats:
      • IPv4: 32-bit address written as 4 decimal numbers separated by dots (e.g., 192.168.1.1)
      • IPv6: 128-bit address written as 8 groups of hexadecimal numbers separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334)
  3. Logical Addressing
    • Unlike MAC addresses which are hardware-based, IP addresses are logical addresses that can be changed and configured manually or dynamically (e.g., via DHCP).
  4. Hierarchical Structure
    • IP addresses have two main components:
      • Network Portion: Identifies the network.
      • Host Portion: Identifies the specific device within that network.
  5. Support for Routing
    • IP addresses enable routing through multiple networks, allowing data to travel across the internet.

Classification of IP Addresses (IPv4)
IPv4 addresses are divided into five classes based on the first octet (first 8 bits):
Class First Octet Range Default Subnet Mask Usage
A 1 – 126 255.0.0.0 Very large networks (e.g., ISPs)
B 128 – 191 255.255.0.0 Medium-sized networks
C 192 – 223 255.255.255.0 Small networks
D 224 – 239 N/A Multicast groups
E 240 – 255 N/A Experimental (not for general use)

Note: `127.0.0.1` is reserved for loopback testing and does not belong to any class.
Additional Address Categories
  1. Private IP Addresses

    Used within local networks and not routable on the internet.

    • Class A: 10.0.0.0 – 10.255.255.255
    • Class B: 172.16.0.0 – 172.31.255.255
    • Class C: 192.168.0.0 – 192.168.255.255
  2. Public IP Addresses

    Assigned by IANA and routable on the internet.

  3. Static vs Dynamic
    • Static IP: Manually configured and doesn’t change.
    • Dynamic IP: Assigned by DHCP and can change over time.
  4. Broadcast and Network Addresses
    • Network Address: The first address in a subnet (host bits = 0).
    • Broadcast Address: The last address in a subnet (host bits = 1).

IPv6 Addressing (Briefly)
  • 128-bit addresses, written in hexadecimal
  • Supports larger address space, auto-configuration, and no need for NAT
  • Common format: 2001:0db8:85a3:0000:0000:8a2e:0370:7334


TCP/IP Addresses

A TCP/IP address is a unique address that identifies a computer that is connected to a network. A network can be a LAN, or it might be your ISP (internet service provider). An IP address consists of a 32-bit number represented as a four-part number with each part separated by a period (like x. x. x. x). Each part is called an octet and has a value from 0 to 255. Octets are used to identify the network address and the local host address and are always shown as decimal values (even though they consist of 32 binary values). The diagram below illustrates the elements of the IP addressing scheme. In this diagram, the Network Number is shown as four octets. However, it can be any number desired.
The network number is shown as four octets
The diagram illustrates the structure of a TCP/IP address in IPv4 format. Here's the transcription and explanation:
IP Address Example:
145.10.34.3

Address Breakdown:
* The IP address is split into 4 octets:
    • Octet 1: 145
    • Octet 2: 10
    • Octet 3: 34
    • Octet 4: 3

Each octet is 8 bits, totaling 32 bits:
  8 bits  +  8 bits  +  8 bits  +  8 bits  = 32 bits
  

Classification within the Address:
The address is logically divided into two parts:
    • Network Number
    • Comprised of Octet 1 and Octet 2
    • Helps identify the network the host belongs to
    • Host Number
    • Comprised of Octet 3 and Octet 4
    • Identifies the specific device (host) on that network

Visual Transcription:
IP Address:           145.10.34.3
                      ------------------------------
                      | Network Number | Host Number |
                      ------------------------------
                      | Octet 1 | Octet 2 | Octet 3 | Octet 4 |
                      ----------------------------------------
                           ←──────────── 32 bits ───────────→

This format follows the structure of a Class B IPv4 address, where:
  • The first 2 octets (145.10) represent the network.
  • The last 2 octets (34.3) represent the host.

The network number is shown as four octets

For example, if an IP address were 145.10.34.3, this is how that address actually looks in binary:
Binary representation of IP Address
Binary representation of IP Address

Address Classifications

To accommodate an efficient numbering system, TCP/IP addresses are divided into five classes (A, B, C, D, and E). Classes are similar to the telephone system's area code concept. Instead of assigning each telephone a unique number, telephones are grouped by area code. Grouping in this way reduces the total number of digits required to identify a single phone (or in the case of TCP/IP, a single computer). Instead of organizing users by area code, TCP/IP organizes users by network. The five classes of networks essentially specify the maximum quantity of networks possible for a particular company. An address's class can be identified by the first octet.
  Octet 1 Octet 2 Octet 3 Octet 4
Class A 0      
Class B 10      
Class C 110      
Class D 1110      

The table above defines the first octets for each class and describes how the octets are read to identify the network address and the local host address. Notice that Class A dedicates its first bit position to a 0. Class B sets its first bit to a 1 and its second bit to a 0. The other classes follow suit. Routers are designed to specifically read these patterns to determine the address class. Once known, the remaining bits making up the 32-bit address can be read to determine additional information about the address.

Making sense of the Numbers

For a real world example, consider your phone number again. It starts with an area code, then a local exchange. For example, if your phone number is 415-555-1010, it tells the telephone company that you are in a particular region (based on 415), in a particular neighborhood (based on 555), and on a particular street (based on 1010). Similarly, networks use identifiable IP addresses like the one illustrated below.
IP Address consisting of 1) Network Number and 2) Host Number
IP Address consisting of 1) Network Number and 2) Host Number

128.1.0.3
If your IP address was 128.1.0.3, your PC would be on a Class-A network. Additionally, assuming a simplistic network number system is being used, that particular network would be Network number1, and your PC would be node number 3.
InterNIC is the agency that assigns

AWS Certified Networking

Understanding Public and Private IP Addresses

As we continue to navigate the ever-evolving digital landscape, it's essential to understand the difference between public and private IP addresses. In this article, we will explain what these terms mean and how they impact your online experience.
  1. What is a Public IP Address? A public IP address is a unique identifier that is assigned to a computing device and is accessible over the Internet. Just like a postal address is used to deliver physical mail to your home, a public IP address is necessary for data to be sent and received over the Internet. To find your public IP address, you can visit a website that offers this service, such as WhatIsMyIPAddress.com. Your public IP address is assigned to your router by your Internet Service Provider (ISP) and can be used to identify your location and the devices connected to your network.
  2. What is a Private IP Address? Unlike public IP addresses, private IP addresses are used to assign devices within a private network without exposing them to the Internet. For instance, if you have multiple devices within your home network, you may want to assign private IP addresses to each device. In this scenario, your router is assigned the public IP address, and each device connected to your network (via wired or wireless connection) is assigned a unique private IP address. The router assigns these addresses via the Dynamic Host Configuration Protocol (DHCP).

  • Reserved IP Blocks for Private Use
    To allow organizations to freely assign private IP addresses, the Network Information Center (InterNIC) has reserved certain address blocks for private use. These address blocks are not publicly routable and are only used within private networks. The following IP address blocks are reserved for private IP addresses:
    By using private IP addresses, organizations can efficiently manage their internal networks while maintaining security and privacy.

More on Public IP Addresses

Public IP addresses are addresses recognized across the Internet. When you register with InterNIC, they issue you a public IP address, which ensures that the address is unique. However, IP addresses, like phone numbers for telephones, are becoming scarce. As a result, networks are using private IP addresses, which are valid only on a local intranet. It is never used on the Internet. The technique used for private addressing is called subnetting, and will be discussed in the next lesson. It is not necessary to register private IP addresses.
  • Private Networks behind Router
    Small organizations with limited Internet gateway access can place their networks behind a router that keeps the addresses private and use the private IP addresses that are designed for this purpose. Private IP addresses are not recognized as valid on the Internet. The source address of IP packets originating on the private network is modified to conform to the public IP address. Conversely, IP packets from the outside are readdressed with the private destination address when they pass through the router from the outside into the private network. There are two difficulties with this approach:
    1. Traffic passing through the router to the outside, for exampleWeb requests, must be carefully tracked by the router, so that responses from the outside are routed to the correct private address on the inside. For a small network, this is relatively manageable. The task becomes far more challenging when the number of privately addressed computers is large and traffic through the interface is substantial. The correct routing of e-mail is particularly challenging.
    2. An organization with multiple local area networks connected with a backbone network must configure the private networks in such a way that traffic between the various private local area networks can be managed successfully. One possible solution is to use a single private IP addressing scheme for all networks attached within the backbone, with translation at the edge router. Again, the problem of translation becomes large and difficult to manage.

In summary, understanding the difference between public and private IP addresses is crucial in today's digital age. A public IP address is required for devices to communicate over the Internet, while private IP addresses are used within private networks to assign unique addresses to devices without exposing them to the Internet. By reserving specific IP address blocks for private use, organizations can effectively manage their internal networks while ensuring security and privacy. So, the next time you are setting up your home or business network, remember the importance of public and private IP addresses.
In the next lesson, you will learn about the purpose of subnet masks.


TCP/IP Addresses Classifications

Click the link below to review TCP/IP addresses and their classifications.
  1. 191.102.107.34: Class B
  2. 121.68.19.1: Class A
  3. 127.0.0.1: Invalid IP address
  4. 203.0.18.20: Class C
  5. 171.260.42.1: Invalid IP address

  1. Class A : Class A addresses range from 1.0.0.1 to 126.255.25.254 and can support about 16 million hosts, and each host being a single computer or other networked device. A Class A network address can support up to 127 networks, and is typically reserved for large companies or Internet service providers. The 127.0.0.0 address is reserved for loopback testing on the network interface, and is not available for a network
  2. Class B: Class B addresses may be from 128.1.0.1 to 191.255.255.254 and support about 65,000 hosts on a network. A Class B network address can support about 16,000 networks. Class B ranges are also typically issued to ISPs or large companies, but may also be used by organizations for internal network organization. When a company does this it typically uses Network Address Translation to hide its private IP address scheme from the world, and it uses a proxy server to manage the connections from the outside to the inside hosts.
  3. Class C: Class C IP addresses range from 192.0.1.1 to 223.255.254.254. They can support only 254 hosts on each network, but can have about 2 million networks. Class C address ranges are mostly issued to small companies, which then use NAT to create their own internal address structure, as companies do with Class B addresses.
  4. Class D: Class D addresses are reserved for multicast operations, which involves simultaneously sending the same information to all computers in a defined multicast group. This is helpful when large amounts of data must be sent to many hosts at the same time. The Class D range is from 224.0.0.0 to 239.255.255.255.
  5. Class E and Broadcast: Class E addresses range from 240.0.0.0 to 254.255.255.254, are reserved for future experimental use, and are currently not documented. You cannot assign Class E addresses to your network interface. The final address of 255.255.255.255 is called the broadcast address, and packets sent to this destination go to every device on the network segment.

SEMrush Software 4 SEMrush Banner 4