Sub Netting and Super Netting

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 34

Subnetting/Supernetting

Dept of E & E

ELE 411F Computer Networks

CONTENTS
SUBNETTING SUPERNETTING

Dept of E & E

ELE 411F Computer Networks

SUBNETTING

Dept of E & E

ELE 411F Computer Networks

IP addresses are designed with two levels of hierarchy.

Dept of E & E

ELE 411F Computer Networks

A network with two levels of hierarchy (not subnetted)

Dept of E & E

ELE 411F Computer Networks

A network with three levels of hierarchy (subnetted)

Dept of E & E

ELE 411F Computer Networks

Addresses in a network with and without subnetting

Dept of E & E

ELE 411F Computer Networks

Hierarchy concept in a telephone number

Dept of E & E

ELE 411F Computer Networks

Default mask and subnet mask

Dept of E & E

ELE 411F Computer Networks

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.
Dept of E & E ELE 411F Computer Networks 10

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.

Dept of E & E

ELE 411F Computer Networks

11

Example 1

What is the subnetwork address if the destination address is 160.45.34.56 and the subnet mask is 255.255.240.0?

Dept of E & E

ELE 411F Computer Networks

12

Solution

11001000 00101101 00100010 00111000


11111111 11111111 11110000 00000000 11001000 00101101 00100000 00000000

The subnetwork address is 200.45.32.0.

Dept of E & E

ELE 411F Computer Networks

13

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.
Dept of E & E ELE 411F Computer Networks 14

Example 2

What is the subnetwork address if the destination address is 190.30.80.5 and the mask is 255.255.192.0?

Dept of E & E

ELE 411F Computer Networks

15

Example 2 Solution

Dept of E & E

ELE 411F Computer Networks

16

Comparison of a default mask and a subnet mask

Dept of E & E

ELE 411F Computer Networks

17

The number of subnets must be a power of 2.

Dept of E & E

ELE 411F Computer Networks

18

Example 3

A company is granted the site address 201.70.64.0 (class C). The company needs six subnets. Design the subnets.
Solution

The number of 1s mask is 24 (class C).


Dept of E & E ELE 411F Computer Networks

in

the

default

19

Solution (Continued)

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 (32 - 27). The mask is

Dept of E & E

ELE 411F Computer Networks

20

Solution (Continued)

11111111 11111111 11111111 11100000 or 255.255.255.224

The number of subnets is 8. The number of addresses in each subnet is 25 (5 is the number of 0s) or 32.

Dept of E & E

ELE 411F Computer Networks

21

Example 3

Dept of E & E

ELE 411F Computer Networks

22

Example 4

A company is granted the site address 181.56.0.0 (class B). The company needs 1000 subnets. Design the subnets.
Solution

The number of 1s in the default mask is 16 (class B).


Dept of E & E ELE 411F Computer Networks 23

Solution (Continued)

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 (16 + 10). The total number of 0s is 6 (32 - 26).

Dept of E & E

ELE 411F Computer Networks

24

Solution (Continued)

The mask is 11111111 11111111 11111111 11000000 or 255.255.255.192. The number of subnets is 1024. The number of addresses in each subnet is 26 (6 is the number of 0s) or 64.
Dept of E & E ELE 411F Computer Networks 25

Example 4

Dept of E & E

ELE 411F Computer Networks

26

SUPERNETTING

Dept of E & E

ELE 411F Computer Networks

27

A supernetwork

Dept of E & E

ELE 411F Computer Networks

28

Rules:
** The number of blocks must be a power of 2 (1, 2, 4, 8, 16, . . .). ** The blocks must be contiguous in the address space (no gaps between the blocks). ** The third byte of the first address in the superblock must be evenly divisible by the number of blocks. In other words, if the number of blocks is N, the third byte must be divisible by N.
Dept of E & E ELE 411F Computer Networks 29

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?

198.47.32.0
198.47.32.0 198.47.31.0 198.47.32.0

198.47.33.0
198.47.42.0 198.47.32.0 198.47.33.0

198.47.34.0
198.47.52.0 198.47.33.0 198.47.34.0 198.47.62.0 198.47.52.0 198.47.35.0

Dept of E & E

ELE 411F Computer Networks

30

Solution
1: No, there are only three blocks.

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.

Dept of E & E

ELE 411F Computer Networks

31

In subnetting, we need the first address of the subnet and the subnet mask to define the range of addresses.

Dept of E & E

ELE 411F Computer Networks

32

In supernetting, we need the first address of the supernet and the supernet mask to define the range of addresses.

Dept of E & E

ELE 411F Computer Networks

33

Comparison of subnet, default, and supernet masks

Dept of E & E

ELE 411F Computer Networks

34

You might also like