0% found this document useful (0 votes)
64 views

Unit 3.2-IP Addressing

The 4 subnet network numbers are: 10.2.22.0 10.2.23.0 10.2.23.64 10.2.23.128

Uploaded by

Yuvaraj Tankala
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

Unit 3.2-IP Addressing

The 4 subnet network numbers are: 10.2.22.0 10.2.23.0 10.2.23.64 10.2.23.128

Uploaded by

Yuvaraj Tankala
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

IP Addressing

IP Addresses
What is an IP Address?

• An IP address is a unique global address for a network


interface

• An IP address:
- is a 32 bit long identifier
- encodes a network number (network prefix)
and a host number
Dotted Decimal Notation

• IP addresses are written in a so-called dotted decimal


notation
• Each byte is identified by a decimal number in the range
[0..255]:

• Example:
10000000 10001111 10001001 10010000
1st Byte 2nd Byte 3rd Byte 4th Byte
= 128 = 143 = 137 = 144

128.143.137.144
Network prefix and Host number

• The network prefix identifies a network and the host number


identifies a specific host (actually, interface on the network).

network prefix host number

• How do we know how long the network prefix is?


– The network prefix used to be implicitly defined
• class-based addressing, A,B,C,D
– The network prefix now is flexible and is indicated by
• prefix/netmask (classless Interdomain routing)-CIDR
The old way: Classful IP Adresses

• When Internet addresses were standardized (early 1980s),


the Internet address space was divided up into classes:
– Class A: Network prefix is 8 bits long
– Class B: Network prefix is 16 bits long
– Class C: Network prefix is 24 bits long

• Each IP address contained a key which identifies the class:


– Class A: IP address starts with “0”
– Class B: IP address starts with “10”
– Class C: IP address starts with “110”
The old way: Internet Address Classes
The old way: Internet Address Classes
Example

Find the class of each address.


a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111

Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
Example

Example: www.google.com
•IP address is 128.143.137.144
– Is that enough info to route datagram??? -> No, need netmask or
prefix at every IP device (host and router)
•Using Prefix notation IP address is: 128.143.137.144/16
– Network prefix is 16 bits long

•Network mask is: 255.255.0.0 or hex format: ffff0000


-----> Network id (IP address AND Netmask) is: 128.143.0.0
-----> Host number (IP address AND inverse of Netmask) is: 137.144

128.143 137.144
Problems with Classful IP Addresses

• The original classful address scheme had a number of problems


• In classful addressing, a large part of the available addresses were
wasted.
Problem 1. Inflexible. Assume a company requires 2,000 addresses
– Class A and B addresses are overkill
– Class C address is insufficient (requires 8 Class C addresses)

Alternate is: Subnetting


Subnetting

• Problem: Organizations
have multiple networks
University Network
which are independently
managed Engineeri
ng Medical
– Solution 1: Allocate an School
address for each network School
• Difficult to manage
• From the outside of the Library
organization, each
network must be
addressable ie have an
identifiable address.
– Solution 2: Add another
level of hierarchy to the
IP addressing structure Subnetting
Basic Idea of Subnetting

• Split the host number portion of an IP address into a


subnet number and a (smaller) host number.
• Result is a 3-layer hierarchy

network prefix host number

subnet
network prefix number
host number

extended network prefix


• Then:
• Subnets can be freely assigned within the organization
• Internally, subnets are treated as separate networks
• Subnet structure is not visible outside the organization
Subnet Masks

• Routers and hosts use an extended network prefix (subnet


mask) to identify the start of the host numbers

* There are different ways of subnetting. Commonly used netmasks for university
networks with /16 prefix (Class B) are 255.255.255.0 and 255.255.0.0
Example of a Subnetting Plan

Subnet 128.49.0.0/24
Internet
Subnet 1

Subnet 128.49.1.0/24
Subnet 3
Router
R
Subnet 128.49.2.128/24
Subnet 4

Subnet 2
Subnet 128.49.3.0/24
Advantages of Subnetting

• With subnetting, IP addresses use a 3-layer hierarchy:


» Network
» Subnet
» Host
• Improves efficiency of IP addresses by not consuming an
entire address space for each physical network.
• Reduces router complexity. Since external routers do not
know about subnetting, the complexity of routing tables at
external routers is reduced.

• Note: Length of the subnet mask need not be identical at all


subnetworks.
Subnetting Example
Network without subnets

128.143.0.0/16
Same Network with Subnets
Same network with different subnetmasks

128.143.137.0
Subnet
Subnetting Example

• An organization with 4 departements has the following IP


address space: 10.2.22.0/23. As the systems manager, you
are required to create subnets to accommodate the IT needs
of 4 departments. The subnets have to support to 200, 61, 55,
and 41 hosts respectively. What are the 4 subnet network
numbers?

• Solution:
– 10.2.22.0/24 (256 addresses > 200)
– 10.2.23.0/26 (64 addresses >61)
– 10.2.23.64/26 (64 addresses > 55)
– 10.2.23.128/26 (64 addresses > 41)

You might also like