Presentation is loading. Please wait.

Presentation is loading. Please wait.

Subnetting and Supernetting

Similar presentations


Presentation on theme: "Subnetting and Supernetting"— Presentation transcript:

1 Subnetting and Supernetting
V Subnetting and Supernetting

2 Concepts Background The increasing number of host connected to the internet Restrictions on the network size

3 In subnetting, a network is divided into smaller subnetworks with each subnet having its own subnet address In supernetting, a organization can combine several class C to create a large range of addresses. In other word, several networks are combined to create a supernetwork

4 Subnetting IP address (32 bits)  netid and hostid
Means: there is a sense of hierarchy in IP addressing. To reach a host, we must first reach the network using netid, then using hostid to reach the host Generall: class A, B, C  two levels of hierarchy Sometimes two levels is not enough For example, imagine an organization with a class B address. The organization has two levels hierarchical addressing, but it cannot have more than one physiscal network The host cannot be grouped, and all of the host has the same level Solution  subnetting

5 Figure 5-1 Without subnetting

6 Figure 5-2 With subnetting

7 In the above example, The rest of the internet is not aware that the network is divided into three physical subnet.: three subnet still appear as a single network to the rest of internet A packet destined for host still reaches router R1. The destination address of the IP datagram is still a class B where defines the netid And 2.21 defines the host However, when the datagram arrives a router R1, the interpretation of the IP address changes. R1 knows the network physically divided into three subnets. It knows that the last two octets define two things: subnettid and hostid ( 2.21  subnetid 2 and hostid 21) Router uses first twoo octets as netid, the third subnetid, and the fourth hostid

8 Three levels of hierachy
Figure 5-3 Three levels of hierachy

9 Figure 5-4

10 Masking A process that extracts the address of the physical network from IP address Can be done whether we have subnet or not. Not have subnet: masking extract the network address from an IP address. Have subnet: masking extract the subnet address from IP address.

11 Figure 5-5

12 In masking: We perform math. operation on a 32-bits IP add. at the bit level using another 32-bit number called mask The bits in the mask are related to the corresponding IP add. Part of masking containing 1s defines netid or combination of netid and subnetid Part of making containing 0s defines hostid To get the network and subnet address, we must apply the bit-wise-and operation on IP address and the mask

13 Applying bit-wise-and operation to achieve masking
Figure 5-6 Applying bit-wise-and operation to achieve masking

14 Special address in subnetting:
Figure 5-7 Special address in subnetting: Reserved for  Reserved for  : Is not assigned to any host : Is not assigned to any host

15 Subnetting class A A class A address:
Is made of a one-byte netid and a three-byte hostid Can have one single physical network with up to (224-2) If we want more physical networks, we can divide this one range into several smaller ranges

16 Example : A organization with a class A needs a least subnetworks. Find the subnet mask and configuration of each network Solution: We need at least 1002 subnet to allow the all-1s and all-0s subnetids This means that the minimum number of bits to be allocated for subnetting should be 10 (29 < 1,002< 1010) Fourteen bits are left to define the hostid

17 Figure 5-8

18 Each subnet can have 16,384 hosts/computer
Figure 5-9 Theres is 1024 subnets Each subnet can have 16,384 hosts/computer

19 Figure 5-10

20 Subnetting class B A class B:
Is made A two byte netid and two-byte hostid Can have one single physical network and up to 65,534 hosts on the network. If we wan more physical network, we can divide this one big range into several smaller ranges.

21 Example An organization with a class B address needs at least 12 subnetwork. Find subnet mask and configuration of each subnetwork Solution: There is a need for at least 14 subnetworks, 12 as specified plus 2 reserve as special address. This means that the minimum number of bits should be 4 (23 < 14 < 24)

22 Figure 5-11 masking

23 Each subnet  4094 hosts/computers
Figure 5-12 Each subnet  4094 hosts/computers

24 Figure 5-13

25 Subnetting class C A class C address:
is made of a three byte netid and one-byte hostid Can have one single physical network and up to 254 (28 – 2) host on that network If we want more physical network, we can divide this one range into several smaller range.

26 Example: An organization with a class C needs at least five subnetworks. Find the subnet mask and configuration of each subnetwork Solution: There is a need for at least seven subnetworks, five specifief and two reserved a special address. This means that minimum number of bits should be 3 ( 22< 7 < 23)

27 Figure 5-14 Subnetting Class C

28 Each subnet can have 32 hosts
Figure 5-15 There is 8 subnet Each subnet can have 32 hosts

29 Figure 5-16

30 Variable-length subnetting
The internet allows a site to use variable-length subnetting. For an example of when this may be desirable, consider a site that is granted a class C address and needs to have five subnets with the following of host: 60,60,60,30,30 This site can not use a subnet mask with only two bits in the subnets section because this allows only four subnet with 62 hosts ( 256/ = 62). Nor can the site use a subnet mask with three bits in the subnet section, because this allows 8 subnets with 30 hosts (256/8 -2 = 30) Solution for the problem: variable length subnetting. The router uses two different masks, one applied after the other First mask uses the mask with 26 1s ( or ) to divide the network into four subnets Then it applies the second mask with 27 1s ( ) to one of the subnets to divide it into two smaller subnets

31 Variable length subnetting
Figure 5-17 Variable length subnetting

32 Supernetting Depend on the need of an organization
One or more classes c can be jointed to make one supernetwork Example: an organization that needs 1000 address can be granted four class c addresses. The organization can then use these address in one supernetwork, in four network, or in more then four networks.

33 Figure 5-18

34 Supernet Mask Can be assigned to a block of class C network address, if the number of net. Address is a power of two Default mask for a class C address If some of the 1s are changed to 0s, we can have a mask for a group of class C Supernet mask is the reverseof the subnet mask

35 The beginning address can be X.Y.32.0, but it can not be X.Y.33.0
Figure 5-19 The beginning address can be X.Y.32.0, but it can not be X.Y.33.0

36 Example: With supernet , we can have four class C combined into one supernetwork If we choose the first address to be X.Y.32.0, the other three addres X.Y.33.0, X.Y.34.0 and X.Y.35.0 If the router recieves a packet, it applies the supernet mask to the destination address and compare the result to the lowest address. If the result and the lowest address are the same, the packet belong to the supernet Suppose a packet arrives with destination address X.Y After applying the mask, the result is X.Y.32.0 (the lowest address), the packet belong to the supernet

37 Figure 5-20

38 Figure 5-21 Not belong to supernet Belong to

39 Figure 5-22 CIDR Classless Interdomain Routing


Download ppt "Subnetting and Supernetting"

Similar presentations


Ads by Google