Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapters 4 & 5 Addressing Part 2 of 2

Similar presentations


Presentation on theme: "Chapters 4 & 5 Addressing Part 2 of 2"— Presentation transcript:

1 Chapters 4 & 5 Addressing Part 2 of 2
Dr. Clincy Lecture

2 Chapter 4 Subnetting Dr. Clincy Lecture

3 SUBNETTING When we talked about CLASSFUL addressing – we realized the problem of wasted host addresses and depleting available network addresses. In subnetting, a network is divided into several smaller networks called subnetworks or subnets – each subnet will have it’s own address Typically, there are 2 steps in reaching a destination: first we must reach the network (netid) and then we reach the destination (hostid) Dr. Clincy Lecture

4 A network with two levels of hierarchy (not subnetted)
The 2 level approach is not enough some times – you can only have 1 physical network – in example, all host are at the same level – no grouping Dr. Clincy Lecture

5 A network with three levels of hierarchy (subnetted)
(0-63) (64-127) With subnetting, hosts can be grouped ( ) ( ) Dr. Clincy Lecture

6 Addresses in a network with and without subnetting
With subnetting, there are 3 levels (versus 2 levels). Partition the hostid space into subnetid and hostid. (1st) network, (2nd) subnetwork and (3rd) host Dr. Clincy Lecture

7 Similar to Hierarchy concept in a telephone number
Dr. Clincy Lecture

8 Default mask and subnet mask
Dr. Clincy Lecture

9 Finding the Subnet Address
Given an IP address, we can find the subnet address the same way we found the network address in the previous chapter. We apply the mask to the address. We can do this in two ways: straight or short-cut. Straight Method In the straight method, we use binary notation for both the address and the mask and then apply the AND operation to find the subnet address. Short-Cut Method ** If the byte in the mask is 255, copy the byte in the address. ** If the byte in the mask is 0, replace the byte in the address with 0. ** If the byte in the mask is neither 255 nor 0, we write the mask and the address in binary and apply the AND operation. Dr. Clincy Lecture

10 Subnet Mask Form In the early days, non-contiguous 1’s masks were used (0’s and 1’s could alternate) Today, as a best practice, contiguous 1’s masks are used In either case, the black box can perform the “masking” process Dr. Clincy Lecture

11 Example 1 What is the subnetwork address if the destination address is and the subnet mask is ? Solution The subnetwork address is Dr. Clincy Lecture

12 Recall - 5-bit Address Space Illustration
1-bit Netid case (no subnets) 16 addresses/block Number of blocks: 2 Address range per block: 0 to 15 Netids: 0, 1 Network Addresses : 00000, 10000 Broadcast Addresses: 01111, 11111 Dr. Clincy Lecture

13 5-bit Address Space Illustration
subnet 1-bit Subnet case Number of blocks/networks: 2 Number subnets per block: 2 8 addresses/subnet Address range per subnet: 0 to 7 Subnet ids: 0, 1 Network Addresses : 00000, 01000, 10000, 11000 Broadcast Addresses: 00111, 01111, 10111, 11111 Dr. Clincy Lecture

14 5-bit Address Space Illustration
subnet 2-bit Subnet case Number of blocks/networks: 2 Number subnets per block: 4 4 addresses/subnet Address range per subnet: 0 to 3 Subnet ids: 00, 01, 10, 11 Network Addresses : 00000, 00100, 01000, 01100 10000, 10100, 11000, 11100 Broadcast Addresses: 00011, 00111, 01011, 01111 10011, 10111, 11011, 11111 Dr. Clincy Lecture

15 Example 2 What is the subnetwork address if the destination address is and the mask is ? Dr. Clincy Lecture

16 Comparison of a default mask and
a subnet mask A portion of the hostid space is divided between some contiguous 1’s and 0’s Dr. Clincy Lecture

17 The number of subnets must be a power of 2.
Determine the number of subnets added by looking at the number of 1s added to the default mask and performing 2 raised to that number For example, 23 = 8 subnets Dr. Clincy Lecture

18 Example 3 A company is granted the site address (class C). The company needs six subnets. Design the subnets. Solution The number of 1s in the default mask is 24 (class C). The company needs six subnets. This number 6 is not a power of 2. The next number that is a power of 2 is 8 (23). We need 3 more 1s in the subnet mask. The total number of 1s in the subnet mask is 27 (24 + 3). The total number of 0s is 5 ( ). The mask would be Dr. Clincy Lecture

19 The number of subnets is 8.
Solution (Continued) or The number of subnets is 8. The number of addresses in each subnet is 25 (5 is the number of 0s) or 32. Dr. Clincy Lecture

20 Example 3 Dr. Clincy Lecture

21 Example 4 Solution The mask is 11111111 11111111 11111111 11000000 or
A company is granted the site address (class B). The company needs 1000 subnets. Design the subnets. Solution The number of 1s in the default mask is 16 (class B). The company needs 1000 subnets. This number is not a power of 2. The next number that is a power of 2 is 1024 (210). We need 10 more 1s in the subnet mask. The total number of 1s in the subnet mask is 26 ( ). The total number of 0s is 6 ( ). The mask is or The number of subnets is 1024. The number of addresses in each subnet is 26 (6 is the number of 0s) or 64. Dr. Clincy Lecture

22 Example 4 Subtract 63 from 255 to get 192 Dr. Clincy Lecture

23 SUPERNETTING Although class A and B addresses are dwindling – there are plenty of class C addresses The problem with C addresses is, they only have 256 hostids – not enough for any midsize to large size organization – especially if you plan to give every computer, printer, scanner, etc. multiple IP addresses Supernetting allows an organization the ability to combine several class C blocks in creating a larger range of addresses Note: breaking up a network = subnetting Note: combining Class-C networks = supernetting Dr. Clincy Lecture

24 Assigning or Choosing Class C Blocks
When assigning class C blocks, there are two approaches: (1) random and (2) superblock Random Approach: the routers will see each block as a separate network and therefore, for each block there would be an entry in the routing table – a router contains an entry for each destination network Superblock Approach: instead of multiple routing table entries, there would be a single entry. However, the choices of blocks need to follow a set of rules: #1 – the # of blocks must be a power of 2 (ie. 1, 2, 4, 8 …) #2 – blocks must be contiguous (no gaps between blocks) #3 – the 3rd byte of the first address in the superblock must be evenly divisible by the number of blocks – ie. if the # of blocks is N, the 3rd byte must be divisible by N Dr. Clincy Lecture

25 Example 5 A company needs 600 addresses. Which of the following set of class C blocks can be used to form a supernet for this company? Solution 1: No, there are only three blocks. Must be a power of 2 2: No, the blocks are not contiguous. 3: No, 31 in the first block is not divisible by 4. 4: Yes, all three requirements are fulfilled. (1. Power of 2, 2. Contiguous and 3. 3rd byte of 1st address is divisible by 4: 32/4=8) Dr. Clincy Lecture

26 Example 8 A supernet has a first address of and a supernet mask of How many blocks are in this supernet and what is the range of addresses? Solution The default mask has 24 1s because is a class C. Because the supernet mask is , the supernet has 21 1s. Since the difference between the default and supernet masks is 3, there are 23 or 8 blocks in this supernet. Because the blocks start with and must be contiguous, the blocks are , , ……… The first address is The last address is The total number of addresses is 8 x 256 = 2048 Dr. Clincy Lecture

27 Explain Supernetting Conceptually
Back out this bit from netid into host id Causes these 2 blocks to combine as a single block Dr. Clincy Lecture

28 Ch 5 Classless Addressing
Dr. Clincy Lecture

29 Variable-length subnetting
Suppose you were granted a Class C address – this mean you would have 8 bits to play with Also, suppose you needed 5 subnets consisting of the following # of hosts: 60, 60, 60, 30 and 30 If you used a 2 bit subnet mask – can get 4 subnets with 64 stations each (too big) If you used a 3 bit subnet mask – can get 8 subnets with 32 stations each (too small) What’s the solution ? Dr. Clincy Lecture

30 Variable-length Subnetting
Solution: used 2 subnet masks – one applied after the other Could use a 2 bit subnet mask and get 4 subnets with 64 stations each - this would satisfy the three 60-host subnet requirement – therefore the subnet mask would be (192) We could then further divide one of the 64-host subnets into two 32-host subnets by applying this mask (224) after this mask of (192) is used Dr. Clincy Lecture

31 Classful Addressing is Obsolete
Guess What ? Classful Addressing is Obsolete However, understanding the classful approach will help you easily understand the classless approach Quickly explain classless vs classful (leave address aggregation for the routing topics) Dr. Clincy Lecture

32 CLASSLESS ADDRESSING Recall the problems with Classful addressing – you have to get a predefined block of addresses – in most cases, the block is either too large or too small In the 1990’s, ISP came into prominence – they provide Internet access for individuals to midsize organizations that don’t want sponsor their own Internet service (ie. , etc). The ISP’s are granted several B and C blocks of addresses and they subdivide their address space into groups of 2, 4, 8, 16, etc.. – blocks can be variable length Because of the up rise of ISP’s, in 1996, the Internet Authorities announced a new architecture called Classless Addressing (making classful addressing obsolete) Dr. Clincy Lecture

33 Number of Addresses in a Classless Block
There are two conditions Condition 1: the number of addresses in a block; it must be a power of 2 (2, 4, 8, . . .). A household may be given a block of 2 addresses. A small business may be given 16 addresses. A large organization may be given 1024 addresses. Another Condition: The beginning address must be evenly divisible by the number of addresses. For example, if a block contains 4 addresses, the beginning address must be divisible by 4. If the block has less than 256 addresses, we need to check only the rightmost byte. If it has less than 65,536 addresses, we need to check only the two rightmost bytes, and so on. Dr. Clincy Lecture

34 Classless Subnet Illustration
Netid subnetid 1 Dr. Clincy Lecture

35 Example 9 Which of the following can be the beginning address of a block that contains 16 addresses? Solution The address is eligible because 32 is divisible by 16. The address is eligible because 80 is divisible by 16. Dr. Clincy Lecture

36 Example 10 Which of the following can be the beginning address of a block that contains 1024 addresses? Solution To be divisible by 1024, the rightmost byte of an address should be 0 because any value in that first byte will be a fraction of 1024 (ie. 0 to 255). To be divisible by 1024, the rightmost byte should be 0 and the second rightmost byte must be divisible by 4 because for every unique number in the second byte position, there exist 256 addresses in the first byte position that maps to it. To get 1024 addresses overall, you will need an increment of 4 in the 2nd byte position. Therefore, the 2nd byte needs to be divisible by 4. Only the address meets this condition. Dr. Clincy Lecture

37 Mask Recall the Classful approach, only given an IP – the user defined their mask For the Classless approach, when an org is given a block, it’s given both the starting address and the mask – these two pieces of info defines the entire block For classless case, instead of writing out the full mask, we just specify the number of 1’s in the mask and append it to the address – this is called slash notation or CIDR (classless interdomain routing) notation For classless addressing, the prefix refers to the common part of the address (ie. network portion) For classless addressing, the suffix refers to the varying part of the address (ie. host portion) Dr. Clincy Lecture

38 A block in classes A, B, and C can easily be represented in slash notation as A.B.C.D/ n where n is either 8 (class A), 16 (class B), or (class C). Dr. Clincy Lecture

39 There are only 8 addresses in this block.
Example 11 A small organization is given a block with the beginning address and the prefix length /29 (in slash notation). What is the range of the block? Solution The beginning address is To find the last address we keep the first 29 bits and change the last 3 bits to 1s. Beginning: Ending : There are only 8 addresses in this block. Dr. Clincy Lecture

40 Example 13 What is the network address if one of the addresses is /27? Solution The prefix length is 27, which means that we must keep the first 27 bits as is and change the remaining bits (5) to 0s. The 5 bits affect only the last byte. The last byte is Changing the last 5 bits to 0s, we get or 64. The network address is /27. Dr. Clincy Lecture

41 Example 14 An organization is granted the block /26. The organization needs to have four subnets. What are the subnet addresses and the range of addresses for each subnet? Solution The suffix length is 6. This means the total number of addresses in the block is 64 (26). If we create four subnets, each subnet will have 16 addresses. Dr. Clincy Lecture


Download ppt "Chapters 4 & 5 Addressing Part 2 of 2"

Similar presentations


Ads by Google