Understanding IP Addressing

IP Address

A fundamental part of setting up a TCP/IP network is setting up IP addresses. An IP address is a 32-bit number that is generally displayed in dotted decimal format, in which each octet (8 bits) of the address is displayed in decimal format, and each value is separated by period (e.g. 192.168.0.5). A less common, but often useful, way of displaying the address is in hexadecimal. The hexadecimal equivalent of 192.168.0.5 is C0A80005. Every computer on an intranet (one or more networks connected together) must have a unique IP address.

Subnet Mask

To facilitate communicating between multiple interconnected networks, the IP address is broken into two parts. One part is the network address, and the other part is the local address. Each network has a unique network address, and every device on that network has the same network address portion in its IP address. The local address uniquely identifies a computer within a network. It is expected that local addresses will be duplicated on different networks, but the entire IP address (network address + local address) is always unique.

The method for determining which portion of the IP address is the network address and which portion is the local address is to use a value called a subnet mask. A subnet mask is also a 32-bit number often displayed in dotted decimal format. Each bit of the subnet mask that is a 1 means that the corresponding bit of the IP address is part of the network address. Each bit of the subnet mask that is a 0 means that the corresponding bit of the IP address is part of the local address.

Example:

IP Address

192.168.0.5

C0A80005

Subnet Mask

255.255.255.0

FFFFFF00

Network Address

192.168.0

C0A800  

Local Address

5

      05

  

Therefore, from this example, we see that a device with an IP address of 192.168.0.5 and subnet mask of 255.255.255.0 will have a network address of 192.168.0 and a local address of 5. Other devices on this network must have the same network address but different local addresses. Therefore, some possible IP addresses for other nodes on the network include 192.168.0.6, 192.168.0.1, and 192.168.0.25. There are two reserved local addresses: a local address with all zero bits refers to the network (e.g. 192.168.0.0), and a local address with all one bits is the broadcast address for the network (e.g. 192.168.0.255).

Default Gateway

Suppose the device given in the above example must communicate with a device on a connected network with an IP address of 192.168.1.8. Because the device is not on the same network there is no electrical connection between the computers so it cannot send its data directly. Instead it must go through an IP router. An IP router is a device that sends packets it receives from one network that are intended for devices on another network to the other network. Here is the example intranet:

image\ebx_422867815.gif

How does 192.168.0.5 send a message to 192.168.1.8? The answer is that it must use a third parameter called the default gateway. This parameter is the IP address of the router who will take care of getting the packet to its destination. The rule for most devices is to send packets to devices with the same network address directly over its network, but to send packets to devices with a different network address to the default gateway. In the above network, the device at 192.168.0.5 would have a default gateway of 192.168.0.1, and the device at 192.168.1.8 would have a default gateway of 192.168.1.1.

The default gateway parameter is optional if the device will be on a network that is not connected to any other networks, or if you have an intranet but do not want to allow the device to communicate with devices on networks other than its own.

 


Copyright (c) 1997-2015 by Delta Computer Systems, Inc.