Вы находитесь на странице: 1из 39

‫بسم هللا الرحمن الرحیم‬

Ip addressing
classless inter domain routing (CIDR)
• A method for allocating ip address
• The IETF (Internet Engineering Task Force)
introduced in 1993
• To replace the previous addressing
architecture of classful

Internet Engineering Task Force, the main standards organization for the Internet.
That organization defines standard Internet operating protocols such as TCP/IP.
• We knew that this classful ip address c ip
address
• 200.200.200.200 is class c ip address
• So the network part is 24 bit and host part is
8bits
• To represent network address use subnet
mask 255.255.255.0
• If we write it in binary
11111111.11111111.11111111.00000000
• So the method of subnet mask represent in
another way so this representation is called
classless inter domain routing(CIDR) method
• With this ip address 200.200.200.200
• Add slash with (/) and write the number of one
200.200.200.200/24
• or
• followed by a slash character (/), and ending with
the bit-length of the prefix
Basically the method that isps(internet service
provider ) use to allocate an amount of
addresses to a company or home

The slash notation (/) means how many bits


are turned on (1s)
Some of cidr values
• Every router interface have a network
There are 5 network we have to buy 5 network
addresses and assign to each n/w
• we May not have more hosts therefore some
of the ip addresses will be remain and waste
Determining available hosts
• Why minus 2
• because the first address zero is network
address (200.10.20.0)
• its represent identity all of the network
• The last addresses for broadcast address
therefore we couldn’t use it (200.10.20.255)
Subnetting
• Subneting is logically dividing the n/w by
extending the 1s used in network mask
• In mask 1 represent network and
• Zeros represent hosts
Formula
Number of subnets 2x-2
Where X=number of bits borrowed

Number of hosts 2y-2


Where Y=number of 0’s

Magic number or block size=total number of


address
Magic number or block size =256-mask
Subnetting
• Classful ip addressing subnet mask are a set of 255’s and 0’s
• Mean mask of classful should be even complete 255 or 0’s
• In binary it is contiguous 1’s and 0’s
• Subnet mask can't be any value as it won't follow the rule of contiguous
1’s and 0’s
• Possible subnet mask value
– 0
– 128
– 192
– 224
– 240
– 248
– 252
– 254
– 255
for example a number given to us and want to
find the network number in this ip add
200 10 20 20

Firs we write mask of this ip


255 255 255 0

Then we convert to binary


11001000 00001010 000010100 000010100

If we convert mask to binary


11111111 11111111 11111111 00000000
200 10 20 20
255 255 255 0
11001000 00001010 000010100 000010100
11111111 11111111 11111111 00000000
AND
OPERATION
11001000 00001010 000010100 00000000

200 10 20 0

Finally we found that this class ip add is C class ip add


• Now divide the n/w into 5 subnets
• Number of subnets required =5
• According to our diagram therefore we divide
it into 5 subnet mask
• 2n-2=>5 n=3
on 3 bit
• 21-2=>0 number of 0’s to
be changed into 1’s=3
• 22-2=>2
• 23-2=6>5
So its satisfy our condition
200 10 20 0
11111111 11111111 11111111 00000000

11111111 11111111 11111111 11100000

255 255 255 224

N=3 Number of 0’s to be changed into 1s=3


If we again see it 224=11100000
Now calculate magic number

256
224
32
Our block size will be 32
How to put in formula check final
result
Subnet 0 200 10 20 0/27

Subnet 1 200 10 20 32/27

Subnet 2 200 10 20 64/27

Subnet 3 200 10 20 96/27

Subnet 4 200 10 20 128/27

Subnet 5 200 10 20 160/27

Subnet 6 200 10 20 192/27

200 10 20 224/27
Subnet 7
• Our network start from 0 and end in 256 so
total number will be 8 the first 0 and last 256
parts will not use
• So effectively our number of subnet are from
1-6
• Why if you remember the formula 23-2=6>5
requirement is 5 but subnet is 6
Subnet number from 0 to 32 we cant use it in old
system we couldn’t use 0 subnet and new system use
subnet 0 but now we consider it is no use
• Subnet 0 200 10 20 0/27

• Subnet broad
200 10 20 31/27
cast number 0

• Subnet 1 200 10 20 32/27

200 10 20 33/27

200 10 20 62/27
Subnet broad
cast subnet 1 200 10 20 63/27
• We cant use subnet and subnet broad cast
number 32 and 63
200 10 20 32/27

200 10 20 63/27
Subnetting finding host
• How to find host
• Every n/w want 10 hosts in each n/w the
number of host should at least 10 host is
must now subnetting and finding hosts
Formula
Number of subnets 2x-2
Where X=number of bits borrowed

Number of hosts 2y-2


Where Y=number of 0’s

Magic number or block size=total number of


address
Magic number or block size =256-mask
Once again see the table
Network number is
200 10 20 0

255 255 255 0

11111111 11111111 11111111 00000000

• In c class no of hosts-254
• Number of hosts required- 10 in each subnet
Formula
• Number Of Hosts Required=10

2n-2=> 10
n=4
21-2=> 0
22-2=> 2 Number of 0’s
Rsequired 4
23-2=> 6
24-2=14> 10
200c 10 20 0

11111111 11111111 11111111 00000000

11111111 11111111 11111111 1111 0000

255 255 255 240

n=4
Here is a little bit change
Start from write to left and n=4, Number of 0’s
will write 0000 Required = 4
Once again check table
200c 10 20 0

11111111 11111111 11111111 00000000

11111111 11111111 11111111 1111 0000

255 255 255 240

n=4
/28
Number of 0’s
Required = 4
Now calculate magic number

256
240
16
Our block size will be 16
How to put in formula check final
result
Subnet 0 200 10 20 0/28

Subnet 1 200 10 20 16/28

Subnet 2 200 10 20 32/28

Subnet 3 200 10 20 48/28

Subnet 4 200 10 20 64/28

Subnet 5 200 10 20 80/28

Subnet 6 200 10 20 96/28

200 10 20 112/28
Subnet 7
How to put in formula check final
result
Subnet 8 200 10 20 128/28

Subnet 9 200 10 20 144/28

Subnet 10 200 10 20 160/28

Subnet 11 200 10 20 176/28

Subnet 12 200 10 20 192/28

Subnet 13 200 10 20 208/28

Subnet 14 200 10 20 224/28

200 10 20 240/28
Subnet 15
Subnet number from 0 to 32 we cant use it in old
system we couldn’t use 0 subnet and new system use
subnet 0 but now we consider it is no use
• Subnet 0 200 10 20 0/28

• Subnet broad
200 10 20 15/28
cast number 0

• Subnet 1 200 10 20 16/28

200 10 20 17/28

……
We can use just 17-30 not 16 and 31
200 10 20 30/28
Subnet broad
cast subnet 1 200 10 20 31/28
• The block size for host was 14 so now we see
there 14 hosts available
Check another hosts

• Subnet 2 200 10 20 32/28

• Subnet broad
200 10 20 47/28
cast number 2

• Subnet 3 200 10 20 48/28

200 10 20 49/28
We have 14 addresses we assign 10 and 4 will keep for future

……
We can use just 49-62 not 48 and 63
200 10 20 62/28
Subnet broad
cast subnet 3 200 10 20 63/28

Вам также может понравиться