Upload
anjali-bhatia
View
235
Download
0
Embed Size (px)
Citation preview
8/2/2019 15361 Ipv4 Addresses
1/30
Topics
What is an IP address ?
Types of IP addressing
Classes of IP address Networks & subnetworks
IP addresses and routing
8/2/2019 15361 Ipv4 Addresses
2/30
What is an IP address?
IP (Internet Protocol) address device used by routers, to select best path
from source to destination, across networksand internetworks
network layer address, consisting ofNETWORK portion, and HOST portion
logical address,assigned in software by
network administrator part of a hierarchical numbering scheme -
unique, for reliable routing may be assigned to a host pc, or router port
8/2/2019 15361 Ipv4 Addresses
3/30
Types of IP address
Static address
Dynamic address
8/2/2019 15361 Ipv4 Addresses
4/30
Types of IP address
Static IP address
manually input by network administrator
manageable for small networks
requires careful checks to avoid duplication
8/2/2019 15361 Ipv4 Addresses
5/30
Types of IP address
Dynamic IP address
examples - BOOTP, DHCP
assigned by server when host boots derived automatically from a range of
addresses
duration of lease negotiated, then address
released back to server
8/2/2019 15361 Ipv4 Addresses
6/30
IPv4 ADDRESSES
1) An IPv4 address is 32 bits long.2) The IPv4 addresses are unique and universal.
Address SpaceAn address space is the total number of addresses
used by the protocol. If a protocol uses N bits to define
an address, the address space ispower(2,N) becauseeach bit can have two different values (0 or 1)
and N bits can have power(2,N) values.
8/2/2019 15361 Ipv4 Addresses
7/30
Class A IP address
1st octet = network address, octets 2-4 =host address
1st bits of 1st octet set to 0
up to (2^24- 2) host addresses
8/2/2019 15361 Ipv4 Addresses
8/30
The address space of IPv4 is power(2,32)or
4,294,967,296.
8/2/2019 15361 Ipv4 Addresses
9/30
Binary Notation (Octet Notation)
01110101 10010101 00011101 00000010
Dotted-Decimal Notation
117.149.29.2
8/2/2019 15361 Ipv4 Addresses
10/30
Example 19.1
Change the following IPv4 addresses from
binary notation to dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
8/2/2019 15361 Ipv4 Addresses
11/30
We replace each group of 8 bits with its
equivalent decimal number (see Appendix B)
and add
dots for separation.
a. 129.11.11.239
b. 193.131.27.255
8/2/2019 15361 Ipv4 Addresses
12/30
8/2/2019 15361 Ipv4 Addresses
13/30
Solution
We replace each decimal number with its
binary equivalent (see Appendix B).
a. 01101111 00111000 00101101 01001110
b. 11011101 00100010 00000111 01010010
8/2/2019 15361 Ipv4 Addresses
14/30
8/2/2019 15361 Ipv4 Addresses
15/30
Classful Addressing
In classful addressing, the address space is
divided into five classes:
A, B, C, D, and E.
In classful addressing, a large part of theavailable addresses were wasted.
8/2/2019 15361 Ipv4 Addresses
16/30
17
Addressing IPV4
Courtesy - From Fig. 19.10 Page 479, Data Communications and Networks, 3rd edition, Forouzan, McGrawHill
Network ID, Host ID
Class A 128 blocks (First Byte), 16,777,216 hosts
Class B 16,384 blocks (First & Second Byte), 65536 hosts
Class C 2,097,152 blocks (First, Second, Third byte), 256 hosts
Class D 1 block, Multicasting
8/2/2019 15361 Ipv4 Addresses
17/30
18
Finding the Class
Courtesy - From Fig. 19.12 Page 480, Data Communications and Networks, 3rd edition, Forouzan, McGrawHill
8/2/2019 15361 Ipv4 Addresses
18/30
19
Netid and Hostid
Courtesy - From Fig. 19.13 Page 481, Data Communications and Networks, 3rd edition,Forouzan, McGrawHill
8/2/2019 15361 Ipv4 Addresses
19/30
Example 19.4
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
8/2/2019 15361 Ipv4 Addresses
20/30
Solution
a. The first bit is O. This is a class A address.
b. The first 2 bits are 1; the third bit is O. Thisis a class C address.
c. The first byte is 14 (between 0 and 127); the
class is A.
d. The first byte is 252 (between 240 and 255);
the class is E.
8/2/2019 15361 Ipv4 Addresses
21/30
8/2/2019 15361 Ipv4 Addresses
22/30
November 29, 2004 Prof. Paul Lin 23
Masks
Courtesy - From Table 19.1 Page 489, Data Communications and Networks, 3rd edition, Forouzan, McGrawHill
Class In BinaryIn Dotted-
Decimal Using Slash
A 11111111 00000000 00000000 00000000 255.0.0.0 /8
B 11111111 11111111 00000000 00000000 255.255.0.0 /16
C 11111111 111111111 11111111 00000000 255.255.255.0 /24
8/2/2019 15361 Ipv4 Addresses
23/30
Explain the Net id and Host id,mask of the
following IP addresses:(a)114.34.2.8
(b)19.20.21.5 (c)220.34.6.8?
8/2/2019 15361 Ipv4 Addresses
24/30
So now it is clear that the subnet mask for theaddress 114.34.2.8 is 255.0.0.0The subnet mask for the address 19.20.21.5 is255.0.0.0
The subnet mask for the address 220.34.6.8 is255.255.255.0
So it is clear 114 is the network id and 34.2.8 is
the host address19 is the network id 20.21.5 is the host id220.34.6 is the network id and 8 is the host id
8/2/2019 15361 Ipv4 Addresses
25/30
8/2/2019 15361 Ipv4 Addresses
26/30
Mask
A better way to define a block of addresses is
to select any address in the block and the
mask. As we discussed before, a mask is a 32-
bit number in which the n leftmost bits
are Is and the 32 - n rightmost bits are Os.
8/2/2019 15361 Ipv4 Addresses
27/30
8/2/2019 15361 Ipv4 Addresses
28/30
Example 19.6
A block of addresses is granted to a small
organization. We know that one of the
addresses is
205.16.37.39/28. What is the first address in
the block?
8/2/2019 15361 Ipv4 Addresses
29/30
Solution
The binary representation of the given
address is 11001101 00010000 00100101
00100 I 11. If we
set 32 - 28 rightmost bits to 0, we get
11001101 000100000100101 0010000 or
205.16.37.32.
8/2/2019 15361 Ipv4 Addresses
30/30
Solution The binary representation of the given address is 11001101
000100000010010100100111. If we
set 32 - 28 rightmost bits to 1, we get 11001101 00010000
001001010010 1111 or 205.16.37.47. This is actually the block shown in Figure 19.3.
Number of Addresses The number of addresses in the blockis the difference between
the last and first address. It can easily be found using the
formula 232- n. The number of addresses in the block can be found by
using the formula 232- n