SlideShare a Scribd company logo
1 of 65
Chapter 4 IP Addresses: Classful Addressing
CONTENTS ,[object Object],[object Object],[object Object],[object Object]
INTRODUCTION 4.1
An IP address is a  32-bit  address.
The IP addresses  are  unique.
Address Space addr15 addr1 addr2 addr41 addr31 addr226 ………… .. ………… .. ………… .. ………… .. ………… .. ………… .. ………… ..
RULE: addr15 addr1 addr2 addr41 addr31 addr226 ………… .. ………… .. ………… .. ………… .. ………… .. ………… .. ………… .. If a protocol uses  N  bits to  define an address,  the address space is 2 N   because each bit can have two  different values (0 and 1) and  N  bits can have 2 N  values.
The address space of IPv4 is  2 32   or  4,294,967,296.
01110101  10010101  00011101  11101010 Binary Notation
Figure  4-1 Dotted-decimal notation
0111 0101  1001 0101  0001 1101  1110 1010 Hexadecimal Notation 75  95  1D  EA 0x 75951DEA
The binary, decimal, and  hexadecimal number  systems are reviewed in  Appendix B.
Example 1 Change the following IP address from binary notation to dotted-decimal notation. 10000001  00001011  00001011 11101111 Solution 129.11.11.239
Example 2 Change the following IP address from dotted-decimal notation to binary notation. 111.56.45.78 Solution 01101111  00111000  00101101  01001110
Example 3 Find the error, if any, in the following IP address: 111.56.045.78 Solution There are no leading zeroes in  dotted-decimal notation (045).
Example 3 (continued) Find the error, if any, in the following IP address: 75.45.301.14 Solution In dotted-decimal notation,  each number is less than or  equal to 255; 301 is outside this range.
Example 4 Change the following IP addresses from binary notation to hexadecimal notation. 10000001  00001011  00001011 11101111 Solution 0X 810B0BEF  or  810B0BEF 16
CLASSFUL  ADDRESSING 4.2
Figure  4-2 Occupation of the address space
In classful addressing,  the address space is  divided into five classes:  A ,  B ,  C ,  D , and  E .
Figure  4-3 Finding the class in binary notation
Figure  4-4 Finding the address class
Example 5 How can we prove that we have 2,147,483,648 addresses in class A? Solution In class A, only 1 bit defines the class.  The remaining 31 bits are available  for the address. With 31 bits,  we can have 2 31  or 2,147,483,648 addresses.
Example 6 Find the class of the address: 0 0000001  00001011  00001011 11101111 Solution The first bit is 0. This is a class A address.
Example 6 (Continued) Find the class of the address: 110 00001  10000011  00011011 11111111 Solution The first 2 bits are 1; the third bit is 0.  This is a class C address.
Figure  4-5 Finding the class in decimal notation
Example 7 Find the class of the address: 227 .12.14.87 Solution The first byte is 227 (between 224 and 239);  the class is D.
Example 7 (Continued) Find the class of the address: 193 .14.56.22 Solution The first byte is 193 (between 192 and 223); the class is C.
Example 8 In Example 4 we showed that class A has 2 31  (2,147,483,648) addresses. How can we prove this same fact using dotted-decimal notation?  Solution The addresses in class A range from 0.0.0.0 to  127.255.255.255. We notice that we are  dealing with base 256 numbers here.
Solution (Continued) Each byte in the notation has a weight.  The weights are as follows: 256 3  , 256 2 , 256 1 , 256 0 Last address:  127    256 3  + 255    256 2  +    255    256 1  + 255    256 0  = 2,147,483,647 First address:  =  0 If we subtract the first from the  last and add 1, we get 2,147,483,648.
Figure  4-6 Netid and hostid
Figure  4-7 Blocks in class A
Millions of class A addresses  are wasted.
Figure  4-8 Blocks in class B
Many class B addresses  are wasted.
Figure  4-9 Blocks in class C
The number of addresses in  a class C block  is smaller than  the needs of most organizations.
Class D addresses  are used for multicasting;  there is only  one block in this class.
Class E addresses are reserved for special purposes;  most of the block is wasted.
Network Addresses The network address is the first address. The network address defines the network to the rest of the Internet.  Given the network address, we can find the class of the address, the block, and the range of the addresses in the block
In classful addressing,  the network address  (the first address in the block)  is the one that is assigned  to the organization.
Example 9 Given the network address 17.0.0.0, find the class, the block, and the range of the addresses. Solution The class is A because the first byte is between  0 and 127. The block has a netid of 17.  The addresses range from 17.0.0.0 to  17.255.255.255.
Example 10 Given the network address 132.21.0.0, find the class, the block, and the range of the addresses. Solution The class is B because the first byte is between  128 and 191. The block has a netid of  132.21. The addresses range from  132.21.0.0 to 132.21.255.255.
Example 11 Given the network address 220.34.76.0, find the class, the block, and the range of the addresses. Solution The class is C because the first byte is between  192 and 223. The block has a netid of 220.34.76.  The addresses range from 220.34.76.0  to 220.34.76.255.
Mask A mask is a 32-bit binary number that gives the first address in the block (the network address) when bitwise ANDed with an address in the block.
Figure  4-10 Masking concept
Figure  4-11 AND operation
The network address is the  beginning address of each block.  It can be found by applying  the default mask to any of the addresses in the block  (including itself).  It retains the  netid  of the block  and sets the  hostid  to zero.
Example 12 Given the address 23.56.7.91 and the default class A mask, find the beginning address (network address). Solution The default mask is 255.0.0.0, which means  that only the first byte is preserved  and the other 3 bytes are set to 0s.  The network address is 23.0.0.0.
Example 13 Given the address 132.6.17.85 and the default class B mask, find the beginning address (network address). Solution The default mask is 255.255.0.0, which means  that the first 2 bytes are preserved  and the other 2 bytes are set to 0s.  The network address is 132.6.0.0.
Example 14 Given the address 201.180.56.5 and the class C default mask, find the beginning address (network address). Solution The default mask is 255.255.255.0,  which means that the first 3 bytes are  preserved and the last byte is set to 0.  The network address is 201.180.56.0.
We must not  apply the default mask  of one class to  an address belonging  to another class.
OTHER  ISSUES 4.13
Figure  4-12 Multihomed devices
Figure  4-13 Network addresses
Figure  4-14 Example of direct broadcast address
Figure  4-15 Example of limited broadcast address
Figure  4-16 Example of  this  host on  this  address
Figure  4-17 Example of specific host on  this  network
Figure  4-18 Example of loopback address
Private Addresses A number of blocks in each class are assigned for private use. They are not recognized globally. These blocks are depicted in Table 4.4
Unicast, Multicast, and Broadcast Addresses Unicast communication is  one-to-one . Multicast communication is  one-to-many . Broadcast communication is  one-to-all .
Multicast delivery will be  discussed in depth in  Chapter 14.
A SAMPLE  INTERNET  WITH  CLASSFUL  ADDRESSES 4.4
Figure  4-19 Sample internet

More Related Content

What's hot

4a logical laddressing
4a logical laddressing4a logical laddressing
4a logical laddressingkavish dani
 
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree BhadraSubnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree BhadraSovonesh Pal
 
Ch19 network layer-logical add
Ch19 network layer-logical addCh19 network layer-logical add
Ch19 network layer-logical addMohammed Romi
 
NP - Unit 2 - Internet Addressing, ARP and RARP
NP - Unit 2 - Internet Addressing, ARP and RARP NP - Unit 2 - Internet Addressing, ARP and RARP
NP - Unit 2 - Internet Addressing, ARP and RARP hamsa nandhini
 
Smu bsc it sem 1 fall 2014 solved assignments
Smu bsc it sem  1 fall 2014 solved assignmentsSmu bsc it sem  1 fall 2014 solved assignments
Smu bsc it sem 1 fall 2014 solved assignmentssmumbahelp
 
Chapter 7 Formats in MATLAB
Chapter 7 Formats in MATLABChapter 7 Formats in MATLAB
Chapter 7 Formats in MATLABPranoti Doke
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
ISMG 2800 123456789
ISMG 2800 123456789ISMG 2800 123456789
ISMG 2800 123456789etirf1
 
LEC 7-DS ALGO(expression and huffman).pdf
LEC 7-DS  ALGO(expression and huffman).pdfLEC 7-DS  ALGO(expression and huffman).pdf
LEC 7-DS ALGO(expression and huffman).pdfMuhammadUmerIhtisham
 

What's hot (20)

4a logical laddressing
4a logical laddressing4a logical laddressing
4a logical laddressing
 
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree BhadraSubnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
 
Ch19 network layer-logical add
Ch19 network layer-logical addCh19 network layer-logical add
Ch19 network layer-logical add
 
NP - Unit 2 - Internet Addressing, ARP and RARP
NP - Unit 2 - Internet Addressing, ARP and RARP NP - Unit 2 - Internet Addressing, ARP and RARP
NP - Unit 2 - Internet Addressing, ARP and RARP
 
Ch2020
Ch2020Ch2020
Ch2020
 
3 ip address
3 ip address3 ip address
3 ip address
 
Ip addressing classless
Ip addressing classlessIp addressing classless
Ip addressing classless
 
Explaining ip address
Explaining ip addressExplaining ip address
Explaining ip address
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
Smu bsc it sem 1 fall 2014 solved assignments
Smu bsc it sem  1 fall 2014 solved assignmentsSmu bsc it sem  1 fall 2014 solved assignments
Smu bsc it sem 1 fall 2014 solved assignments
 
Chapter 7 Formats in MATLAB
Chapter 7 Formats in MATLABChapter 7 Formats in MATLAB
Chapter 7 Formats in MATLAB
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Compression ii
Compression iiCompression ii
Compression ii
 
DIGITAL DESIGN
DIGITAL DESIGNDIGITAL DESIGN
DIGITAL DESIGN
 
ISMG 2800 123456789
ISMG 2800 123456789ISMG 2800 123456789
ISMG 2800 123456789
 
LEC 7-DS ALGO(expression and huffman).pdf
LEC 7-DS  ALGO(expression and huffman).pdfLEC 7-DS  ALGO(expression and huffman).pdf
LEC 7-DS ALGO(expression and huffman).pdf
 
Alg2 lesson 4-7
Alg2 lesson 4-7Alg2 lesson 4-7
Alg2 lesson 4-7
 
IIT JEE Advanced2 2013
IIT JEE Advanced2 2013IIT JEE Advanced2 2013
IIT JEE Advanced2 2013
 

Similar to Ch04

Similar to Ch04 (20)

About ip address
About ip addressAbout ip address
About ip address
 
IPv4 Address uploading.ppt
IPv4 Address uploading.pptIPv4 Address uploading.ppt
IPv4 Address uploading.ppt
 
Lecture W4 CN IP Addressing P1.pptx
Lecture W4 CN IP Addressing P1.pptxLecture W4 CN IP Addressing P1.pptx
Lecture W4 CN IP Addressing P1.pptx
 
Network_layer_addressing.pptx
Network_layer_addressing.pptxNetwork_layer_addressing.pptx
Network_layer_addressing.pptx
 
1606660774-ip-addresses-classful-3.ppt
1606660774-ip-addresses-classful-3.ppt1606660774-ip-addresses-classful-3.ppt
1606660774-ip-addresses-classful-3.ppt
 
IP-address trial.ppt
IP-address trial.pptIP-address trial.ppt
IP-address trial.ppt
 
IP addressing
IP addressingIP addressing
IP addressing
 
IP addressing
IP addressingIP addressing
IP addressing
 
Ch05
Ch05Ch05
Ch05
 
Chap 04
Chap 04Chap 04
Chap 04
 
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.pptForouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
 
ip address
ip addressip address
ip address
 
Chapter 19
Chapter 19Chapter 19
Chapter 19
 
Umutima.ppt
Umutima.pptUmutima.ppt
Umutima.ppt
 
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
 
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
 
Ip addressing classless
Ip addressing classlessIp addressing classless
Ip addressing classless
 
20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks 20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks
 
CN Unit 3
CN Unit 3 CN Unit 3
CN Unit 3
 
Lecture 03 networking
Lecture 03 networkingLecture 03 networking
Lecture 03 networking
 

More from tejindershami (20)

Ch30
Ch30Ch30
Ch30
 
Ch29
Ch29Ch29
Ch29
 
Ch28
Ch28Ch28
Ch28
 
Ch27
Ch27Ch27
Ch27
 
Ch26
Ch26Ch26
Ch26
 
Ch25
Ch25Ch25
Ch25
 
Ch24
Ch24Ch24
Ch24
 
Ch23
Ch23Ch23
Ch23
 
Ch22
Ch22Ch22
Ch22
 
Ch21
Ch21Ch21
Ch21
 
Ch20
Ch20Ch20
Ch20
 
Ch19
Ch19Ch19
Ch19
 
Ch18
Ch18Ch18
Ch18
 
Ch17
Ch17Ch17
Ch17
 
Ch16
Ch16Ch16
Ch16
 
Ch15
Ch15Ch15
Ch15
 
Ch14
Ch14Ch14
Ch14
 
Ch13
Ch13Ch13
Ch13
 
Ch12
Ch12Ch12
Ch12
 
Ch11
Ch11Ch11
Ch11
 

Recently uploaded

Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Ch04

  • 1. Chapter 4 IP Addresses: Classful Addressing
  • 2.
  • 4. An IP address is a 32-bit address.
  • 5. The IP addresses are unique.
  • 6. Address Space addr15 addr1 addr2 addr41 addr31 addr226 ………… .. ………… .. ………… .. ………… .. ………… .. ………… .. ………… ..
  • 7. RULE: addr15 addr1 addr2 addr41 addr31 addr226 ………… .. ………… .. ………… .. ………… .. ………… .. ………… .. ………… .. If a protocol uses N bits to define an address, the address space is 2 N because each bit can have two different values (0 and 1) and N bits can have 2 N values.
  • 8. The address space of IPv4 is 2 32 or 4,294,967,296.
  • 9. 01110101 10010101 00011101 11101010 Binary Notation
  • 10. Figure 4-1 Dotted-decimal notation
  • 11. 0111 0101 1001 0101 0001 1101 1110 1010 Hexadecimal Notation 75 95 1D EA 0x 75951DEA
  • 12. The binary, decimal, and hexadecimal number systems are reviewed in Appendix B.
  • 13. Example 1 Change the following IP address from binary notation to dotted-decimal notation. 10000001 00001011 00001011 11101111 Solution 129.11.11.239
  • 14. Example 2 Change the following IP address from dotted-decimal notation to binary notation. 111.56.45.78 Solution 01101111 00111000 00101101 01001110
  • 15. Example 3 Find the error, if any, in the following IP address: 111.56.045.78 Solution There are no leading zeroes in dotted-decimal notation (045).
  • 16. Example 3 (continued) Find the error, if any, in the following IP address: 75.45.301.14 Solution In dotted-decimal notation, each number is less than or equal to 255; 301 is outside this range.
  • 17. Example 4 Change the following IP addresses from binary notation to hexadecimal notation. 10000001 00001011 00001011 11101111 Solution 0X 810B0BEF or 810B0BEF 16
  • 19. Figure 4-2 Occupation of the address space
  • 20. In classful addressing, the address space is divided into five classes: A , B , C , D , and E .
  • 21. Figure 4-3 Finding the class in binary notation
  • 22. Figure 4-4 Finding the address class
  • 23. Example 5 How can we prove that we have 2,147,483,648 addresses in class A? Solution In class A, only 1 bit defines the class. The remaining 31 bits are available for the address. With 31 bits, we can have 2 31 or 2,147,483,648 addresses.
  • 24. Example 6 Find the class of the address: 0 0000001 00001011 00001011 11101111 Solution The first bit is 0. This is a class A address.
  • 25. Example 6 (Continued) Find the class of the address: 110 00001 10000011 00011011 11111111 Solution The first 2 bits are 1; the third bit is 0. This is a class C address.
  • 26. Figure 4-5 Finding the class in decimal notation
  • 27. Example 7 Find the class of the address: 227 .12.14.87 Solution The first byte is 227 (between 224 and 239); the class is D.
  • 28. Example 7 (Continued) Find the class of the address: 193 .14.56.22 Solution The first byte is 193 (between 192 and 223); the class is C.
  • 29. Example 8 In Example 4 we showed that class A has 2 31 (2,147,483,648) addresses. How can we prove this same fact using dotted-decimal notation? Solution The addresses in class A range from 0.0.0.0 to 127.255.255.255. We notice that we are dealing with base 256 numbers here.
  • 30. Solution (Continued) Each byte in the notation has a weight. The weights are as follows: 256 3 , 256 2 , 256 1 , 256 0 Last address: 127    256 3  + 255    256 2  +  255    256 1  + 255    256 0  = 2,147,483,647 First address: = 0 If we subtract the first from the last and add 1, we get 2,147,483,648.
  • 31. Figure 4-6 Netid and hostid
  • 32. Figure 4-7 Blocks in class A
  • 33. Millions of class A addresses are wasted.
  • 34. Figure 4-8 Blocks in class B
  • 35. Many class B addresses are wasted.
  • 36. Figure 4-9 Blocks in class C
  • 37. The number of addresses in a class C block is smaller than the needs of most organizations.
  • 38. Class D addresses are used for multicasting; there is only one block in this class.
  • 39. Class E addresses are reserved for special purposes; most of the block is wasted.
  • 40. Network Addresses The network address is the first address. The network address defines the network to the rest of the Internet. Given the network address, we can find the class of the address, the block, and the range of the addresses in the block
  • 41. In classful addressing, the network address (the first address in the block) is the one that is assigned to the organization.
  • 42. Example 9 Given the network address 17.0.0.0, find the class, the block, and the range of the addresses. Solution The class is A because the first byte is between 0 and 127. The block has a netid of 17. The addresses range from 17.0.0.0 to 17.255.255.255.
  • 43. Example 10 Given the network address 132.21.0.0, find the class, the block, and the range of the addresses. Solution The class is B because the first byte is between 128 and 191. The block has a netid of 132.21. The addresses range from 132.21.0.0 to 132.21.255.255.
  • 44. Example 11 Given the network address 220.34.76.0, find the class, the block, and the range of the addresses. Solution The class is C because the first byte is between 192 and 223. The block has a netid of 220.34.76. The addresses range from 220.34.76.0 to 220.34.76.255.
  • 45. Mask A mask is a 32-bit binary number that gives the first address in the block (the network address) when bitwise ANDed with an address in the block.
  • 46. Figure 4-10 Masking concept
  • 47. Figure 4-11 AND operation
  • 48. The network address is the beginning address of each block. It can be found by applying the default mask to any of the addresses in the block (including itself). It retains the netid of the block and sets the hostid to zero.
  • 49. Example 12 Given the address 23.56.7.91 and the default class A mask, find the beginning address (network address). Solution The default mask is 255.0.0.0, which means that only the first byte is preserved and the other 3 bytes are set to 0s. The network address is 23.0.0.0.
  • 50. Example 13 Given the address 132.6.17.85 and the default class B mask, find the beginning address (network address). Solution The default mask is 255.255.0.0, which means that the first 2 bytes are preserved and the other 2 bytes are set to 0s. The network address is 132.6.0.0.
  • 51. Example 14 Given the address 201.180.56.5 and the class C default mask, find the beginning address (network address). Solution The default mask is 255.255.255.0, which means that the first 3 bytes are preserved and the last byte is set to 0. The network address is 201.180.56.0.
  • 52. We must not apply the default mask of one class to an address belonging to another class.
  • 53. OTHER ISSUES 4.13
  • 54. Figure 4-12 Multihomed devices
  • 55. Figure 4-13 Network addresses
  • 56. Figure 4-14 Example of direct broadcast address
  • 57. Figure 4-15 Example of limited broadcast address
  • 58. Figure 4-16 Example of this host on this address
  • 59. Figure 4-17 Example of specific host on this network
  • 60. Figure 4-18 Example of loopback address
  • 61. Private Addresses A number of blocks in each class are assigned for private use. They are not recognized globally. These blocks are depicted in Table 4.4
  • 62. Unicast, Multicast, and Broadcast Addresses Unicast communication is one-to-one . Multicast communication is one-to-many . Broadcast communication is one-to-all .
  • 63. Multicast delivery will be discussed in depth in Chapter 14.
  • 64. A SAMPLE INTERNET WITH CLASSFUL ADDRESSES 4.4
  • 65. Figure 4-19 Sample internet