Presentation is loading. Please wait.

Presentation is loading. Please wait.

Net 221D : Computer Networks Fundamentals

Similar presentations


Presentation on theme: "Net 221D : Computer Networks Fundamentals"— Presentation transcript:

1 Net 221D : Computer Networks Fundamentals
Lab 5 Net 221D : Computer Networks Fundamentals T.A.Maram AlMuhareb

2 Question 1 What are the differences between classful addressing and classless addressing in IPv4? Classful addressing assigns an organization a Class A, Class B, or Class C block of addresses. Classless addressing assigns an organization a block of contiguous addresses based on its needs. Computer networks / Andrew S. Tanenbaum-- 5th ed

3 Classes and blocks Behrouz A. Forouzan” Data communications and Networking

4 Q 2 Explain why most of the addresses in class A are wasted. Explain why a medium-size or large-size corporation does not want a block of class C addresses. Behrouz A. Forouzan” Data communications and Networking

5 Explain 2 when an organization requested a block of addresses, it was granted one in class A, B, or C. Class A addresses were designed for large organizations with a large number of attached hosts or routers. Class B addresses were designed for midsize organizations with tens of thousands of attached hosts or routers. Class C addresses were designed for small organizations with a small number of attached hosts or routers. Behrouz A. Forouzan” Data communications and Networking

6 Explain 2 We can see the flaw in this design. A block in class A address is too large for almost any organization. This means most of the addresses in class A were wasted and were not used. A block in class B is also very large, probably too large for many of the organizations that received a class B block. A block in class C is probably too small for many organizations. Behrouz A. Forouzan” Data communications and Networking

7 Sol.2 A block in class A address is too large for almost any organization. This means most of the addresses in class A are wasted and not used. (/8) A block in class C is probably too small for many organizations. (/24) Behrouz A. Forouzan” Data communications and Networking

8 Ex3. . What is the network address in a block of addresses? How can we find the network address if one of the addresses in a block is given? The network address in a block of addresses is the first address. The mask can be ANDed with any address in the block to find the network address Behrouz A. Forouzan” Data communications and Networking

9 Sol.3 In classful addressing, an IP address in class A, B, or C is divided into netid and hostid. white. Note that the concept does not apply to classes D and E. In class A, one byte defines the netid and three bytes define the hostid. In class B, two bytes define the netid and two bytes define the hostid. In class C, three bytes define the netid and one byte defines the hostid. Behrouz A. Forouzan” Data communications and Networking

10 Sol.3 mask The mask can help us to find the netid and the hostid. For example, the mask for a class A address has eight 1s, which means the first 8 bits of any address in class A define the netid; the next 24 bits define the hostid. Behrouz A. Forouzan” Data communications and Networking

11 Q 4 . What is the address space in a system with 64-bit addresses?
Behrouz A. Forouzan” Data communications and Networking

12 Sol 4 2^64 An 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 is 2^N because each bit can have two different values (0 or 1) and N bits can have 2^N values. Behrouz A. Forouzan” Data communications and Networking

13 Q5 An address space has a total of 1024 addresses. How many bits are needed to represent an address? Behrouz A. Forouzan” Data communications and Networking

14 Sol 5 Log2(1024) = 10 bits Behrouz A. Forouzan” Data communications and Networking

15 Q6 Find the class of the following IP addresses. a (C : ) b (D : ) Behrouz A. Forouzan” Data communications and Networking

16 Classes Behrouz A. Forouzan” Data communications and Networking

17 Q7 Find the class of the following IP addresses.
b (C :110) (D :1110) Behrouz A. Forouzan” Data communications and Networking

18 Q8 Find the netid and the hostid of the following IP addresses.
b ( A : net 114 – host ) ( C : – host 12 ) Behrouz A. Forouzan” Data communications and Networking

19 Q9 In a block of addresses, we know the IP address of one host is /16. What are the first address (network address) and the last address (limited broadcast address) in this block? Behrouz A. Forouzan” Data communications and Networking

20 Mask In IPv4 addressing, a block of addresses can be defined as x.y.z.t /n in which x.y.z.t defines one of the addresses and the /n defines the mask. The first address in the block can be found by setting the rightmost 32 − n bits to 0s. The last address in the block can be found by setting the rightmost 32 − n bits to 1s. The number of addresses in the block can be found by using the formula 2 32−𝑛

21 Sol 9 – a First : by ANDing the given addresses with the mask
Behrouz A. Forouzan” Data communications and Networking

22 Sol 9 – b Last: The last address can be found by ORing the given addresses with the complement of the mask. Behrouz A. Forouzan” Data communications and Networking

23 Q 10 Write the following masks in slash notation (In).
b >> 's c >> 's /8 /19 /20 Behrouz A. Forouzan” Data communications and Networking

24 Explain Q10 There are two prevalent notations to show an IPv4 address:
binary notation and dotted decimal notation.

25 Q 11 11. Find the range of addresses in the following blocks.
The number of addresses in the block can be found by using the formula 2^32- n Behrouz A. Forouzan” Data communications and Networking

26 Sol 11 - a The number of address in this block is 2^(32-23)= 2^9 = 512
We need to add 511 addresses to the first to find the last address ( one less , because the first address is given) → ( = 511 ) From To ( the rightmost 9 bits are available for address ) Behrouz A. Forouzan” Data communications and Networking

27 Sol 11 - b b. 180.34.64.64/30 The number of address in this block is
2^(32-30)= 2^2 = 4 We need to add 3 addresses to the first to find the last address From To

28 Q 12 12. An organization is granted the block /24. The administrator wants to create 32 subnets. a. Find the subnet mask. b. Find the number of addresses in each subnet. Behrouz A. Forouzan” Data communications and Networking

29 Sol 12 Find the subnet mask. Log 2 (32)= 5 24+5= /29
Find the number of addresses in each subnet. The number of addresses can be found by complementing the mask, interpreting it as a decimal number, and adding 1 to it Or 2^32-29= 2^3= 8

30 Q 13 Assume the following network that containing five nodes connected as in shown. Apply Distance Vector Routing to fill the entries of routing tables at each node. Discuss all phases through which the tables will be finally stablized. Behrouz A. Forouzan” Data communications and Networking

31 Q 13 Behrouz A. Forouzan” Data communications and Networking

32 Sol.5 (a ) phase 1 Initialization of tables in distance vector routing
- 2 5 3 2 - 4 3 2 5 3 - - 3 4 5 - 4 E D Behrouz A. Forouzan” Data communications and Networking E’s table D’s table

33 Sol.5(b) phase 2 Updating in distance vector routing
4 10 C 9 5 - 2 5 3 - 2 5 9 C 3 Behrouz A. Forouzan” Data communications and Networking

34 Sol.5(b) phase 2 Updating in distance vector routing
4 3 4 B 2 6 5 - 2 5 9 C 3 Received from B - 2 5 B 3 Behrouz A. Forouzan” Data communications and Networking

35 Sol.5 (C ) phase 3 Distance vector routing tables
- 2 5 B 3 2 - 4 3 5 A 2 5 3 - 5 A 8 5 B 3 - 4 8 5 - 4 E D Behrouz A. Forouzan” Data communications and Networking E’s table D’s table

36 Behrouz A. Forouzan” Data communications and Networking


Download ppt "Net 221D : Computer Networks Fundamentals"

Similar presentations


Ads by Google