SlideShare a Scribd company logo
Network Layer
Internet Protocols
19.2
IPv4 ADDRESSES
IPv4 ADDRESSES
An
An IPv4 address
IPv4 address is a
is a 32-bit
32-bit address that uniquely and
address that uniquely and
universally defines the connection of a device (for
universally defines the connection of a device (for
example, a computer or a router) to the Internet.
example, a computer or a router) to the Internet.
Address Space
Notations
Classful Addressing
Classless Addressing
Network Address Translation (NAT)
Topics discussed in this section:
Topics discussed in this section:
19.3
An IPv4 address is 32 bits long.
Note
19.4
The IPv4 addresses are unique
and universal.
Note
19.5
The address space of IPv4 is
232
or 4,294,967,296.
Note
19.6
Dotted-decimal notation and binary notation for an IPv4 address
19.7
Change the following IPv4 addresses from binary notation
to dotted-decimal notation.
Example
Solution
We replace each group of 8 bits with its equivalent decimal
number (see Appendix B) and add dots for separation.
19.8
Change the following IPv4 addresses from dotted-decimal
notation to binary notation.
Example
Solution
We replace each decimal number with its binary equivalent
19.9
In classful addressing :the address space is divided into five classes:
A, B, C, D, and E.
Finding the classes in binary and dotted-decimal notation
Number of networks /hosts in classful
addressing
0Network host
A 1.0.0.0 to
127.255.255.255
 2^7 networks as 7 bits represent network id
 2^(24) interfaces/hosts as 24 bits represent host id
10 network host
B 128.0.0.0 to
191.255.255.255
 2^(14) networks as 14 bits represent network id
 2^(16) interfaces /hosts as 16 bits represent host id
110 network host
C 192.0.0.0 to
223.255.255.255
 2^(21) networks
 2^(8) interfaces
Classful addressing
 E.g., Class C networks can accommodate only 2^8-2 = 254 hosts (2 are
reserved). Small for most medium to large organizations.
 However Class B supports 65,634 hosts – too large. An organization
with 2000 hosts ended up with class B addressing – address space was
ill used.
 Therefore in 1993, Classless Interdomain Routing (CIDR) was
introduced.
19.12
Find the class of each address.
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111
Example 19.4
Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
19.13
Table 19.1 Number of blocks and block size in classful IPv4 addressing
19.14
In classful addressing, a large part of the available addresses were
wasted.
Note
19.15
Table 19.2 Default masks for classful addressing
19.16
Classful addressing, which is almost obsolete, is replaced with classless
addressing.
Note
19.17
In IPv4 classless addressing, a block of
addresses can be defined as
x.y.z.t /n
in which x.y.z.t defines one of the addresses and the /n defines the mask.
Note
IP addressing: CIDR
• CIDR: Classless InterDomain Routing
– network portion of address of arbitrary length
– address format: a.b.c.d/x, where x is # bits in network portion of
address
• CIDR addressing example:
– CIDR: Network part: 21 bits. Host part: 2^11 = 2048 hosts.
19.19
The first address in the block can be found by setting the rightmost
32 − n bits to 0s.
Note
19.20
A block of addresses is granted to a small organization. We
know that one of the addresses is 205.16.37.39/28. What is
the first address in the block?
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 0, we get
11001101 00010000 00100101 0010000
or
205.16.37.32.
Example 1
19.21
The last address in the block can be found by setting the rightmost
32 − n bits to 1s.
Note
19.22
Find the last address for the block in previous Example
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32 − 28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111
or
205.16.37.47
This is actually the block shown in Figure 19.3.
Example
19.23
The number of addresses in the block can be found by using the formula
232−n
.
Note
19.24
Find the number of addresses in Example .
Example
Solution
The value of n is 28, which means that number
of addresses is 2 32−28
or 16.
19.25
Another way to find the first address, the last address, and
the number of addresses is to represent the mask as a 32-
bit binary (or 8-digit hexadecimal) number. This is
particularly useful when we are writing a program to find
these pieces of information. /28 can be represented as
11111111 11111111 11111111 11110000
(twenty-eight 1s and four 0s).
Find
a. The first address
b. The last address
c. The number of addresses.
Example
19.26
Solution
a. The first address can be found by ANDing the given
addresses with the mask. ANDing here is done bit by
bit. The result of ANDing 2 bits is 1 if both bits are 1s;
the result is 0 otherwise.
Example (continued)
19.27
b. The last address can be found by ORing the given
addresses with the complement of the mask. ORing
here is done bit by bit. The result of ORing 2 bits is 0 if
both bits are 0s; the result is 1 otherwise. The
complement of a number is found by changing each 1
to 0 and each 0 to 1.
Example (continued)
19.28
A network configuration for the block 205.16.37.32/28
19.29
The first address in a block is
normally not assigned to any device;
it is used as the network address that represents the organization
to the rest of the world.
Note
19.30
IPv6 ADDRESSES
IPv6 ADDRESSES
Despite all short-term solutions, address depletion is
Despite all short-term solutions, address depletion is
still a long-term problem for the Internet. This and
still a long-term problem for the Internet. This and
other problems in the IP protocol itself have been the
other problems in the IP protocol itself have been the
motivation for IPv6.
motivation for IPv6.
Structure
Address Space
Topics discussed in this section:
Topics discussed in this section:
19.31
An IPv6 address is 128 bits long.
Note
19.32
IPv6 address in binary and hexadecimal colon notation
19.33
Abbreviated IPv6 addresses
19.34
Expand the address 0:15::1:12:1213 to its original.
Example
Solution
We first need to align the left side of the double colon to the
left of the original pattern and the right side of the double
colon to the right of the original pattern to find how many
0s we need to replace the double colon.
This means that the original address is.
IPv4 Addressing Concepts and
Their IPv6 Equivalents
IPv4 Address IPv6 Address
Address Length – 32 bits 128 bits
Address Representation - decimal hexadecimal
Internet address classes Not applicable in IPv6
Multicast addresses (224.0.0.0/4) IPv6 multicast addresses (FF00::/8)
Broadcast addresses Not applicable in IPv6
Unspecified address is 0.0.0.0 Unspecified address is ::
Loopback address is 127.0.0.1 Loopback address is ::1
Public IP addresses Global unicast addresses
Private IP addresses (10.0.0.0/8,
172.16.0.0/12, and 192.168.0.0/16)
Site-local addresses (FEC0::/10)
Autoconfigured addresses (169.254.0.0/16) Link-local addresses (FE80::/64)
IPv6 Packet Format
35

More Related Content

PPTX
ip addressing _
PDF
IP addressing in computer Networks explanation
PPT
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
PPTX
ch 5.3 & 4 logical addrgggggggessing.pptx
PPT
Chapter 19: Logical Addressing
PPT
Data communications and networking ch19 forouzan.ppt
PPT
PPT
Theory of Eng ADDRESSING IN IPV IPV6.ppt
ip addressing _
IP addressing in computer Networks explanation
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
ch 5.3 & 4 logical addrgggggggessing.pptx
Chapter 19: Logical Addressing
Data communications and networking ch19 forouzan.ppt
Theory of Eng ADDRESSING IN IPV IPV6.ppt

Similar to ip addressing _ (20)

PPT
Network Layer Logical Addressing related topics
PPT
19 Network Layer_Logical_Addressing
PPT
Fiber Optical Networks and Data Communication
PDF
network-layer-forohhfbjhgvdefhnnmuzan.pdf
PPT
ch19new.ppt
PDF
Ch19 network layer-logical add
PPT
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
PDF
20CS2007 Computer Communication Networks
PPTX
Network_layer_addressing.pptx
PPT
IP Addressing.ppt Network layer IP addressing
PDF
Module 4 part 2.pdf this is computer networs module for cse students for study
PPTX
CN Unit 3
PPT
11 IP Addressing computer networks and modes
PPT
design and data anaylysis software development
PPT
Chapter 19
PPTX
NETWORK LAYER - Logical Addressing
PPT
Ch19
PPTX
Lecture W4 CN IP Addressing P1.pptx
PPT
network Addressing
Network Layer Logical Addressing related topics
19 Network Layer_Logical_Addressing
Fiber Optical Networks and Data Communication
network-layer-forohhfbjhgvdefhnnmuzan.pdf
ch19new.ppt
Ch19 network layer-logical add
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
20CS2007 Computer Communication Networks
Network_layer_addressing.pptx
IP Addressing.ppt Network layer IP addressing
Module 4 part 2.pdf this is computer networs module for cse students for study
CN Unit 3
11 IP Addressing computer networks and modes
design and data anaylysis software development
Chapter 19
NETWORK LAYER - Logical Addressing
Ch19
Lecture W4 CN IP Addressing P1.pptx
network Addressing
Ad

More from SwatiHans10 (20)

PPT
stop and wait _
PPT
PPT
subnetting _
PPT
PipelineHazards _
PPT
Pipelining _
PPTX
Mobile Customer Experience Management.pptx
PPTX
Social Web multimedia analytics goals _
PPTX
Hardwires and Microprogrammed Control ,
PPTX
Restoring Algorithm _
PPTX
Non -Restoring Algorithm _
PPTX
loops _
PPT
functions _
PDF
Instruction execution cycle _
PPT
RTL,Instruction set _
PPT
Data representation _
PPTX
CAO PPT-Lect 1 _
PPTX
CIRCULAR LINKED LIST _
PPT
Transmission control protocol _
PPTX
Numpy _
PPTX
Lecture 1 .
stop and wait _
subnetting _
PipelineHazards _
Pipelining _
Mobile Customer Experience Management.pptx
Social Web multimedia analytics goals _
Hardwires and Microprogrammed Control ,
Restoring Algorithm _
Non -Restoring Algorithm _
loops _
functions _
Instruction execution cycle _
RTL,Instruction set _
Data representation _
CAO PPT-Lect 1 _
CIRCULAR LINKED LIST _
Transmission control protocol _
Numpy _
Lecture 1 .
Ad

Recently uploaded (20)

PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
DOCX
573137875-Attendance-Management-System-original
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
PPT on Performance Review to get promotions
PDF
Digital Logic Computer Design lecture notes
PPTX
Sustainable Sites - Green Building Construction
PPTX
Lecture Notes Electrical Wiring System Components
PPT
Project quality management in manufacturing
PPTX
Construction Project Organization Group 2.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Operating System & Kernel Study Guide-1 - converted.pdf
Lesson 3_Tessellation.pptx finite Mathematics
573137875-Attendance-Management-System-original
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPT on Performance Review to get promotions
Digital Logic Computer Design lecture notes
Sustainable Sites - Green Building Construction
Lecture Notes Electrical Wiring System Components
Project quality management in manufacturing
Construction Project Organization Group 2.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
bas. eng. economics group 4 presentation 1.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
CYBER-CRIMES AND SECURITY A guide to understanding
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf

ip addressing _

  • 2. 19.2 IPv4 ADDRESSES IPv4 ADDRESSES An An IPv4 address IPv4 address is a is a 32-bit 32-bit address that uniquely and address that uniquely and universally defines the connection of a device (for universally defines the connection of a device (for example, a computer or a router) to the Internet. example, a computer or a router) to the Internet. Address Space Notations Classful Addressing Classless Addressing Network Address Translation (NAT) Topics discussed in this section: Topics discussed in this section:
  • 3. 19.3 An IPv4 address is 32 bits long. Note
  • 4. 19.4 The IPv4 addresses are unique and universal. Note
  • 5. 19.5 The address space of IPv4 is 232 or 4,294,967,296. Note
  • 6. 19.6 Dotted-decimal notation and binary notation for an IPv4 address
  • 7. 19.7 Change the following IPv4 addresses from binary notation to dotted-decimal notation. Example Solution We replace each group of 8 bits with its equivalent decimal number (see Appendix B) and add dots for separation.
  • 8. 19.8 Change the following IPv4 addresses from dotted-decimal notation to binary notation. Example Solution We replace each decimal number with its binary equivalent
  • 9. 19.9 In classful addressing :the address space is divided into five classes: A, B, C, D, and E. Finding the classes in binary and dotted-decimal notation
  • 10. Number of networks /hosts in classful addressing 0Network host A 1.0.0.0 to 127.255.255.255  2^7 networks as 7 bits represent network id  2^(24) interfaces/hosts as 24 bits represent host id 10 network host B 128.0.0.0 to 191.255.255.255  2^(14) networks as 14 bits represent network id  2^(16) interfaces /hosts as 16 bits represent host id 110 network host C 192.0.0.0 to 223.255.255.255  2^(21) networks  2^(8) interfaces
  • 11. Classful addressing  E.g., Class C networks can accommodate only 2^8-2 = 254 hosts (2 are reserved). Small for most medium to large organizations.  However Class B supports 65,634 hosts – too large. An organization with 2000 hosts ended up with class B addressing – address space was ill used.  Therefore in 1993, Classless Interdomain Routing (CIDR) was introduced.
  • 12. 19.12 Find the class of each address. a. 00000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 14.23.120.8 d. 252.5.15.111 Example 19.4 Solution a. The first bit is 0. This is a class A address. b. The first 2 bits are 1; the third bit is 0. This is a class C address. c. The first byte is 14; the class is A. d. The first byte is 252; the class is E.
  • 13. 19.13 Table 19.1 Number of blocks and block size in classful IPv4 addressing
  • 14. 19.14 In classful addressing, a large part of the available addresses were wasted. Note
  • 15. 19.15 Table 19.2 Default masks for classful addressing
  • 16. 19.16 Classful addressing, which is almost obsolete, is replaced with classless addressing. Note
  • 17. 19.17 In IPv4 classless addressing, a block of addresses can be defined as x.y.z.t /n in which x.y.z.t defines one of the addresses and the /n defines the mask. Note
  • 18. IP addressing: CIDR • CIDR: Classless InterDomain Routing – network portion of address of arbitrary length – address format: a.b.c.d/x, where x is # bits in network portion of address • CIDR addressing example: – CIDR: Network part: 21 bits. Host part: 2^11 = 2048 hosts.
  • 19. 19.19 The first address in the block can be found by setting the rightmost 32 − n bits to 0s. Note
  • 20. 19.20 A block of addresses is granted to a small organization. We know that one of the addresses is 205.16.37.39/28. What is the first address in the block? Solution The binary representation of the given address is 11001101 00010000 00100101 00100111 If we set 32−28 rightmost bits to 0, we get 11001101 00010000 00100101 0010000 or 205.16.37.32. Example 1
  • 21. 19.21 The last address in the block can be found by setting the rightmost 32 − n bits to 1s. Note
  • 22. 19.22 Find the last address for the block in previous Example Solution The binary representation of the given address is 11001101 00010000 00100101 00100111 If we set 32 − 28 rightmost bits to 1, we get 11001101 00010000 00100101 00101111 or 205.16.37.47 This is actually the block shown in Figure 19.3. Example
  • 23. 19.23 The number of addresses in the block can be found by using the formula 232−n . Note
  • 24. 19.24 Find the number of addresses in Example . Example Solution The value of n is 28, which means that number of addresses is 2 32−28 or 16.
  • 25. 19.25 Another way to find the first address, the last address, and the number of addresses is to represent the mask as a 32- bit binary (or 8-digit hexadecimal) number. This is particularly useful when we are writing a program to find these pieces of information. /28 can be represented as 11111111 11111111 11111111 11110000 (twenty-eight 1s and four 0s). Find a. The first address b. The last address c. The number of addresses. Example
  • 26. 19.26 Solution a. The first address can be found by ANDing the given addresses with the mask. ANDing here is done bit by bit. The result of ANDing 2 bits is 1 if both bits are 1s; the result is 0 otherwise. Example (continued)
  • 27. 19.27 b. The last address can be found by ORing the given addresses with the complement of the mask. ORing here is done bit by bit. The result of ORing 2 bits is 0 if both bits are 0s; the result is 1 otherwise. The complement of a number is found by changing each 1 to 0 and each 0 to 1. Example (continued)
  • 28. 19.28 A network configuration for the block 205.16.37.32/28
  • 29. 19.29 The first address in a block is normally not assigned to any device; it is used as the network address that represents the organization to the rest of the world. Note
  • 30. 19.30 IPv6 ADDRESSES IPv6 ADDRESSES Despite all short-term solutions, address depletion is Despite all short-term solutions, address depletion is still a long-term problem for the Internet. This and still a long-term problem for the Internet. This and other problems in the IP protocol itself have been the other problems in the IP protocol itself have been the motivation for IPv6. motivation for IPv6. Structure Address Space Topics discussed in this section: Topics discussed in this section:
  • 31. 19.31 An IPv6 address is 128 bits long. Note
  • 32. 19.32 IPv6 address in binary and hexadecimal colon notation
  • 34. 19.34 Expand the address 0:15::1:12:1213 to its original. Example Solution We first need to align the left side of the double colon to the left of the original pattern and the right side of the double colon to the right of the original pattern to find how many 0s we need to replace the double colon. This means that the original address is.
  • 35. IPv4 Addressing Concepts and Their IPv6 Equivalents IPv4 Address IPv6 Address Address Length – 32 bits 128 bits Address Representation - decimal hexadecimal Internet address classes Not applicable in IPv6 Multicast addresses (224.0.0.0/4) IPv6 multicast addresses (FF00::/8) Broadcast addresses Not applicable in IPv6 Unspecified address is 0.0.0.0 Unspecified address is :: Loopback address is 127.0.0.1 Loopback address is ::1 Public IP addresses Global unicast addresses Private IP addresses (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16) Site-local addresses (FEC0::/10) Autoconfigured addresses (169.254.0.0/16) Link-local addresses (FE80::/64) IPv6 Packet Format 35