SlideShare a Scribd company logo
1
IP Subnetting
(Modified version of slides from Rick Graziani)
Karim El Defrawy
Donald Bren School of Information and Computer Science
University of California Irvine
The Catch
Before subnetting:
• In any network (or subnet) one can use most of the IP
addresses for host addresses.
• One loses two addresses for every network or subnet.
1. Network Address - One address is reserved to that of the
network.
2. Broadcast Address – One address is reserved to address all
hosts in that network or subnet.
Subnet Example
Network address 172.19.0.0 with /16 network mask
Network Network Host Host
172 19 0 0
Subnet Example
Network Network Subnet Host
Network address 172.19.0.0 with /16 network mask
Using Subnets: subnet mask 255.255.255.0 or /24
• Applying a mask which is larger than the default subnet
mask, will divide your network into subnets.
• Subnet mask used here is 255.255.255.0 or /24
Network Mask:
255.255.0.0 or /16
Subnet Mask:
255.255.255.0 or /24
11111111 11111111 00000000 00000000
11111111 11111111 11111111 00000000
Network Network Host Host
172 19 0 0
Subnet Example
Network Network Subnet Host
Network address 172.19.0.0 with /16 network mask
172 19 0 Host
172 19 1 Host
172 19 2 Host
Using Subnets: subnet mask 255.255.255.0 or /24
172 19 3 Host
172 19 etc. Host
172 19 254 Host
172 19 255 Host
255
Subnets
28 - 1
Cannot use last
subnet as it
contains broadcast
address
Subnets
Subnet Example
Network Network Subnet Host
Network address 172.19.0.0 with /16 network mask
172 19 0 0
172 19 1 0
172 19 2 0
Using Subnets: subnet mask 255.255.255.0 or /24
172 19 3 0
172 19 etc. 0
172 19 254 0
172 19 255 0
255
Subnets
28 - 1
Cannot use last
subnet as it
contains broadcast
address
Subnets
Addresses
Subnet Example
Network Network Subnet Hosts
Class B address 172.19.0.0 with /16 network mask
172 19 0 1
172 19 1 1
172 19 2 1
Using Subnets: subnet mask 255.255.255.0 or /24
172 19 3 1
172 19 etc. 1
172 19 254 1
172 19 255 Host
Each subnet has
254 hosts, 28 – 2
254
254
254
254
254
254
Hosts
Addresses
Subnet Example
Network Network Subnet Host
Network address 172.19.0.0 with /16 network mask
172 19 0 255
172 19 1 255
172 19 2 255
Using Subnets: subnet mask 255.255.255.0 or /24
172 19 3 255
172 19 etc. 255
172 19 254 255
172 19 255 255
255
Subnets
28 - 1
Cannot use last
subnet as it
contains broadcast
address
Broadcast
Addresses
Subnet Example
Network address 172.19.0.0 with /16 network mask
Using Subnets: subnet mask 255.255.255.0 or /24
172.19.0.0/24 172.19.10.0/24
172.19.5.0/24 172.19.25.0/24
Important things to remember about Subnetting
• You can only subnet the host portion, you do not have control of the
network portion.
• Subnetting does not give you more hosts, it only allows you to divide your
larger network into smaller networks.
• When subnetting, you will actually lose host adresses:
– For each subnet you lose the address of that subnet
– For each subnet you lose the broadcast address of that subnet
– You “may” lose the first and last subnets
• Why would you want to subnet?
– Divide larger network into smaller networks
– Limit layer 2 and layer 3 broadcasts to their subnet.
– Better management of traffic.
Subnetting – Example
• Host IP Address: 138.101.114.250
• Network Mask: 255.255.0.0 (or /16)
• Subnet Mask: 255.255.255.192 (or /26)
Given the following Host IP Address, Network Mask and Subnet mask find the
following information:
• Major Network Information
– Major Network Address
– Major Network Broadcast Address
– Range of Hosts if not subnetted
• Subnet Information
– Subnet Address
– Range of Host Addresses (first host and last host)
– Broadcast Address
• Other Subnet Information
– Total number of subnets
– Number of hosts per subnet
Major Network Information
• Host IP Address: 138.101.114.250
• Network Mask: 255.255.0.0
• Subnet Mask: 255.255.255.192
• Major Network Address: 138.101.0.0
• Major Network Broadcast Address: 138.101.255.255
• Range of Hosts if not Subnetted: 138.101.0.1 to 138.101.255.254
Step 1:
Translate Host IP Address and Subnet Mask into binary notation
138. 101. 114. 250
IP Address 10001010 01100101 01110010 11111010
Mask 11111111 11111111 11111111 11000000
255. 255. 255. 192
Step 1: Convert to Binary
128 64 32 16 8 4 2 1
Step 2:
Determine the Network (or Subnet) where this Host address lives:
1. Draw a line under the mask
2. Perform a bit-wise AND operation on the IP Address and the Subnet
Mask
Note: 1 AND 1 results in a 1, 0 AND anything results in a 0
3. Express the result in Dotted Decimal Notation
4. The result is the Subnet Address of this Subnet or “Wire” which is
138.101.114.192
138. 101. 114. 250
IP Address 10001010 01100101 01110010 11111010
Mask 11111111 11111111 11111111 11000000
Network 10001010 01100101 01110010 11000000
138 101 114 192
Step 2: Find the Subnet Address
Step 2:
Determine the Network (or Subnet) where this Host address lives:
Quick method:
1. Find the last (right-most) 1 bit in the subnet mask.
2. Copy all of the bits in the IP address to the Network Address
3. Add 0’s for the rest of the bits in the Network Address
138. 101. 114. 250
IP Address 10001010 01100101 01110010 11111010
Mask 11111111 11111111 11111111 11000000
Network 10001010 01100101 01110010 11000000
138 101 114 192
Step 2: Find the Subnet Address
Step 3:
Determine which bits in the address contain Network (subnet)
information and which contain Host information:
• Use the Network Mask: 255.255.0.0 and divide (Great Divide) the
from the rest of the address.
• Use Subnet Mask: 255.255.255.192 and divide (Small Divide) the
subnet from the hosts between the last “1” and the first “0” in the
subnet mask.
G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010
Mask 11111111 11111111 11111111 11 000000
Network 10001010 01100101 01110010 11 000000
 subnet   host 
counting range counting
range
Step 3: Subnet Range / Host Range
Host Portion
• Subnet Address: all 0’s
• First Host: all 0’s and a 1 in rightmost bit
• Last Host: all 1’s and a 0 in rightmost bit
• Broadcast: all 1’s
G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010
Mask 11111111 11111111 11111111 11 000000
Network 10001010 01100101 01110010 11 000000
 subnet   host 
counting range counting
range
First Host 10001010 01100101 01110010 11 000001
138 101 114 193
Last Host 10001010 01100101 01110010 11 111110
138 101 114 254
Broadcast 10001010 01100101 01110010 11 111111
138 101 114 255
Step 4: First Host / Last Host
G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010
Mask 11111111 11111111 11111111 11 000000
Network 10001010 01100101 01110010 11 000000
 subnet   host 
counting range counting
range
First Host 10001010 01100101 01110010 11 000001
138 101 114 193
Last Host 10001010 01100101 01110010 11 111110
138 101 114 254
Broadcast 10001010 01100101 01110010 11 111111
138 101 114 255
• Total number of subnets
– Number of subnet bits 10
– 210 = 1,024
– 1,024 total subnets
• Subtract one “if” all-zeros subnet cannot be used
• Subtract one “if” all-ones subnet cannot be used
Step 5: Total Number of Subnets
G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010
Mask 11111111 11111111 11111111 11 000000
Network 10001010 01100101 01110010 11 000000
 subnet   host 
counting range counting
range
First Host 10001010 01100101 01110010 11 000001
138 101 114 193
Last Host 10001010 01100101 01110010 11 111110
138 101 114 254
Broadcast 10001010 01100101 01110010 11 111111
138 101 114 255
• Total number of hosts per subnet
– Number of host bits 6
– 26 = 64
– 64 host per subnets
• Subtract one for the subnet address
• Subtract one for the broadcast address
– 62 hosts per subnet
Step 6: Total Number of Hosts per Subnet

More Related Content

Similar to 8-Additional_IPSubnetting_KED (2).ppt

Easy subnetting
Easy subnettingEasy subnetting
Easy subnetting
Saravanan Kanagasabapathi
 
Ip -subnetting
Ip  -subnettingIp  -subnetting
Ip -subnettingnithinj54
 
Subnetting Presentation
Subnetting PresentationSubnetting Presentation
Subnetting PresentationTouhidul Fahim
 
IP Subnetting
IP SubnettingIP Subnetting
IP Subnetting
Shahzad Rashid
 
Fixed Length Subnetting about ip address.pptx
Fixed Length Subnetting about ip address.pptxFixed Length Subnetting about ip address.pptx
Fixed Length Subnetting about ip address.pptx
Shaqib3
 
Subnetting
SubnettingSubnetting
Subnetting
Netwax Lab
 
Bots.pdf
Bots.pdfBots.pdf
Bots.pdf
nomanurrahman2
 
Oct. 14, 2011 webcast ch7 subnets bruce hartpence
Oct. 14, 2011 webcast ch7 subnets bruce hartpenceOct. 14, 2011 webcast ch7 subnets bruce hartpence
Oct. 14, 2011 webcast ch7 subnets bruce hartpence
O'Reilly Media
 
Vlsm
VlsmVlsm
6a52807edaf99ecbfafb8ecf2439b542b3623dea-1647242881015.pdf
6a52807edaf99ecbfafb8ecf2439b542b3623dea-1647242881015.pdf6a52807edaf99ecbfafb8ecf2439b542b3623dea-1647242881015.pdf
6a52807edaf99ecbfafb8ecf2439b542b3623dea-1647242881015.pdf
SILVIUSyt
 
Lesson 2: Subnetting basics
Lesson 2: Subnetting basicsLesson 2: Subnetting basics
Lesson 2: Subnetting basics
Mahmmoud Mahdi
 
IP Concept in LTE
IP Concept in LTEIP Concept in LTE
IP Concept in LTESofian .
 
Chap3. i pv4
Chap3. i pv4Chap3. i pv4
Chap3. i pv4
東原 李
 
How IP address works
How IP address worksHow IP address works
How IP address works
Sanjeev Kumar Jaiswal
 
chapter 4.pptx
chapter 4.pptxchapter 4.pptx
chapter 4.pptx
aakritii765
 
Network Layer
Network LayerNetwork Layer
Network Layer
Kamal Acharya
 
IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)
cuetcse
 
Ipaddress presentationdemoclass
Ipaddress presentationdemoclassIpaddress presentationdemoclass
Ipaddress presentationdemoclassaskme
 
IP Addressing and Subnetting
IP Addressing and SubnettingIP Addressing and Subnetting
IP Addressing and Subnetting
Atakan ATAK
 
Ip addresses
Ip addressesIp addresses
Ip addressesAsif
 

Similar to 8-Additional_IPSubnetting_KED (2).ppt (20)

Easy subnetting
Easy subnettingEasy subnetting
Easy subnetting
 
Ip -subnetting
Ip  -subnettingIp  -subnetting
Ip -subnetting
 
Subnetting Presentation
Subnetting PresentationSubnetting Presentation
Subnetting Presentation
 
IP Subnetting
IP SubnettingIP Subnetting
IP Subnetting
 
Fixed Length Subnetting about ip address.pptx
Fixed Length Subnetting about ip address.pptxFixed Length Subnetting about ip address.pptx
Fixed Length Subnetting about ip address.pptx
 
Subnetting
SubnettingSubnetting
Subnetting
 
Bots.pdf
Bots.pdfBots.pdf
Bots.pdf
 
Oct. 14, 2011 webcast ch7 subnets bruce hartpence
Oct. 14, 2011 webcast ch7 subnets bruce hartpenceOct. 14, 2011 webcast ch7 subnets bruce hartpence
Oct. 14, 2011 webcast ch7 subnets bruce hartpence
 
Vlsm
VlsmVlsm
Vlsm
 
6a52807edaf99ecbfafb8ecf2439b542b3623dea-1647242881015.pdf
6a52807edaf99ecbfafb8ecf2439b542b3623dea-1647242881015.pdf6a52807edaf99ecbfafb8ecf2439b542b3623dea-1647242881015.pdf
6a52807edaf99ecbfafb8ecf2439b542b3623dea-1647242881015.pdf
 
Lesson 2: Subnetting basics
Lesson 2: Subnetting basicsLesson 2: Subnetting basics
Lesson 2: Subnetting basics
 
IP Concept in LTE
IP Concept in LTEIP Concept in LTE
IP Concept in LTE
 
Chap3. i pv4
Chap3. i pv4Chap3. i pv4
Chap3. i pv4
 
How IP address works
How IP address worksHow IP address works
How IP address works
 
chapter 4.pptx
chapter 4.pptxchapter 4.pptx
chapter 4.pptx
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)
 
Ipaddress presentationdemoclass
Ipaddress presentationdemoclassIpaddress presentationdemoclass
Ipaddress presentationdemoclass
 
IP Addressing and Subnetting
IP Addressing and SubnettingIP Addressing and Subnetting
IP Addressing and Subnetting
 
Ip addresses
Ip addressesIp addresses
Ip addresses
 

Recently uploaded

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 

Recently uploaded (20)

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 

8-Additional_IPSubnetting_KED (2).ppt

  • 1. 1 IP Subnetting (Modified version of slides from Rick Graziani) Karim El Defrawy Donald Bren School of Information and Computer Science University of California Irvine
  • 2. The Catch Before subnetting: • In any network (or subnet) one can use most of the IP addresses for host addresses. • One loses two addresses for every network or subnet. 1. Network Address - One address is reserved to that of the network. 2. Broadcast Address – One address is reserved to address all hosts in that network or subnet.
  • 3. Subnet Example Network address 172.19.0.0 with /16 network mask Network Network Host Host 172 19 0 0
  • 4. Subnet Example Network Network Subnet Host Network address 172.19.0.0 with /16 network mask Using Subnets: subnet mask 255.255.255.0 or /24 • Applying a mask which is larger than the default subnet mask, will divide your network into subnets. • Subnet mask used here is 255.255.255.0 or /24 Network Mask: 255.255.0.0 or /16 Subnet Mask: 255.255.255.0 or /24 11111111 11111111 00000000 00000000 11111111 11111111 11111111 00000000 Network Network Host Host 172 19 0 0
  • 5. Subnet Example Network Network Subnet Host Network address 172.19.0.0 with /16 network mask 172 19 0 Host 172 19 1 Host 172 19 2 Host Using Subnets: subnet mask 255.255.255.0 or /24 172 19 3 Host 172 19 etc. Host 172 19 254 Host 172 19 255 Host 255 Subnets 28 - 1 Cannot use last subnet as it contains broadcast address Subnets
  • 6. Subnet Example Network Network Subnet Host Network address 172.19.0.0 with /16 network mask 172 19 0 0 172 19 1 0 172 19 2 0 Using Subnets: subnet mask 255.255.255.0 or /24 172 19 3 0 172 19 etc. 0 172 19 254 0 172 19 255 0 255 Subnets 28 - 1 Cannot use last subnet as it contains broadcast address Subnets Addresses
  • 7. Subnet Example Network Network Subnet Hosts Class B address 172.19.0.0 with /16 network mask 172 19 0 1 172 19 1 1 172 19 2 1 Using Subnets: subnet mask 255.255.255.0 or /24 172 19 3 1 172 19 etc. 1 172 19 254 1 172 19 255 Host Each subnet has 254 hosts, 28 – 2 254 254 254 254 254 254 Hosts Addresses
  • 8. Subnet Example Network Network Subnet Host Network address 172.19.0.0 with /16 network mask 172 19 0 255 172 19 1 255 172 19 2 255 Using Subnets: subnet mask 255.255.255.0 or /24 172 19 3 255 172 19 etc. 255 172 19 254 255 172 19 255 255 255 Subnets 28 - 1 Cannot use last subnet as it contains broadcast address Broadcast Addresses
  • 9. Subnet Example Network address 172.19.0.0 with /16 network mask Using Subnets: subnet mask 255.255.255.0 or /24 172.19.0.0/24 172.19.10.0/24 172.19.5.0/24 172.19.25.0/24
  • 10. Important things to remember about Subnetting • You can only subnet the host portion, you do not have control of the network portion. • Subnetting does not give you more hosts, it only allows you to divide your larger network into smaller networks. • When subnetting, you will actually lose host adresses: – For each subnet you lose the address of that subnet – For each subnet you lose the broadcast address of that subnet – You “may” lose the first and last subnets • Why would you want to subnet? – Divide larger network into smaller networks – Limit layer 2 and layer 3 broadcasts to their subnet. – Better management of traffic.
  • 11. Subnetting – Example • Host IP Address: 138.101.114.250 • Network Mask: 255.255.0.0 (or /16) • Subnet Mask: 255.255.255.192 (or /26) Given the following Host IP Address, Network Mask and Subnet mask find the following information: • Major Network Information – Major Network Address – Major Network Broadcast Address – Range of Hosts if not subnetted • Subnet Information – Subnet Address – Range of Host Addresses (first host and last host) – Broadcast Address • Other Subnet Information – Total number of subnets – Number of hosts per subnet
  • 12. Major Network Information • Host IP Address: 138.101.114.250 • Network Mask: 255.255.0.0 • Subnet Mask: 255.255.255.192 • Major Network Address: 138.101.0.0 • Major Network Broadcast Address: 138.101.255.255 • Range of Hosts if not Subnetted: 138.101.0.1 to 138.101.255.254
  • 13. Step 1: Translate Host IP Address and Subnet Mask into binary notation 138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 255. 255. 255. 192 Step 1: Convert to Binary 128 64 32 16 8 4 2 1
  • 14. Step 2: Determine the Network (or Subnet) where this Host address lives: 1. Draw a line under the mask 2. Perform a bit-wise AND operation on the IP Address and the Subnet Mask Note: 1 AND 1 results in a 1, 0 AND anything results in a 0 3. Express the result in Dotted Decimal Notation 4. The result is the Subnet Address of this Subnet or “Wire” which is 138.101.114.192 138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 Network 10001010 01100101 01110010 11000000 138 101 114 192 Step 2: Find the Subnet Address
  • 15. Step 2: Determine the Network (or Subnet) where this Host address lives: Quick method: 1. Find the last (right-most) 1 bit in the subnet mask. 2. Copy all of the bits in the IP address to the Network Address 3. Add 0’s for the rest of the bits in the Network Address 138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 Network 10001010 01100101 01110010 11000000 138 101 114 192 Step 2: Find the Subnet Address
  • 16. Step 3: Determine which bits in the address contain Network (subnet) information and which contain Host information: • Use the Network Mask: 255.255.0.0 and divide (Great Divide) the from the rest of the address. • Use Subnet Mask: 255.255.255.192 and divide (Small Divide) the subnet from the hosts between the last “1” and the first “0” in the subnet mask. G.D. S.D. IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000  subnet   host  counting range counting range Step 3: Subnet Range / Host Range
  • 17. Host Portion • Subnet Address: all 0’s • First Host: all 0’s and a 1 in rightmost bit • Last Host: all 1’s and a 0 in rightmost bit • Broadcast: all 1’s G.D. S.D. IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000  subnet   host  counting range counting range First Host 10001010 01100101 01110010 11 000001 138 101 114 193 Last Host 10001010 01100101 01110010 11 111110 138 101 114 254 Broadcast 10001010 01100101 01110010 11 111111 138 101 114 255 Step 4: First Host / Last Host
  • 18. G.D. S.D. IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000  subnet   host  counting range counting range First Host 10001010 01100101 01110010 11 000001 138 101 114 193 Last Host 10001010 01100101 01110010 11 111110 138 101 114 254 Broadcast 10001010 01100101 01110010 11 111111 138 101 114 255 • Total number of subnets – Number of subnet bits 10 – 210 = 1,024 – 1,024 total subnets • Subtract one “if” all-zeros subnet cannot be used • Subtract one “if” all-ones subnet cannot be used Step 5: Total Number of Subnets
  • 19. G.D. S.D. IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000  subnet   host  counting range counting range First Host 10001010 01100101 01110010 11 000001 138 101 114 193 Last Host 10001010 01100101 01110010 11 111110 138 101 114 254 Broadcast 10001010 01100101 01110010 11 111111 138 101 114 255 • Total number of hosts per subnet – Number of host bits 6 – 26 = 64 – 64 host per subnets • Subtract one for the subnet address • Subtract one for the broadcast address – 62 hosts per subnet Step 6: Total Number of Hosts per Subnet