IP Subnetting

2,848 views

Published on

Basic IP Subnetting

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,848
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
157
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

IP Subnetting

  1. 1. IP Subnetting Shahzad Rashid NOC Executive Engineer (TXN) Telenor Pakistan
  2. 2. Contents <ul><li>IP Classes </li></ul><ul><li>Why Subnetting </li></ul><ul><li>Subnetting for Networks </li></ul><ul><li>Subnetting for Hosts </li></ul>
  3. 3. <ul><ul><li>IP Classes: </li></ul></ul><ul><ul><ul><li>Class A: 1-126 (16 Million Hosts on 127 Networks) </li></ul></ul></ul><ul><ul><ul><li>Class B: 128-191 (65000 Hosts on 16000 Networks) </li></ul></ul></ul><ul><ul><ul><li>Class C: 192-223 (254 Hosts on 2 Million Networks) </li></ul></ul></ul><ul><ul><ul><li>Class D: 224-239 (Reserved for Multicast Groups) </li></ul></ul></ul><ul><ul><ul><li>Class E: 240-254 (For Future use and R & D) </li></ul></ul></ul><ul><ul><ul><li>Loop Back Address: 127.x.x.x (Reserved for Loopback Tests) </li></ul></ul></ul><ul><ul><ul><li>.1/.2 are usually used as Gateway Addresses </li></ul></ul></ul><ul><ul><ul><li>The last address e.g. .255 is used as Broadcast Address </li></ul></ul></ul><ul><ul><li>Why Subnetting: </li></ul></ul><ul><ul><ul><li>To preserve Public IPv4 Addresses </li></ul></ul></ul>
  4. 4. Subnetting for Networks <ul><li>. </li></ul><ul><ul><li>Step 1: Convert the Number of Networks to Binary </li></ul></ul><ul><ul><li>Step 2: Reserve bits in Subnet Mask according to the Number of Networks Converted to Binary (From Left to Right) </li></ul></ul><ul><ul><li>Step 3: Use the Last Reserved bit to find your Network Ranges </li></ul></ul>
  5. 5. Practice Scenario <ul><li>. </li></ul><ul><ul><li>Subnetting for 5 Networks using Class C IP Address: 192.168.1.0 </li></ul></ul><ul><ul><li>Default Class C Mask: 255.255.255.0 </li></ul></ul><ul><ul><li>Step 1: Convert required Networks to Binary </li></ul></ul><ul><ul><li>128 64 32 16 8 4 2 1 </li></ul></ul><ul><ul><li>0 0 0 0 0 1 0 1 </li></ul></ul><ul><ul><li>Bit 1 and 3 are Turned ON. That makes a total of 5 </li></ul></ul><ul><ul><li>Now Count from Right to Left and see how far is the last bit Turned ON </li></ul></ul><ul><ul><li>3 is the count from Right to Left </li></ul></ul>
  6. 6. Practice Scenario (Contd…) <ul><li>. </li></ul><ul><ul><li>Step 2: </li></ul></ul><ul><ul><li>Subnet mask: 255.255.255.0 </li></ul></ul><ul><ul><li>Reserve 3 bits in the Fourth Octet of Subnet Mask from Left to Right (Turn them ON and turn OFF the remaining bits) </li></ul></ul><ul><ul><li>255 255 255 0 </li></ul></ul><ul><ul><li>11111111 11111111 11111111 000000000 </li></ul></ul><ul><ul><li>11111111 11111111 11111111 111 000000 </li></ul></ul><ul><ul><li>First 3 Bits of the Last (Fourth) Octet Reserved </li></ul></ul><ul><ul><li>Subnet Mask comes out to be : 255.255.255.224 </li></ul></ul><ul><ul><li>This is the Subnet Mask for 5 Networks </li></ul></ul>
  7. 7. Practice Scenario (Contd…) <ul><li>. </li></ul><ul><ul><li>Step 3: </li></ul></ul><ul><ul><li>255 255 255 0 </li></ul></ul><ul><ul><li>11111111 11111111 11111111 000000000 </li></ul></ul><ul><ul><li>11111111 11111111 11111111 111 000000 </li></ul></ul><ul><ul><li>Refer to the Last Octet </li></ul></ul><ul><ul><li>128 64 32 16 8 4 2 1 </li></ul></ul><ul><ul><li>1 1 1 0 0 0 0 0 </li></ul></ul><ul><ul><li>Starting from Left to Right notice the last bit Turned ON </li></ul></ul><ul><ul><li>Last bit Turned ON is 32 </li></ul></ul><ul><ul><li>Network Ranges will be determined using 32 </li></ul></ul>
  8. 8. Practice Scenario (Contd…) <ul><li>. </li></ul><ul><ul><li>Step 3 (Contd…): </li></ul></ul><ul><ul><li>Network Ranges (The best possible utilization of IP for 5 Networks) </li></ul></ul><ul><ul><li>1. 192.168.1.1 ----- 192.168.1.31 </li></ul></ul><ul><ul><li>2. 192.168.1.32 ----- 192.168.1.63 </li></ul></ul><ul><ul><li>3. 192.168.1.64 ----- 192.168.1.95 </li></ul></ul><ul><ul><li>4. 192.168.1.96 ----- 192.168.1.127 </li></ul></ul><ul><ul><li>5. 192.168.1.128 ----- 192.168.1.159 </li></ul></ul><ul><ul><li>6. 192.168.1.160 ----- 192.168.1.191 </li></ul></ul><ul><ul><li>7. 192.168.1.192 ----- 192.168.1.223 </li></ul></ul><ul><ul><li>These are the 7 Seven Network Ranges which is the most appropriate Subnetting for 5 Networks without misusing the IP’s </li></ul></ul>
  9. 9. Subnetting for Hosts <ul><li>. </li></ul><ul><ul><li>Step 1: Convert the Number of Hosts to Binary </li></ul></ul><ul><ul><li>Step 2: Reserve bits in Subnet Mask according to the Number of Hosts Converted to Binary (From Right to Left) </li></ul></ul><ul><ul><li>Step 3: Use Last Reserved bit to find your Network Ranges </li></ul></ul>
  10. 10. Practice Scenario <ul><li>. </li></ul><ul><ul><li>Subnetting for 50 Hosts using Class C IP Address: 192.168.1.0 </li></ul></ul><ul><ul><li>Default Class C Mask: 255.255.255.0 </li></ul></ul><ul><ul><li>Step 1: Convert required Networks to Binary </li></ul></ul><ul><ul><li>128 64 32 16 8 4 2 1 </li></ul></ul><ul><ul><li>0 0 1 1 0 0 1 0 </li></ul></ul><ul><ul><li>Bit 2, 5 and 6 are Turned ON. That makes a total of 50 </li></ul></ul><ul><ul><li>Now Count from Left to Right and see how far is the last bit Turned ON </li></ul></ul><ul><ul><li>6 is the count from Right to Left </li></ul></ul>
  11. 11. Practice Scenario (Contd…) <ul><li>. </li></ul><ul><ul><li>Step 2: </li></ul></ul><ul><ul><li>Subnet mask: 255.255.255.0 </li></ul></ul><ul><ul><li>Reserve 6 bits in the Fourth Octet of Subnet Mask from Right to Left (Turn them OFF and turn ON the remaining bits) </li></ul></ul><ul><ul><li>255 255 255 0 </li></ul></ul><ul><ul><li>11111111 11111111 11111111 000000000 </li></ul></ul><ul><ul><li>11111111 11111111 11111111 11 0000000 </li></ul></ul><ul><ul><li>Last 6 Bits of the Last (Fourth) Octet Reserved </li></ul></ul><ul><ul><li>Subnet Mask comes out to be : 255.255.255.192 </li></ul></ul><ul><ul><li>This is the Subnet Mask for 50 Hosts </li></ul></ul>
  12. 12. Practice Scenario (Contd…) <ul><li>. </li></ul><ul><ul><li>Step 3: </li></ul></ul><ul><ul><li>255 255 255 0 </li></ul></ul><ul><ul><li>11111111 11111111 11111111 000000000 </li></ul></ul><ul><ul><li>11111111 11111111 11111111 11 0000000 </li></ul></ul><ul><ul><li>Refer to the Last Octet </li></ul></ul><ul><ul><li>128 64 32 16 8 4 2 1 </li></ul></ul><ul><ul><li>1 1 0 0 0 0 0 0 </li></ul></ul><ul><ul><li>Starting from Left to Right notice the last bit Turned ON </li></ul></ul><ul><ul><li>Last bit Turned ON is 64 </li></ul></ul><ul><ul><li>Network Ranges for 50 Hosts will be determined using 64 </li></ul></ul>
  13. 13. Practice Scenario (Contd…) <ul><li>. </li></ul><ul><ul><li>Step 3 (Contd…): </li></ul></ul><ul><ul><li>Network Ranges (The best possible utilization of IP for 50 Hosts) </li></ul></ul><ul><ul><li>1. 192.168.1.1 ----- 192.168.1.63 </li></ul></ul><ul><ul><li>2. 192.168.1.64 ----- 192.168.1.127 </li></ul></ul><ul><ul><li>3. 192.168.1.128 ----- 192.168.1.191 </li></ul></ul><ul><ul><li>4. 192.168.1.192 ----- 192.168.1.255 </li></ul></ul><ul><ul><li>Each Network Range can have around 60-61 Hosts each, which is the best possible Subnetting for 50 Hosts </li></ul></ul>
  14. 14. Thanks for Viewing <ul><li>. </li></ul>

×