ip addressess1
TRANSCRIPT
-
7/30/2019 IP Addressess1
1/70
TCP/IP Protocol Suite 1
Objectives
Upon completion you wil l be able to:
I P Addresses:
Classful Addressing
Understand I Pv4 addresses and classes
I denti fy the class of an I P address
F ind the network address given an I P address
Understand masks and how to use them
Understand subnets and supernets
-
7/30/2019 IP Addressess1
2/70
TCP/IP Protocol Suite 2
4.1 INTRODUCTION4.1 INTRODUCTION
The identi f ier used in the IP layer of the TCP/I P protocol sui te to identi fyeach device connected to the I nternet is called the Internet address or I P
address. An IP address is a32-bi t addressthat uniquely and universally
def ines the connection of a host or a router to the Internet. I P addresses
are unique. They are unique in the sense that each address def ines one,
and only one, connection to the I nternet. Two devices on the I nternet cannever have the same address.
The topics discussed in this section include:
Address Space
Notation
-
7/30/2019 IP Addressess1
3/70
TCP/IP Protocol Suite 3
An IP address is a 32-bit address.
Note:
-
7/30/2019 IP Addressess1
4/70
-
7/30/2019 IP Addressess1
5/70
-
7/30/2019 IP Addressess1
6/70
TCP/IP Protocol Suite 6
Figure 4.1 Dotted-decimal notati on
-
7/30/2019 IP Addressess1
7/70
-
7/30/2019 IP Addressess1
8/70
TCP/IP Protocol Suite 8
Change the fol lowing IP addresses from binary notation todotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 11100111 11011011 10001011 01101111d. 11111001 10011011 11111011 00001111
Example 1
Solution
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
c. 231.219.139.111 d. 249.155.251.15
-
7/30/2019 IP Addressess1
9/70
-
7/30/2019 IP Addressess1
10/70
TCP/IP Protocol Suite 10
F ind the error, if any, in the following IP addresses:
a. 111.56.045.78 b. 221.34.7.8.20
c. 75.45.301.14 d. 11100010.23.14.67
Example 3
Solution
a. There are no leading zeroes in dotted-decimal notation (045).
b. We may not have more than four numbers in an I P address.
c. I n dotted-decimal notation, each number is less than or equal
to 255; 301 is outside this range.
d. A mixture of binary notation and dotted-decimal notation is not
allowed.
-
7/30/2019 IP Addressess1
11/70
-
7/30/2019 IP Addressess1
12/70
-
7/30/2019 IP Addressess1
13/70
-
7/30/2019 IP Addressess1
14/70
-
7/30/2019 IP Addressess1
15/70
TCP/IP Protocol Suite 15
Figure 4.3 F inding the class in binary notation
-
7/30/2019 IP Addressess1
16/70
TCP/IP Protocol Suite 16
Figure 4.4 F inding the address class
-
7/30/2019 IP Addressess1
17/70
TCP/IP Protocol Suite 17
How can we prove that we have 2,147,483,648 addresses inclass A?
Example 5
Solution
I n class A, only 1 bit def ines the class. The remaining 31 bits
are available for the address. With 31 bits, we can have 231
or 2,147,483,648 addresses.
-
7/30/2019 IP Addressess1
18/70
TCP/IP Protocol Suite 18
F ind the class of each address:
a.00000001 00001011 00001011 11101111
b.11000001 10000011 00011011 11111111
c.10100111 11011011 10001011 01101111
d.11110011 10011011 11111011 00001111
Example 6
Solution
See the procedure in F igure 4.4.
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 f irst bit is 0; the second bit is 1. This is a class B address.
d. The first 4 bits are 1s. This is a class E address..
-
7/30/2019 IP Addressess1
19/70
-
7/30/2019 IP Addressess1
20/70
TCP/IP Protocol Suite 20
F ind the class of each address:
a. 227.12.14.87 b.193.14.56.22 c.14.23.120.8
d. 252.5.15.111 e.134.11.78.56
Example 7
Solution
a. The first byte is 227 (between 224 and 239); the class is D.
b. The first byte is 193 (between 192 and 223); the class is C.
c. The f irst 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.e. The first byte is 134 (between 128 and 191); the class is B.
-
7/30/2019 IP Addressess1
21/70
TCP/IP Protocol Suite 21
I n Example 5 we showed that class A has 231(2,147,483,648)addresses. How can we prove this same fact using dotted-
decimal notation?
Example 8
Solution
The addresses in class A range from 0.0.0.0 to 127.255.255.255.We need to show that the difference between these two numbers
is 2,147,483,648. This is a good exercise because it shows us
how to define the range of addresses between two addresses.
We notice that we are dealing with base 256 numbers here.Each byte in the notation has a weight. The weights are as
follows (see Appendix B):
See Next Slide
-
7/30/2019 IP Addressess1
22/70
-
7/30/2019 IP Addressess1
23/70
TCP/IP Protocol Suite 23
Figure 4.6 Netid and hostid
-
7/30/2019 IP Addressess1
24/70
-
7/30/2019 IP Addressess1
25/70
-
7/30/2019 IP Addressess1
26/70
-
7/30/2019 IP Addressess1
27/70
Fi 4 9 Bl k i l C
-
7/30/2019 IP Addressess1
28/70
TCP/IP Protocol Suite 28
Figure 4.9 Blocks in class C
-
7/30/2019 IP Addressess1
29/70
-
7/30/2019 IP Addressess1
30/70
-
7/30/2019 IP Addressess1
31/70
-
7/30/2019 IP Addressess1
32/70
-
7/30/2019 IP Addressess1
33/70
TCP/IP Protocol Suite 33
Given the network address 17.0.0.0, find the class, the block,and the range of the addresses.
Example 9
Solution
The class is A because the first byte is between 0 and 127. The
block has a netid of 17. The addresses range from 17.0.0.0 to
17.255.255.255.
-
7/30/2019 IP Addressess1
34/70
TCP/IP Protocol Suite 34
Given the network address 132.21.0.0, find the class, the block,and the range of the addresses.
Example 10
Solution
The class is B because the first byte is between 128 and 191.
The block has a netid of 132.21. The addresses range from132.21.0.0 to 132.21.255.255.
-
7/30/2019 IP Addressess1
35/70
TCP/IP Protocol Suite 35
Given the network address 220.34.76.0, find the class, theblock, and the range of the addresses.
Example 11
Solution
The class is C because the f irst byte is between 192
and 223. The block has a netid of 220.34.76. Theaddresses range from 220.34.76.0 to 220.34.76.255.
-
7/30/2019 IP Addressess1
36/70
-
7/30/2019 IP Addressess1
37/70
-
7/30/2019 IP Addressess1
38/70
-
7/30/2019 IP Addressess1
39/70
TCP/IP Protocol Suite 39
The network address is the beginning
address of each block. I t can be foundby applying the defaul t mask to any of
the addresses in the block (including
i tself). I t retains the netid of the blockand sets the hostid to zero.
Note:
-
7/30/2019 IP Addressess1
40/70
-
7/30/2019 IP Addressess1
41/70
-
7/30/2019 IP Addressess1
42/70
-
7/30/2019 IP Addressess1
43/70
TCP/IP Protocol Suite 43
Note that we must not apply the
default mask of one class to an address
belonging to another class.
Note:
-
7/30/2019 IP Addressess1
44/70
Figure 4.12 Mul tihomed devices
-
7/30/2019 IP Addressess1
45/70
TCP/IP Protocol Suite 45
g
-
7/30/2019 IP Addressess1
46/70
TCP/IP Protocol Suite 46
Table 4.3 Special addresses
Figure 4.13 Network address
-
7/30/2019 IP Addressess1
47/70
TCP/IP Protocol Suite 47
g
Figure 4.14 Example of dir ect broadcast address
-
7/30/2019 IP Addressess1
48/70
TCP/IP Protocol Suite 48
g p
-
7/30/2019 IP Addressess1
49/70
-
7/30/2019 IP Addressess1
50/70
Figure 4.17 Example of specific host on this network
-
7/30/2019 IP Addressess1
51/70
TCP/IP Protocol Suite 51
Figure 4.18 Example of l oopback address
-
7/30/2019 IP Addressess1
52/70
TCP/IP Protocol Suite 52
-
7/30/2019 IP Addressess1
53/70
TCP/IP Protocol Suite 53
Table 4.5 Addresses for pr ivate networks
-
7/30/2019 IP Addressess1
54/70
TCP/IP Protocol Suite 54
Multicast delivery wil l be discussed in
depth in Chapter 15.
Note:
Table 4 5 Category addresses
-
7/30/2019 IP Addressess1
55/70
TCP/IP Protocol Suite 55
Table 4.5 Category addresses
-
7/30/2019 IP Addressess1
56/70
TCP/IP Protocol Suite 56
Table 4.6 Addresses for conferencing
-
7/30/2019 IP Addressess1
57/70
4 4 SUBNETTING AND
-
7/30/2019 IP Addressess1
58/70
TCP/IP Protocol Suite 58
4.4 SUBNETTING AND
SUPERNETTING
I n the previous sections we discussed the problems associated withclassful addressing. Specif ically, the network addresses available for
assignment to organizations are close to depletion. This is coupled with
the ever-increasing demand for addresses from organizations that want
connection to the Internet. I n this section we brief ly discuss two
solutions: subnetting and supernetting.
The topics discussed in this section include:
Subnetting
Supernetting
Supernet MaskObsolescence
-
7/30/2019 IP Addressess1
59/70
TCP/IP Protocol Suite 59
I P addresses are designed with two
levels of hierarchy.
Note:
Figure 4.20 A network wi th two levels of hierarchy (not subnetted)
-
7/30/2019 IP Addressess1
60/70
TCP/IP Protocol Suite 60
Figure 4.21 A network wi th three levels of hierarchy (subnetted)
-
7/30/2019 IP Addressess1
61/70
TCP/IP Protocol Suite 61
-
7/30/2019 IP Addressess1
62/70
Figure 4.23 Hierarchy concept in a telephone number
-
7/30/2019 IP Addressess1
63/70
TCP/IP Protocol Suite 63
Figure 4.24 Defaul t mask and subnet mask
-
7/30/2019 IP Addressess1
64/70
TCP/IP Protocol Suite 64
-
7/30/2019 IP Addressess1
65/70
TCP/IP Protocol Suite 65
What is the subnetwork address if the destination address is200.45.34.56 and the subnet mask is 255.255.240.0?
Example 15
Solution
We apply the AND operation on the address and the subnetmask.
Address 11001000 00101101 00100010 00111000
Subnet M ask 11111111 11111111 11110000 00000000
Subnetwork Address 11001000 00101101 00100000 00000000.
Figure 4.25 Comparison of a defaul t mask and a subnet mask
-
7/30/2019 IP Addressess1
66/70
TCP/IP Protocol Suite 66
Figure 4.26 A supernetwork
-
7/30/2019 IP Addressess1
67/70
TCP/IP Protocol Suite 67
-
7/30/2019 IP Addressess1
68/70
Figure 4.27 Comparison of subnet, defaul t, and supernet masks
-
7/30/2019 IP Addressess1
69/70
TCP/IP Protocol Suite 69
-
7/30/2019 IP Addressess1
70/70
The idea of subnetting and
supernetting of classful addresses isalmost obsolete.
Note: