Download - Dcn19 IP Addresses
![Page 1: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/1.jpg)
Network LayerNetwork Layer
![Page 2: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/2.jpg)
Position of network layer
![Page 3: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/3.jpg)
Network layer duties
![Page 4: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/4.jpg)
Internetwork
![Page 5: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/5.jpg)
Links in an internetwork
![Page 6: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/6.jpg)
Network layer in an internetwork
![Page 7: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/7.jpg)
Network layer at the source
![Page 8: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/8.jpg)
Network layer at a router
![Page 9: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/9.jpg)
Network layer at the destination
![Page 10: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/10.jpg)
AddressingAddressing
Internet Address
Classful Addressing
Supernetting
Subnetting
Classless Addressing
Dynamic Address Configuration
Network Address Translation
![Page 11: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/11.jpg)
An IPv4 address is 32 bits long.
Note
![Page 12: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/12.jpg)
The IPv4 addresses are unique and universal.
Note
![Page 13: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/13.jpg)
The address space of IPv4 is 232 or 4,294,967,296.
Note
![Page 14: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/14.jpg)
Figure Dotted-decimal notation and binary notation for an IPv4 address
![Page 15: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/15.jpg)
Change the following IPv4 addresses from binary notation to dotted-decimal notation.
Example
SolutionWe replace each group of 8 bits with its equivalent decimal number and add dots for separation.
![Page 16: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/16.jpg)
In classful addressing, the address space is divided into five
classes: A, B, C, D, and E.
NoteNote::
![Page 17: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/17.jpg)
Finding the class in binary notation
![Page 18: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/18.jpg)
Finding the address class
![Page 19: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/19.jpg)
ExampleExample
Find the class of each address:
a. 000000001 00001011 00001011 11101111
b. 111111110011 10011011 11111011 00001111
SolutionSolution
a. The first bit is 0; this is a class A address.b. The first 4 bits are 1s; this is a class E address.
![Page 20: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/20.jpg)
Finding the class in decimal notation
![Page 21: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/21.jpg)
ExampleExample
Find the class of each address:
a. 227.12.14.87
b. 252.5.15.111
c. 134.11.78.56
SolutionSolutiona. The first byte is 227 (between 224 and 239); the class is D.b. The first byte is 252 (between 240 and 255); the class is E.c. The first byte is 134 (between 128 and 191); the class is B.
![Page 22: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/22.jpg)
Netid and hostid
![Page 23: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/23.jpg)
Blocks in class A
![Page 24: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/24.jpg)
Millions of class A addresses are wasted.
NoteNote::
![Page 25: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/25.jpg)
Blocks in class B
![Page 26: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/26.jpg)
Many class B addresses are wasted.
NoteNote::
![Page 27: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/27.jpg)
The number of addresses in class C is smaller than the needs
of most organizations.
NoteNote::
![Page 28: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/28.jpg)
Blocks in class C
![Page 29: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/29.jpg)
Network address
![Page 30: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/30.jpg)
![Page 31: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/31.jpg)
In classful addressing, the network address is the one that is
assigned to the organization.
NoteNote::
![Page 32: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/32.jpg)
ExampleExample
Given the address 23.56.7.91, find the network address.
SolutionSolutionThe class is A. Only the first byte defines the netid. We can find the network address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the network address is 23.0.0.0.
![Page 33: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/33.jpg)
A network address is different from a netid. A network address
has both netid and hostid, with 0s for the hostid.
NoteNote::
![Page 34: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/34.jpg)
Sample internet
![Page 35: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/35.jpg)
IP addresses are designed with two levels of hierarchy.
NoteNote::
![Page 36: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/36.jpg)
In classful addressing, a large part of the available addresses were wasted.
Note
![Page 37: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/37.jpg)
Classful addressing, which is almost obsolete, is replaced with classless
addressing.
Note
![Page 38: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/38.jpg)
Classless addressing:-
In classless addressing, when an entity small or large, needs to be connected to Internet, it is granted a block of addresses
Restrictions The address in the block must be contiguous, one after the another. The number of addresses in a block must be power of 2 The first address must be evenly divisible by number of addresses.
![Page 39: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/39.jpg)
Figure shows a block of addresses, in both binary and dotted-decimal notation, granted to a small business that needs 16 addresses.
We can see that the restrictions are applied to this block. The addresses are contiguous. The number of addresses is a power of 2 (16 = 24), and the first address is divisible by 16. The first address, when converted to a decimal number, is 3,440,387,360, which when divided by 16 results in 215,024,210.
Example
![Page 40: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/40.jpg)
In IPv4 addressing, a block of addresses can be defined as
x.y.z.t /n (slash notation)in which x.y.z.t defines one of the
addresses and the /n defines the mask.
Note
![Page 41: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/41.jpg)
The first address in the block can be found by setting the rightmost
32 − n bits to 0s.
Note
![Page 42: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/42.jpg)
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?
SolutionThe binary representation of the given address is
11001101 00010000 00100101 00100111If we set 32−28 rightmost bits to 0, we get
11001101 00010000 00100101 0010000 or
205.16.37.32. This is actually the block shown in previous example
Example
![Page 43: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/43.jpg)
The last address in the block can be found by setting the rightmost
32 − n bits to 1s.
Note
![Page 44: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/44.jpg)
Find the last address for the block in previous example
SolutionThe binary representation of the given address is
11001101 00010000 00100101 00100111If we set 32 − 28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111 or
205.16.37.47This is actually the block shown in previous example
Example
![Page 45: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/45.jpg)
The number of addresses in the block can be found by using the formula
232−n.
Note
![Page 46: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/46.jpg)
Find the number of addresses if one of the address in a block is 205.16.37.39/28
Example
SolutionThe value of n is 28, which means that numberof addresses is 2 32−28 or 16.
![Page 47: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/47.jpg)
Alternate way to find first and last address
a. The first address can be found by ANDing the given addresses with the mask. ANDing here is done bit by bit. The result of ANDing 2 bits is 1 if both bits are 1s; the result is 0 otherwise.
11001101 00010000 00100101 00100111
![Page 48: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/48.jpg)
b. The last address can be found by ORing the given addresses with the complement of the mask. ORing here is done bit by bit. The result of ORing 2 bits is 0 if both bits are 0s; the result is 1 otherwise. The complement of a number is found by changing each 1 to 0 and each 0 to 1.
![Page 49: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/49.jpg)
c. The number of addresses can be found by complementing the mask, interpreting it as a decimal number, and adding 1 to it.
![Page 50: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/50.jpg)
IP address
![Page 51: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/51.jpg)
Each address in the block can be considered as a two-level
hierarchical structure: the leftmost n bits (prefix) define
the network;the rightmost 32 − n bits define
the host.
Note
![Page 52: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/52.jpg)
Three-level hierarchy in an IPv4 address
![Page 53: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/53.jpg)
Suppose an organization is given the block 17.12.40.0/26, which contains 64 addresses. The organization has three offices needs to divide addresses in to three sub blocks of 32, 16, 16
Three-level hierarchy in an IPv4 address
![Page 54: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/54.jpg)
Configuration and addresses in a subnetted network
![Page 55: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/55.jpg)
An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses to three groups of customers as follows:a. The first group has 64 customers; each needs 256 addresses.b. The second group has 128 customers; each needs 128 addresses.c. The third group has 128 customers; each needs 64 addresses.Design the subblocks and find out how many addresses are still available after these allocations.
Example
![Page 56: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/56.jpg)
Solution
Example
Group 1For this group, each customer needs 256 addresses. This means that 8 (log2 256) bits are needed to define each host. The prefix length is then 32 − 8 = 24. The addresses are
![Page 57: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/57.jpg)
Example
Group 2For this group, each customer needs 128 addresses. This means that 7 (log2 128) bits are needed to define each host. The prefix length is then 32 − 7 = 25. The addresses are
![Page 58: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/58.jpg)
Example
Group 3For this group, each customer needs 64 addresses. This means that 6 (log264) bits are needed to each host. The prefix length is then 32 − 6 = 26. The addresses are
Number of granted addresses to the ISP: 65,536Number of allocated addresses by the ISP: 40,960Number of available addresses: 24,576
![Page 59: Dcn19 IP Addresses](https://reader035.vdocuments.us/reader035/viewer/2022081421/577cce131a28ab9e788d3d32/html5/thumbnails/59.jpg)
Figure An example of address allocation and distribution by an ISP