Understanding IP Addresses: Types, Classes, and Configuration
Understanding IP Addresses
An IP address is a series of 32 binary bits (ones and zeros). In a byte, the rightmost bit has a value of 1, and the values of the remaining bits from right to left are 2, 4, 8, 16, 32, 64, and 128. The first part identifies the network, and the second part identifies a host on that network. Both parts are necessary in an IP address. For example, the first three octets (192.168.1.8) identify the network portion of the address, and the last octet (57) identifies the host.
Subnet Mask
A subnet mask is a 32-bit address mask used in IP to indicate the bits of an IP address that are being used to address a subnet. IP addresses are 32 bits long.
IP Classes
There are five IP classes: Classes A, B, and C are business addresses. Class D is for multicast, and Class E is for experimental use.
- Class C addresses (192-223) have three octets for the network portion and one for the hosts (255.255.255.0) – suitable for small networks.
- Class B addresses (128-191) have two octets to represent the network portion and two for the hosts (255.255.0.0) – suitable for medium-sized networks.
- Class A addresses (1-127) have only one octet to represent the network portion and three to represent the host (255.0.0.0) – suitable for large organizations.
Public vs. Private IPs
- Public IPs: All IP addresses except those reserved for private IP addresses.
- Private IPs: Reserved for internal use of the network and cannot be used exclusively for the Internet. Ranges include 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, and 192.168.0.0 to 192.168.255.255.
Unicast, Broadcast, and Multicast
- Unicast: A packet with a unicast destination address is directed to a specific host.
- Broadcast: The packet contains a destination IP address with all ones (1) in the host portion. This means that all hosts on the local network (broadcast domain) will receive and see the packet.
- Multicast: Multicast addresses enable a source device to send a packet to a device group (224.0.0.0 – 239.255.255.255).
DHCP (Dynamic Host Configuration Protocol)
DHCP requests and assigns an IP address, default gateway, and DNS server address to a network host.
Static vs. Dynamic IP Configuration
- Static IP: With a static mapping, the network administrator must manually configure the network information for a host. At a minimum, this includes the host IP address, subnet mask, and default gateway.
- Dynamic IP: IP addresses are assigned automatically through DHCP. A device needing an IP address will send a DHCP discovery request.
Connection Types
- Direct Connection: A public address is assigned to the single host from the ISP’s DHCP server.
- Connection through an integrated router: When more than one host needs access to the Internet, the ISP’s modem can connect directly to an integrated router instead of connecting directly to a single computer. This allows the creation of a home network or a network for a small business. The integrated router receives a public address from the ISP, and internal hosts receive private addresses from the integrated router.
- Connecting through a gateway device: Gateway devices combine an integrated router and modem in one unit and connect directly to the ISP service. As with an integrated router, the gateway device receives a public address from the ISP, and PCs receive internal private addresses from the gateway device.