Upload
piers-hamilton
View
220
Download
5
Embed Size (px)
Citation preview
Subnetting of IP Address
Network Number for Each Network
164.124.1.2
164.124.100.3
164.124.180.5
164.124.0.1
130.1.50.0
130.1.100.10 203.252.3.1
203.252.3.2 203.252.3.3
203.252.2.1
203.252.2.2
netA
netB
netC netD
A
B
• Unique Network Number for each Network
• Different host addresses in same Network
• 4 Network Numbers for 8 systems
s0e0 e1
Routing Table of Router B
IP Routing TableDestination Network Number Interface
130.1.0.0 e0164.124.0.0 s0203.252.2.0 s0203.252.3.0 e1
Sub-Network Number for Each Network
• Only 1 Class B Network Number for 4 networks– more effective
• We should apply subnetmask in these cases
164.124.1.2
164.124.1.3
164.124.1.4
164.124.1.1
164.124.3.2
164.124.3.1 164.124.4.1
164.124.4.2 164.124.4.3
164.124.2.1
164.124.2.2
netA
netB
netC netD
A
B
Routing Table of Router B
IP Routing TableDestination Network Number Interface
164.124.1.0 s0164.124.2.0 s0164.124.3.0 e0164.124.4.0 e1
Benefit of Subnetting• Address utilization if more Efficient
• Minimized the side effect of Broadcast message– broadcating storm exhausts the bandwithd of net
work– minimize broadcasting storm
....
....
....
....
Subnet MaskIPNetworkAddress
DefaultSubnetMask
8-bitSubnetMask
164 124 0 0
255 255 0 0
255 255 255 0
• Use host bits, starting at the high order bit position
• 1bit for network number, 0 bit for host address
Subnet Mask Bits
128 64 32 16 8 4 2 1
1 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0
1 1 1 0 0 0 0 0
1 1 1 1 0 0 0 0
1 1 1 1 1 0 0 0
1 1 1 1 1 1 0 0
1 1 1 1 1 1 1 0
1 1 1 1 1 1 1 1
=
=
=
=
=
=
=
=
128
192
224
240
248
252
254
255
Subnet Mask without Subnets
• The router performs a logical AND operation to obtain the destination network number
• Subnets not in use -- the default
10000011 01101100 00000010 00000011
11111111 11111111 00000000 00000000
10000011 01101100 00000000 00000000
131 108 0 0
131.108.2.3
255.255.0.0
Network Hostsubnet
Subnet Mask with Subnets
• Network Number extended by 8 bits
10000011 01101100 00000010 00000011
11111111 11111111 11111111 00000000
10000011 01101100 00000010 00000000
131 108 2 0
131.108.2.3
255.255.255.0
Network Host
Class B Subnettingno. bits subnet mask no. subnets no. hosts
1 255.255.128.0 2 (0) 32762 2 255.255.192.0 4 (2) 16382
3 255.255.224.0 8 (6) 8190 4 255.255.240.0 16 (14) 4094
5 255.255.248.0 32 (30) 2046 6 255.255.252.0 64 (62) 1022 7 255.255.254.0 128 (126) 510 8 255.255.255.0 256 (254) 254 9 255.255.255.128 512 (510) 126 10 255.255.255.192 1024 (1022) 62
11 255.255.255.224 2048 (2046) 3012 255.255.255.240 4096 (4094) 14 13 255.255.255.248 8192 (8190) 614 255.255.255.252 16384(16382) 2
Class C Subnetting
no. bits subnet mask no. subnets no. hosts 1 255.255.255.128 2 (0) 126 2 255.255.255.192 4 (2) 62
3 255.255.255.224 8 (6) 30 4 255.255.255.240 16(14) 14 5 255.255.255.248 32(30) 6 6 255.255.255.252 64(62) 2
Subnet & Host range
• 203.252.14.0/2711001011.11111100.00001110.0000000011111111.11111111.11111111.11100000 203 . 252 . 14 .00000000 (0) 203 . 252 . 14 .00100000 (32) 203 . 252 . 14 .01000000 (64) 203 . 252 . 14 .01100000 (96) 203 . 252 . 14 .10000000 (128) 203 . 252 . 14 .10100000 (160) 203 . 252 . 14 .11000000 (192) 203 . 252 . 14 .11100000 (224)
Subnet & Host range (cont.)
• 203.252.14.32/27 203 . 252 . 14 .00100000 (32) 203 . 252 . 14 .00100001 (33) 203 . 252 . 14 .00100010 (34) 203 . 252 . 14 .00100011 (35) 203 . 252 . 14 .00100100 (36) 203 . 252 . 14 .00100101 (37) . . . . . . . . . . . . . . . . . . . . . . . . . . 203 . 252 . 14 .00111100 (60) 203 . 252 . 14 .00111101 (61) 203 . 252 . 14 .00111110 (62) 203 . 252 . 14 .00111111 (63)
Subnetting Tip0 0
128 128
64192
0
128
64192
32
96160
224
0
128
64192
32
96160
224 16
48
80
112144
176
208
240
1 Bit : 2 subnetsrange1: 0~127range2: 128 ~ 255
2 Bits: 4 subnets
3 Bits: 8 subnets
4 Bits: 16 subnets
Exercise
address subnet mask class subnet broadcast
201.222.10.60 255.255.255.248
15.16.193.6 255.255.248.0
128.16.32.13 255.255.255.252
153.50.6.27 255.255.255.128
Subnet Case 1
• 20 subnets
• 5 hosts per subnet
• class C address : 201.222.5.0
Subnet Case 1 (cont.)
• IP Host Address: 201.222.5.121
• Subnet Mask: 255.255.255.248
11001001 11011110 00000101 0111111111111 11111111 11111111 11111
201.222.5.121255.255.255.248
001000
01111 000201 222 5 120
11001001 11011110 00000101
• subnet addres: 201.222.5.120• host address: 201.222.5.121 ~ 201.222.5.126• broadcast address: 210.222.5.127
Network subnet host