`Subnetting

31

Transcript of `Subnetting

Page 1: `Subnetting
Page 2: `Subnetting

Raees KhanSession Type: SeminarLanguage: Urdu & English Session Duration: 2 Hours

BSC (Hons) Computer SciencesMCSE, RHCT, CCNA, CCNP, MPLShttp://[email protected]

IPv4 Subnetting

Page 3: `Subnetting

CIDRNotation

Subnetting Process

IPv4 Subnetting

AGENDA

Page 4: `Subnetting

Subnetting Pre-requisite

IP Addressing Basics

What is Internet Protocol (IP).

IP usage and it characteristics.

IP Address Format: Dotted Decimal Notation.

IP Address Classes: Identification of class of an IP address.

IP Address Ranges for Class A, B , and C.

Private Addresses and Public Addresses.

Finding the Network address, Broadcast address, valid range of IPs.

Understanding masks and how to use them.

Page 5: `Subnetting

IP Addressing Table

Page 6: `Subnetting

• What is Subnetting and why do we do it.

• Getting acquainted with CIDR notation.

• Writing Subnet Mask.

• Learn Subnetting–Finding Network Addresses–Finding Broadcast Addresses–Finding Valid ranges of IPs .

AGENDA

Page 7: `Subnetting

%

DefiningSubnetting

Page 8: `Subnetting

Defining Subnetting

• Subnetting is the concept of dividing the network into smaller portions called subnets.

• This is done by borrowing bits from the host portion of the IP address, enabling more effi cient use of the network address.

Page 9: `Subnetting

Why Subnetting ?

• S u b n e t t i n g l e t s y o u a l l o c a t e a d d r e s s e s b y t a k i n g o n e l a r g e b r o a d c a s t d o m a i n a n d b r e a k i n g i t u p i n t o s m a l l e r m o r e m a n a g e a b l e b r o a d c a s t d o m a i n s .

• E ffi c i e n t u s e o f N e t w o r k a d d r e s s e s b y d i v i d i n g a n e t w o r k i n t o s u b - n e t w o r k s .

• R e s t r i c t B r o a d c a s t t r a ffi c ( V l a n s )

• S i m p l i fi e d A d m i n i s t r a t i o n

Page 10: `Subnetting

CIDR Notation

Page 11: `Subnetting

• T h e m e t h o d t h a t I S P s ( I n t e r n e t S e r v i c e P r o v i d e r s ) u s e t o a l l o c a t e a n a m o u n t o f a d d r e s s e s t o a c o m p a n y , a h o m e .

• E x a m p l e : 1 9 2 . 1 6 8 . 1 0 . 3 2 / 2 8

• T h e s l a s h n o t a t i o n ( / ) m e a n s h o w m a n y b i t s a r e t u r n e d o n ( 1 s )

• T h e v a l u e a f t e r s l a s h r e p r e s e n t s n e t w o r k b i t s .

CIDR Notation

Page 12: `Subnetting

CIDR Notation

In CIDR notation, the block granted is defined by the first address and the prefix length.

Also known as Prefix Notation OR Slash Notation

Page 13: `Subnetting

WritingSubnet Mask

Page 14: `Subnetting

128 64 32 16 8 4 2 1 SUM

0 0 0 0 0 0 0 0 0

1 0 0 0 0 0 0 0 128

1 1 0 0 0 0 0 0 192

1 1 1 0 0 0 0 0 224

1 1 1 1 0 0 0 0 240

1 1 1 1 1 0 0 0 248

1 1 1 1 1 1 0 0 252

1 1 1 1 1 1 1 0 254

1 1 1 1 1 1 1 1 255

Nine Possible Values for Subnet Mask

Page 15: `Subnetting

VALUE

OCTET

0 128 192 224 240 248 252 254

2nd 8 9 10 11 12 13 14 15

3rd 16 17 18 19 20 21 22 23

4th 24 25 26 27 28 29 30 31

Placing Values in right Octet

Page 16: `Subnetting

Subnet Mask CIDR Subnet Mask CIDR

255.0.0.0 /8 255.255.252.0 /22

255.128.0.0 /9 255.255.254.0 /23

255.192.0.0 /10 255.255.255.0 /24

255.224.0.0 /11 255.255.255.128 /25

255.240.0.0 /12 255.255.255.192 /26

255.248.0.0 /13 255.255.255.224 /27

255.252.0.0 /14 255.255.255.240 /28

255.254.0.0 /15 255.255.255.248 /29

255.255.0.0 /16 255.255.255.252 /30

255.255.128.0 /17 255.255.255.254 /31

255.255.192.0 /18 255.255.255.255 /32

255.255.224.0 /19

255.255.240.0 /20

255.255.248.0 /21

Writing Subnet Mask

Page 17: `Subnetting

Default Mask Vs Subnet Mask

A Default/Subnet mask defi nes which portion of the address is used to identify the network and which denotes the hosts.

Page 18: `Subnetting

Subnetting

Page 19: `Subnetting

Formulas used in Subnetting

Number of subnets = 2x

Where x = number of bits borrowed

Possible number of subnets are 2, 4, 8, 16, 32, 64…

Block Size = Total number of Address Block Size = 256-Mask

Number of valid IPs = 2y-2 Where y = number of 0’s

Page 20: `Subnetting

Subnetting Example

Question: Perform 1 bit subnetting and write Network ID, Broadcast ID, and valid range of IPs in each subnet.

In practical terms, the subnet mask actually conveys only a single piece of information: where the line is drawn between the subnet ID and host ID

Answer: The /24 represents the network bits so you cannot change these bits in subnetting. Borrow one bit from host bits to perform subnetting.

Given that 192.168.1.0 /24

Page 21: `Subnetting

192 . 168 . 1 . 0

11000000 . 10101000 . 00000001 . 0 0000000

192 . 168 . 1 . 0

11000000 . 10101000 . 00000001 . 0 0000000

1

Draw a line after 24 bits because they can’t be changed. Make the combinations with subnetting bits.

The two combinations are actually two subnets.

Subnetting Example

1

11000000 . 10101000 . 00000001 . 0000000

Page 22: `Subnetting

The two subnets are

192 . 168 . 1 . 0

192 . 168 . 1 . 128

/25

/25

For the first subnet 192.168.1.0/25The Net ID is 192.168.1.0The Valid range of IPs is 192.168.1.1 – 192.168.1.126The Broadcast ID is 192.168.1.127

For the Second subnet 192.168.1.128/25The Net ID is 192.168.1.128The Valid range of IPs is 192.168.1.129 – 192.168.1.254The Broadcast ID is 192.168.1.255

Subnetting Example Converting binary into decimal and writing custom subnet mask.

Page 23: `Subnetting

IP addressing conventions reserve two IP addresses per subnet.

• Subnet Address / Network ID– IP address that has al l binary 0s in

the host fi eld

• Broadcast Address– IP address that has al l binary 1s in

the host fi eld

Reserved IP Addresses per Subnet

Page 24: `Subnetting

Possible Subnets and Hosts for a Class A Network

Page 25: `Subnetting

Possible Subnets and Hosts for a Class B Network

Page 26: `Subnetting

Possible Subnets and Hosts for a Class C Network

Page 27: `Subnetting

Food for Thought

Page 28: `Subnetting

Subnet Mask or Custom subnet mask tells us that how many bits are used for Subnet ID portion and how many for host ID portion. Identify how many bits are used for subnetting in the following IP address using its subnet mask:

1.IP Address: 139.65.225.4 Subnet Mask: 255.255.224.0 2.IP Address: 139.65.225.4 Subnet Mask: 255.255.248.0 3.IP Address: 201.35.20.18 Subnet Mask: 255.255.255.128 4.IP Address: 201.35.20.18 Subnet Mask: 255.255.255.240 5.IP Address: 190.47.115.6 Subnet Mask: 255.255.128.0

Question 1

Page 29: `Subnetting

Question 2

Find the following:Number of Network bitsNumber of Host bitsNumber of Subnet bitsNumber of SubnetsNumber of Hosts per Subnet

For 8.1.4.5/16 130.2.140.100/24 198.190.100.61/26

Page 30: `Subnetting

Suppose you have a class B Network 172.121.0.0. Yourtask is to design a subnet scheme so that we can create 64 Network segments (subnets) within this Network.

1. How many bits would you use for the subnet ID?

2. How many bits would you use for the Host ID?

3. How many maximum possible subnets wil l be there?

4. How many maximum possible hosts wil l be there in each subnet?

5. Write down the Subnet Mask of your scheme.

6. Write down the fi rst val id IP address, last val id IP address and the broadcast address of the Third subnet of your scheme.

Question 3

Page 31: `Subnetting

Raees [email protected]

www.raeeskhan.info +92 - 333 - 4813101

Thank You!

Any Question ?