Understanding IP (Internet Protocol) Addresses

Modified on Tue, 09 May 2023 at 10:00 PM

 

When you configure the TCP/IP protocol on a Microsoft Windows computer, an IP address, subnet mask, and usually a default gateway are required in the TCP/IP configuration settings.

 

To configure TCP/IP correctly, it is necessary to understand how TCP/IP networks are addressed and divided into networks and subnetworks. This article is intended as a general introduction to the concepts of IP networks and subnetting.

IP addresses: Networks and hosts

An IP address is a 32-bit number that uniquely identifies a host (computer or other device, such as a printer or router) on a TCP/IP network.

 

IP addresses are normally expressed in dotted-decimal format, with four numbers separated by periods, such as 192.168.123.132. To understand how subnet masks are used to distinguish between hosts, networks, and subnetworks, examine an IP address in binary notation.

 

For example, the dotted-decimal IP address 192.168.123.132 is (in binary notation) the 32 bit number

110000000101000111101110000100. This number may be hard to make sense of, so divide it into four parts of eight binary digits.

 

These eight bit sections are known as octets. The example IP address, then, becomes

11000000.10101000.01111011.10000100. This number only makes a little more sense, so for most uses, convert the binary address into dotted-decimal format (192.168.123.132). The decimal numbers separated by periods are the octets converted from binary to decimal notation.

 

For a TCP/IP wide area network (WAN) to work efficiently as a collection of networks, the routers that pass packets of data between networks do not know the exact location of a host for which a packet of information is destined. Routers only know what network the host is a member of and use information stored in their route table to determine how to get the packet to the destination host's network. After the packet is delivered to the destination's network, the packet is delivered to the appropriate host.

 

For this process to work, an IP address has two parts. The first part of an IP address is used as a network address, the last part as a host address. If you take the example 192.168.123.132 and divide it into these two parts you get the following:

 

192.168.123. Network .132 Host

-or-

 

192.168.123.0 - network address. 0.0.0.132 - host address.


 
Subnet mask

 

The second item, which is required for TCP/IP to work, is the subnet mask. The subnet mask is used by the TCP/IP protocol to determine whether a host is on the local subnet or on a remote network.

 

In TCP/IP, the parts of the IP address that are used as the network and host addresses are not fixed, so the network and host addresses above cannot be determined unless you have more information. This information is supplied in another 32-bit number called a subnet mask. In this example, the subnet mask is 255.255.255.0. It is not obvious what this number means unless you know that 255 in binary notation equals 11111111; so, the subnet mask is:

 

11111111.11111111.11111111.0000000

 

Lining up the IP address and the subnet mask together, the network and host portions of the address can be separated:

 

11000000.10101000.01111011.10000100 -- IP address (192.168.123.132)

11111111.11111111.11111111.00000000 -- Subnet mask (255.255.255.0)

 

The first 24 bits (the number of ones in the subnet mask) are identified as the network address, with the last 8 bits (the number of remaining zeros in the subnet mask) identified as the host address. This gives you the following:

 

11000000.10101000.01111011.00000000 -- Network address (192.168.123.0)

00000000.00000000.00000000.10000100 -- Host address (000.000.000.132)

 

So now you know, for this example using a 255.255.255.0 subnet mask, that the network ID is

192.168.123.0, and the host address is 0.0.0.132. When a packet arrives on the 192.168.123.0 subnet (from the local subnet or a remote network), and it has a destination address of 192.168.123.132, your computer will receive it from the network and process it.

 

Almost all decimal subnet masks convert to binary numbers that are all ones on the left and all zeros on the right. Some other common subnet masks are:

 

Decimal                   Binary

255.255.255.192           1111111.11111111.1111111.11000000

255.255.255.224           1111111.11111111.1111111.11100000

 

 

 

The most common subnet mask is almost always: 255.255.255.0


 
 

Default gateways

 

If a TCP/IP computer needs to communicate with a host on another network, it will usually communicate through a device called a router. In TCP/IP terms, a router that is specified on a host, which links the host's subnet to other networks, is called a default gateway. This section explains how TCP/IP determines whether or not to send packets to its default gateway to reach another computer or device on the network.

 

When a host attempts to communicate with another device using TCP/IP, it performs a comparison process using the defined subnet mask and the destination IP address versus the subnet mask and its own IP address. The result of this comparison tells the computer whether the destination is a local host or a remote host.

 

If the result of this process determines the destination to be a local host, then the computer will simply send the packet on the local subnet. If the result of the comparison determines the destination to be a remote host, then the computer will forward the packet to the default gateway defined in its TCP/IP properties. It is then the responsibility of the router to forward the packet to the correct subnet.

 

In order for computers, wireless printers, wireless scanners, to network with each other, they have to be in the same Gateway and Workgroup/Domain.

 

 

 

 

Right-click This PC, and select Properties. Then click Advanced system settings. Finally click on Computer Name Tab


 

 

I added a static IP address in this example, fixed address, otherwise it would be on “Obtain an IP Address

Automatically” as 99% of home computers are.  They will allow the router to assign an IP address for

them. Here’s how to check your IP Address;

 

Go to and type run hit “Enter” then type CMD and hit “Enter” Then type IPCONFIG and hit “Enter”

 

 

Notice it gives you ALL the info about your network.


 

Glossary

 

Broadcast address -- An IP address with a host portion that is all ones. Host -- A computer or other device on a TCP/IP network.

Internet -- The global collection of networks that are connected together and share a common range of

IP addresses.

 

 

InterNIC -- The organization responsible for administration of IP addresses on the Internet.

 

 

IP -- The network protocol used for sending network packets over a TCP/IP network or the Internet. IP Address -- A unique 32-bit address for a host on a TCP/IP network or internetwork.

Network -- There are two uses of the term network in this article. One is a group of computers on a

single physical network segment; the other is an IP network address range that is allocated by a system administrator.

 

 

Network address -- An IP address with a host portion that is all zeros.

 

 

Octet -- An 8-bit number, 4 of which comprise a 32-bit IP address. They have a range of 00000000-

11111111 that correspond to the decimal values 0- 255.

 

 

Packet -- A unit of data passed over a TCP/IP network or wide area network.

 

 

RFC (Request for Comment) -- A document used to define standards on the Internet. Router -- A device that passes network traffic between different IP networks.

Subnet Mask -- A 32-bit number used to distinguish the network and host portions of an IP address. Subnet or Subnetwork -- A smaller network created by dividing a larger network into equal parts.

TCP/IP -- Used broadly, the set of protocols, standards and utilities commonly used on the Internet and large networks.

 

 

Wide area network (WAN) -- A large network that is a collection of smaller networks separated by routers. The Internet is an example of a very large WAN.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article