IP Addressing / CIDR Classless Inter-Domain Routing • Each node on the same network must have a unique IP address. • Today, the most commonly used version of IP is IP version 4 (IPv4), • Its addresses are in such high demand that supply has started to run out. • IP version 6 (IPv6) was created to address this shortage. – (IPv6 also has many security features built into it that are not part of IPv4.) • IPv4 uses 32 bits for its addresses, • IPv6 uses 128 bits; – IPv6 provides more possible addresses with which to work. • Each address has a host portion and a network portion, • Addresses are grouped into classes and then into subnets. • The subnet mask of the address differentiates the groups of addresses that define the subnets of a network. IPv4 address classes Class Range of first octet Number of networks Number of nodes per network A 0 - 127 128 16,777,216 B 128–191 16,384 65,536 C 192–223 20,97,152 256 D 224-239 Multicast E 240-255 Reserved for Research / future use • All nodes connected to the network can have different host addresses but a common network address. • The host address identifies every individual node, whereas the network address is the identity of the network they are all connected to • Each IPv4 Address is 32 Bits long • Depending on the class, X bits will identify the Network and Y identifies the Host • Example – Class A 1 1 1 1 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 • 125.14.12.10 • In this example 8 Bits identify the Network and 16 bits Identify the host TomBrett.ie Subnet • A subnet is created from the host portion of an IP address to designate a "sub" network. • This allows us to further break the host portion of the address into two or more logical groupings. • A network can be logically partitioned to reduce administration headaches, traffic performance, and potentially security. • Network subnetting is not physical, it is logical. • A subnet mask defines smaller networks inside a larger network • Subnetting allows large IP ranges to be divided into smaller, logical, and more tangible network segments. • If the traditional subnet masks are used, • they are referred to as classful or classical IP addresses. • If an organization needs to create subnets that do not follow these traditional sizes, then it would use classless IP addresses. • This just means a different subnet mask would be used to define the network and host portions of the addresses. Starting and ending numbers • Subnets have a beginning and an ending, • The beginning number is always even and the ending number is always odd. • The beginning number is the "Network ID" and the ending number is the "Broadcast ID." • You can’t use these numbers because they both have special meaning with special purposes. • The Network ID is the official designation for a particular subnet, • The ending number is the broadcast address that every device on a subnet listens to. • Anytime you want to refer to a subnet, you point to its Network ID and its subnet mask, which defines its size. • Anytime you want to send data to everyone on the subnet (such as a multicast), you send it to the Broadcast ID. Classless inter-domain routing (CIDR) • After it became clear that available IP addresses were running out as more individuals and corporations participated on the Internet, classless interdomain routing (CIDR) was created. • A Class B address range is usually too large for most companies, and a class C address range may be too small, • CIDR provides the flexibility to increase or decrease the class sizes as necessary. • CIDR is the method to specify more flexible IP address classes. CIDR notation • CIDR notation is a syntax for specifying IP addresses and their associated routing prefix. • CIDR appends a slash character to the address and the decimal number of leading bits of the routing prefix, • The /24 or whatever decimal number follows the slash ‘/’ identifies the networking portion of the address leaving the remaining as the host identifier • e.g., 192.168.2.0/24 for IPv4, CIDR Example • 192.168.100.0/24 represents an IPv4 address and its associated routing prefix 192.168.100.0, or equivalently, its subnet mask 255.255.255.0 • /24 relates to the amount of 1’s in the subnet mask • 11111111 11111111 11111111 00000000 • =255.255.255.0 • 24 bits identify the host portion, 8 bits identify the node CIDR Example • 192.168.100.0/16 • 11111111 11111111 00000000 00000000 • 255.255.0.0 • 16 bits identify the network portion, 16 bits identify the node CIDR Example • 192.168.100.0/22 • 11111111 11111111 11111100 00000000 • 255.255.252.0 • 22 Bits identify the Network portion, 10 bits identify the node The mask length refers to the /number in the CIDR notation Note the repeating pattern it will come in handy to remember eight special numbers that reoccur when dealing with subnet masks. They are 255, 254, 252, 248, 240, 224, 192, and 128.