<< Previous Page: DHCP

TCIP/IP IP address organized into four segments consisting of numbers separated by periods. It represents a 32-bit integer whose binary values identify the network and host. It supports 4.2 billion hosts. A host has several interfaces with its IP address. One connects to the LAN and other to the Internet by using two Ethernet cards.

A host address divided into two parts:

  1. identifies the network and
  2. identifies a particular host

Class-based IP addressing

It designates officially predetermined parts of the address for the network and host addresses

IP addresses organized into three classes depending on their size – A, B, and C.

  • Class A: Uses only the first segment for the network address and the remaining three for the host.
  • Class B: uses two segments making up 16-bit integers whose maximum value is 65,534.
  • Class C: The first three segments used to identify the network, each identifies a subnet, and the last-segment identifies the host. Most IP addresses reference class C networks.

Classless Interdomain Routing (CIDR) addressing

It determines hosts-address-parts dynamically using a netmask, designed for midsized networks with hosts greater than 256 and smaller than 65,534.

Netmask
The netmask has the network set of bits set to 1s, with the host bits set to 0s. All the numbers in the network part of the host address set to 255, and the host part set to 0. So the netmask for Class C host address is 255.255.255.0.

In Classless Interdomain Routing (CIDR), the netmask determined by the network class. The number specifies the size of the network address and attached to the end of the IP address. An IP address whose network part takes up to the first three bytes, the number of bits used for the network part is 24 (8 x 3). The number of network size is attached to the end of the host address with a slash like 192.168.1.44/24. CIDR gives an advantage of specifying network size of any size in bits like 14, 22, or even 25, and the host address uses the remaining leftover.

Short Form Left Over Bits Full Form Maximum Number of Hosts
/8 24 /255.0.0.0 16,777,215 (A Class)
/16 16 /255.255.0.0 65,534 (B Class)
/17 15 /255.255.128.0 32767
/18 14 /255.255.192.0 16383
/19 13 /255.255.224.0 8191
/20 12 /255.255.240.0 4095
/21 11 /255.255.248.0 2047
/22 10 /255.255.252.0 1023
/23 9 /255.255.254.0 511
/24 8 /255.255.255.0 255 (C Class)
/25 7 /255.255.255.128 127
/26 6 /255.255.255.192 63
/27 5 /255.255.255.224 31
/28 4 /255.255.255.240 15
/29 3 /255.255.255.248 7
/30 2 /255.255.255.252 3

Subnetting

CIDR allows a network administrator to officially take host part of an IP address and break it up into subnetworks with fewer hosts. A network on the Internet has an official IP address which network administrator using CIDR network masking creates smaller networks.

Reserved Addresses

The number 127, 0, or 255 cannot be part of an official IP address.

  • Network Address 127.0.0.0 and IP address 127.0.0.1: Designate the network address for the loopback interface of the system. It enables a user to communicate with each other within the system, without having to route through a network connection.
  • 255: A unique broadcast identifier used to broadcast messages to all sites on a network. It references all nodes connected at that level. The host part address set to 255 for a broadcast address, leaving the network part untouched.
  • Reserved for non-Internet LANs (RFC 1918): Small businesses or Home networks are free to use 192.168 (for Class networks) numbers on local machines. They can set up Intranet using network cards (Ethernet cards or hubs) and configure devices with IP addresses starting from 192.168.1.1. The host segment can go up to 256.
  • Gateway Addresses 192.168.1.1: Networks connected to the Internet or extensive network provides a gateway address. Connections from a network to other network passes through this gateway.

IPv6 and IPv4 Coexistence Methods

IETF methods fo providing IPv6 and IPv4 cooperation:

  • Dual-stack: Allows IPv4 and IPv6 to coexist on the same networks
  • Translation: It uses NAT tables which enables IPv6 devices to communicate with IPv4 devices freely
  • Tunneling: Allows transmission from one IPv6 network to another through IPv4 networks that cannot handle IPv6 addresses. Also allowing IPv6 hosts to operate on or through IPv4 networks. IPv6 packets encapsulated within the IPv4 packet.