Docsity

Introduction to IP Addressing and Subnetting, Lecture notes of Data Communication Systems and Computer Networks

Partial preview of the text

Download Introduction to IP Addressing and Subnetting and more Lecture notes Data Communication Systems and Computer Networks in PDF only on Docsity!

Introduction to IP

Addressing and subnetting

Outline

  • What is IP address?
  • Classful IP addressing
  • Subnetting
  • Classless Inter-Domain Routing (CIDR)
  • Solutions to Scaling IP Address Space

What is IP address?

  • The 32-bit IP address is broken up into 4 octets, which are arranged into a dotted-decimal notation scheme.
  • An octet is a set of 8 bits
  • two common notations: binary notation and dotted-decimal notation - binary notation: one or more spaces inserted between each octet (8 bits) 10000000 00001011 00000011 00011111 - dotted-decimal notation: to make it more compact and easier to read (for humans) 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 1 1 1 1 1 1 1 128 64 32 16 8 4 2 1

The address space of IPv4 is

or

IPv4 address space

In classful addressing the address space is divided into 5 classes: A, B, C, D, and E. Class D addresses are used for multicasting. Class E addresses are reserved for testing & some mysterious future use.

Finding the class in binary notation

Finding the class in decimal notation

Example 2

Solution

Find the class of the following addresses 158.223.1. 227.13.14.

  • 158.223.1. 1 st byte = 158 (128<158<191) class B
  • 227.13.14. 1 st byte = 227 (224<227<239) class D
  • 0.0.0.0: default route, used only during Startup
  • 127.0.0.0: loopback,
  • host all 0: this network
  • host all 1: limited broadcast (local net) Special Cases:

Class A Class B Class C D IP Address Space E 50 % 25%^ 12.5%^ 6.25% 232 = 4,294,967,296 addresses

Partition of the Classful IP Addresses

  • Although classful addressing had several problems and became obsolete, it had one advantage: - Given an address, we can easily find the class of the address and, since the prefix length for each class is fixed, we can find the prefix length immediately. - In other words, the prefix length in classful addressing is inherent in the address; no extra information is needed to extract the prefix and the suffix. Advantage of classful Addressing

Subnetting

Idea: Add one more level (subnet number) to the class hierarchy Subnet Mask

Advantages:

  • routing table does not grow
  • flexibility for local network administrator
  • hide route flapping from outside routers

Default mask and subnet mask

Given an IP address, we can find the subnet address the same way we found the network address. We apply the mask to the address. We can do this in two ways: straight or short-cut. Finding the Subnet Address