Presentation is loading. Please wait.

Presentation is loading. Please wait.

Subnetting Subnetting is not in the CIS221-3 Syllabus

Similar presentations


Presentation on theme: "Subnetting Subnetting is not in the CIS221-3 Syllabus"— Presentation transcript:

1 Subnetting Subnetting is not in the CIS221-3 Syllabus
It was covered in CIS110 last year We are revising it because: We need to study supernetting The technique is similar to subnetting Some students find it difficult 16/11/10 06-Subnetting

2 Revision of Classful IP Addressing
© Tanenbaum, Prentice Hall International 16/11/10 06-Subnetting

3 Revision of Classful IP Addressing
Class ID 1st Octet Networks Hosts Purpose A 01 1-126 126 16,777,214 Large Networks 127 Loopback B 10 16,382 65,534 Medium Networks C 110 2,097,152 254 Small Networks D 1110 Multicast E 1111 Experimental 16/11/10 06-Subnetting

4 Revision of Classful IP Addressing
Note that for every range of network Ids and host IDs, two cannot be used. Network Ids of all 0s means this network Network Ids of all 1s means all networks Host Ids of all 0s are used to define an IP address for the network itself Host Ids of all 1s are used for a broadcast address for all hosts on the network Therefore for both host and network Ids which are N bits long, the number of valid addresses is 2N – 2 16/11/10 06-Subnetting

5 Net Masks Address Class Net Mask Class A 255.0.0.0
Class B Class C 16/11/10 06-Subnetting

6 Classful Routing When a router receives a packet, it examines the destination address in the IP header It checks the first byte of the address and determines the address class and the net mask for this class. It then applies does a bitwise AND between the destination address and the net mask to determine the destination network address It then looks up the destination network address in its routing table and finds the IP address of the router it should forward the packet to and which interface this address can be reached by Finally, it routes the packet 16/11/10 06-Subnetting

7 Example of Classful Routing
Suppose the destination address is The first byte is between 128 and 191, so it is a Class B address The net mask for a Class B address is Bitwise AND the destination address and the default net mask to give as the destination network address Look up in the routing table and obtain the IP address of the next router and the interface by which it can be reached (say by serial 0) Route the packet with destination address out of the serial 0 interface. 16/11/10 06-Subnetting

8 Revision of Subnetting
With subnetting the host ID part of the IP address is further sub-divided into a subnetwork ID and a host ID This allows organisations to structure the Class A, B or C addresses into a further hierarchy where each subnetwork can be identified by a different subnetwork address Only routers within the subnetwork need to have entries for the subnetwork addresses and knowledge of the subnet mask used All other routers on the Internet just have one entry for the network address, thus reducing routing table size 16/11/10 06-Subnetting

9 Example 1: – Class C We have a Class C network address (with an 8-bit host ID) given above and we want to use it to create six subnetworks each having up to 30 hosts We need 3 bits to define the subnet and 5 to define the hosts to give 23 – 2 = 6 subnetwork addresses each with 25 – 2 = 30 hosts With subnetting there is always just one byte that we need to work with. It is the byte in which the boundary between the subnet ID and the host ID is found. This is known as the interesting byte. It is the last byte in the network address that is not all 0s or the last byte in the subnet mask that is not all 1s 16/11/10 06-Subnetting

10 Example 1: – Class C In the case of a Class C address, the interesting byte is the last byte. The subnet mask will be the all 1s in the first 3 bytes and the final byte will be 111| = 22410 The ‘|’ represents the boundary between the subnet ID and the host ID Subnet mask is therefore 16/11/10 06-Subnetting

11 Example 1: – Class C So, if we are given a host address we need to bitwise AND it with the subnet mask to get the address of its subnet. Again we only need to look at the interesting (last) byte: 22410 = 111|000002 10610 = 011|010102 ANDed 011| = 9610 16/11/10 06-Subnetting

12 Example 1: 204.33.180.96 – Class C So the subnetwork address is:
= 011|000002 The first valid host address is: = 011|000012 The broadcast address is: = 011|111112 The last valid host address is: = 011|111102 16/11/10 06-Subnetting

13 Example 2: – Class B Suppose the subnet mask is The interesting byte is the last byte in the subnet mask which is not all 1s (i.e. the last byte) 12810 = 1| 20010 = 1| ANDed 1| = There will be valid subnetwork addresses and valid host addresses 16/11/10 06-Subnetting

14 Example 2: 132.40.17.200 – Class B So the subnetwork address is:
= 1| The first valid host address is: = 1| The broadcast address is: = 1| The last valid host address is: = 1| 16/11/10 06-Subnetting

15 Example 3: – Class A Suppose the subnet mask is The interesting byte is the last byte in the subnet mask which is not all 1s (i.e. the 2nd byte) 25210 = |002 1910 = |112 ANDed |002 = 1610 There will be valid subnetwork addresses and valid host addresses 16/11/10 06-Subnetting

16 Example 3: 120.19.51.6 – Class A So the subnetwork address is:
= |002 The first valid host address is: The broadcast address is: = |112 The last valid host address is: 16/11/10 06-Subnetting

17 Exercise 1: – Class A How many valid subnet addresses and host addresses are supported by the subnetwork address with subnet mask ? Find the first valid host address, last valid host address and broadcast address for the subnetwork 16/11/10 06-Subnetting

18 Exercise 1: 86.20.38.0 – Class A Interesting byte is the 3rd byte
22410 = 111|000002 3810 = 001|001102 ANDed 001| = 3210 There will be valid subnetwork addresses and valid host addresses 16/11/10 06-Subnetting

19 Exercise 1: 86.20.38.0 – Class A So the subnetwork address is:
= 001|000002 The first valid host address is: The broadcast address is: = 001|111112 The last valid host address is: 16/11/10 06-Subnetting

20 Exercise 2: Class B How many valid host address belong to the same subnet as if the subnet mask is ? What are the first and last valid host addresses in this subnet? 16/11/10 06-Subnetting

21 Exercise 2: 160.16.18.99 - Class B Interesting byte is the last byte
19210 = 11| 9910 = 01| ANDed 01| = 6410 There will be valid subnetwork addresses and valid host addresses 16/11/10 06-Subnetting

22 Exercise 2: 160.16.18.99 - Class B So the subnetwork address is:
= 01| The first valid host address is: = 01| The broadcast address is: = 01| The last valid host address is: = 01| 16/11/10 06-Subnetting

23 Exercise 3: – Class C A customer has been allocated the Class C network address and wishes to create up to 30 subnets each of which having a maximum of 6 hosts. What subnet mask should he use? What will be the subnet address of the first subnet? What will be the broadcast address of this subnet? 16/11/10 06-Subnetting

24 Exercise 3: – Class C For Class C addresses the interesting byte is the last byte 30 subnets require 25 bits 6 hosts requires 23 bits Last byte of subnet mask is 11111|0002 = 24810 Full Subnet Mask is First theoretical subnetwork address is the network address given ( ), but this would have a subnetwork address of all 0s 00000|0002, which is used to identify the subnetwork and this subnetwork is not normally used for hosts 16/11/10 06-Subnetting

25 Exercise 3: 193.25.18.0 – Class C So the first subnetwork address is:
= 00001|0002 The first valid host address in first subnet is: = 00001|0012 The broadcast address of first subnet is: = The last valid host address is: = 16/11/10 06-Subnetting


Download ppt "Subnetting Subnetting is not in the CIS221-3 Syllabus"

Similar presentations


Ads by Google