Professional Documents
Culture Documents
Structure of an IP address
Subnetting
CIDR
IP Version 6 addresses
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:
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).
A, B, C, D, and E.
FINDING THE CLASS IN BINARY NOTATION
FINDING THE ADDRESS CLASS
Show that Class A has
231 = 2,147,483,648 addresses
Find the class of the following IP addresses
00000001 00001011 00001011 11101111
11000001 00001011 00001011 11101111
Solution
Solution
158.223.1.108
1st byte = 158 (128<158<191) class B
•227.13.14.88
1st byte = 227 (224<227<239) class D
NETID AND HOSTID
IP ADDRESS WITH DEFAULT SUBNET MASK
Part of an IP address identifies the network. The other part of the address
Identifies the host. A subnet mask is required to provide this distinction:
158.80.164.3
255.255.0.0
The above IP address has a subnet mask of 255.255.0.0. The subnet mask
follows two rules:
1. If a binary bit is set to a 1 (or on) in a subnet mask, the corresponding bit in the
address identifies the network.
2. if a binary bit is set to a 0 (or off) in a subnet mask, the corresponding bit in the
address identifies the host.
CIDR CLASSLESS INTERDOMAIN ROUTING
Classless Inter-Domain Routing (CIDR) is a simplified
method of representing a subnet mask. CIDR identifies
the number of binary bits set to a 1 (or on) in a subnet
mask, preceded by a slash.
For example, a subnet mask of 255.255.255.240 would
be represented as
Follows in binary:
11111111.11111111.11111111.11110000
The first 28 bits of the above subnet mask are set to 1. The
CIDR notation
for this subnet mask would thus be /28.
EXAMPLE
Example: argon.cs.virginia.edu
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
128.143 137.144
SUBNET MASK APPLY TO OTHER CLASS
It is entirely possible to use subnet masks other than the
default. For
example, a Class B subnet mask can be applied to a
Class A address:
10.1.1.1 /16
However, this does not change the class of the above
address. It remains a Class A address, which has been
subnetted using a Class B mask.
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
192.168.254.0
The default subnet mask for this network
is 255.255.255.0
Create 10 new network from given
Address
SOLUTION
The default Class C mask (255.255.255.0) looks as
follows in binary:
11111111.1111111.1111111.00000000
There are a total of 24 bits set to 1, which are used to
identify the network.
There are a total of 8 bits set to 0, which are used to
identify the host, and
these host bits can be stolen to create new network.
2n = 24= 16 = 16 new networks created
A total of 16 new networks do meet the original
requirement. Stealing four
host bits results in the following new subnet mask:
11111111.11111111.11111111.11110000 =
255.255.255.240
To determine the number of hosts this results in, for
each of the new 16 networks, a slightly modified
formula is required:
2h – 2
Consider the result if four bits are available for hosts:
2h – 2 = 24 – 2 = 16 – 2 = 14 usable hosts per network
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.
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)
EXAMPLE SUBNET
Design the subblocks and give the slash notation for each subblock.
Find out how many addresses are still available after these
allocations.
SOLUTION
Group 1
For this group, each customer needs 256 addresses. This means
the suffix length is 8 (28 256). The prefix length is then 32 8
24.
01: 190.100.0.0/24190.100.0.255/24
02: 190.100.1.0/24 190.100.1.255/24
…………………………………..
64: 190.100.63.0/24190.100.63.255/24
Total 64 256 16,384
Group 2
For this group, each customer needs 128 addresses. This means the
suffix length is 7 (27 128). The prefix length is then 32 7 25.
The addresses are:
001: 190.100.64.0/25 190.100.64.127/25
002: 190.100.64.128/25 190.100.64.255/25
………………..
128: 190.100.127.128/25 190.100.127.255/25
Total 128 128 16,384
Group 3
For this group, each customer needs 64 addresses. This means the
suffix length is 6 (26 64). The prefix length is then 32 6 26.
001:190.100.128.0/26 190.100.128.63/26
002:190.100.128.64/26 190.100.128.127/26
…………………………
128:190.100.159.192/26 190.100.159.255/26
Total 128 64 8,192
SOLUTION (TOTAL ADDRESS COUNTING)
Key Concept: The length of the network id (prefix) in IP addresses is arbitrary/flexible and is
defined by the network hierarchy.
Consequence:
Routers use the IP address and the length of the prefix for forwarding.
All advertised IP addresses must include a prefix
CIDR EXAMPLE
Example:
Assume that an ISP owns the address block 206.0.64.0/18, which represents 16,384
(232-18=214) IP host addresses
Suppose a client requires 800 host addresses
512=29<800<1024=210 -> 32-10 = 22,
Assigning a /22 block, i.e. 206.0.68.0/22 -> gives a block of 1,024 (210) IP addresses to
client.
CIDR: PREFIX SIZE VS. HOST SPACE
CIDR Block Prefix # of Host Addresses
/27 32 hosts
/26 64 hosts
/25 128 hosts
/24 256 hosts
/23 512 hosts
/22 1,024 hosts
/21 2,048 hosts
/20 4,096 hosts
/19 8,192 hosts
/18 16,384 hosts
/17 32,768 hosts
/16 65,536 hosts
/15 131,072 hosts
/14 262,144 hosts
/13 524,288 hosts
SUBNETTING AND CLASSLESS INTER DOMAIN
ROUTING (CIDR)
Subnetting is done by allocating some of the leading bits of the host number to
indicate a subnet number.
With subnetting, the network prefix and the subnet number make up an extended
network prefix.
The extended prefix can be expressed in terms of a subnetmask or, using CIDR
notation, by adding the length of the extended subnetmask after the IP address.
For example, for Argon, the first byte of the host number (the third byte of the IP
address) is used to denote the subnet number.
128.143.0.0/16 is the IP address of the network (network prefix /16),
128.143.137.0/24 is the IP address of the subnet,
128.143.137.144/24 is the IP address of the host, and
255.255.255.0 is the subnetmask of the host (or subnet prefix /24))
IPV6 - IP VERSION 6
IP Version 6
Is the successor to the currently used IPv4
Specification completed in 1994
Makes improvements to IPv4 (no revolutionary changes)
One (not the only !) feature of IPv6 is a significant increase in size of the IP address
to 128 bits (16 bytes)
IPv6 will solve – for the foreseeable future – the problems with IP addressing
IPV6 HEADER
IPV6 VS. IPV4: ADDRESS COMPARISON
Thanks !