IP Addressing Formats

Download Report

Transcript IP Addressing Formats

Chapter
IP Addressing Format
© N. Ganesan, All rights reserved.
Questions
• How many bits are there in a TCP/IP address?
• Name the components of a typical TCP/IP address?
• What is the difference between the old IPv4 and the
new IPv6 addresses?
• Explain the difference between network ID and host
ID.
• Name the classes of IP addresses. What are the
purpose and function of each class of addressing
• Compute the number of networks and hosts that can
be supported in each class of address.
Questions Cont.
• List the restrictions placed on the
assignment of addresses.
• Choose a IP class as an example and list
the valid range of network and host
addresses for that class.
Chapter Modules
• IP Address Format and Components
• Classes of Addresses
• Scope of Addresses and Restrictions
Module 1
IP Address Format
© N. Ganesan, All rights reserved.
Overview
• The IP address format discussed in this
presentation applies to IPv4
• An IP address is composed of 32 bits
that is viewed as being divided into 4
octets
– One octet is made up of 8 bits
IP Address Format
32 bits divided into 4 octets for convenience
10101111
11001100
10000001
00110011
175
204
129
51
Converted into decimals for easy
representation and remembrance
An Example in Binary-toDecimal Conversion
Binary
1
0
0
1
Factor
8
4
2
1
Decimal=
Binary * Factor
8
0
0
1
Binary 1001 = Decimal 9
8+1
=9
IP Addressing Components
32 bits
Network ID
Host ID
The New IP Address
• The new IP address known as IPv6 has
128 bits
– www.whatis.com
IP Component Reference
Network ID
Host ID
Internet
Host ID
End of Module 1
Module 2
Classes of IP Addresses
© N. Ganesan, All rights reserved.
Classes of IP Addresses
• IP addresses have been divided into
classes
– They are namely Classes A, B C, D and E
• Classes A, B and C are used for
commercial purpose
• Class D is used for multicasting
• Class E is used for experimental
purpose
Commercial Classes
• Classes A, B and C
• Class A is for very large organizations
– Few, if any, are available
• Class B is used in medium size organizations
– A few may be still be available
• Class C is used in small organizations
– Often further divided and issued to smaller
organizations and individuals
Subnetting
• There is no strict rule as to who may
use a certain class of address
• An enterprise such as an ISP can own a
large Class B address space and subnet
it into smaller spaces for its customers
Class D
• Reserved for IP multicasting
• The first four higher-order bits are set to
1 1 1 0 respectively
• Microsoft supports Class D addresses
for multicasting
• Multicasting is the process of delivering
media over the Internet at reduced
bandwidths
A Note on Multicasting
• Multicasting delivers a single stream of
medial to a router and the receiving end
• The router then multiplies and delivers the
stream to local clients
• As such, only one stream travels along the
Internet thus saving bandwidth
• In the case of Unicasting, multiple streams
travel along the Internet to reach each client
separately
Unicasting
3 Streams
Multicasting
1 Stream on
Internet
3 Streams Locally
Alternative Methods of Delivering
Media
• Unicasting
– Easy to implement
– Higher bandwidth is required for
transmission
• Multicasting
– More involved in setting up
– Uses bandwidth more efficiently
• Broadcasting
Class E
• Experimental addresses reserved for
possible future use
• The first four higher-order bits are set to
1 1 1 1 respectively
End of Module 2
Module 3
IP Formats for Commercial
Classes
© N. Ganesan, All rights reserved.
Class A Assignment Format
Network ID (8 bits)
8 bits
8 bits
8 bits
Host ID (24 bits)
8 bits
Number of Class A Networks
and Nodes
• The first higher-order bit is always set
to 0
• Total number of networks supported is
126 = 27 - 2
– All zeros and all ones are not allowed
• Total number of hosts supported per
network is 16,777,214 = 224 - 2
– All zeros and all ones are not allowed
Restrictions on Zeros and Ones
• The initial RFC 950 forbade the use of
zeros and ones
– All zeros prevented some early routing
protocols from operating correctly
– All ones may result in a conflict with a
special broadcast address known as the allsubnets directional broadcast address
Easing of Restrictions
• RFC 1812 now eases the restriction and
allows the use of zeros and ones in a
CIDR-compliant environment
• CIDR
– Classless Inter-Domain Routing (CIDR)
– Explained under subnets
Class B Assignment Format
Network ID (16 bits)
8 bits
8 bits
8 bits
8 bits
Host ID (16 bits)
Number of Class B Networks and
Nodes
• The first two higher-order bits are
always set to 1 and 0 respectively
• Total number of networks supported is
16384 = 214 - 2
– All zeros and all ones are not allowed
• Number of hosts supported per
network is 65,534 = 216 - 2
– All zeros and all ones are not allowed
Class C Assignment Format
Network ID (24 bits)
8 bits
8 bits
8 bits
8 bits
Host ID (8 bits)
Number of Class C Networks and
Nodes
• The first three higher order bits are
always set to 1, 1 and 0 respectively
• Total number of networks supported is
2,097,152 = 221 - 2
– All zeros and all ones are not allowed
• Number of hosts supported per
network is 254 = 28 - 2
– All zeros and all ones are not allowed
Overcoming the Limited Number
of IP Addresses
• By dynamically assigning IP addresses to the
clients
– DHCP
– DHCP is also used for better management of
network
• Network Address Translation (NAT)
– Assign fictitious IP addresses to the clients
– Often, implemented with hardware firewalls
– NAT provides security as well
End of Module 3
Module 3
Scope and Restriction of IP
Addresses
© N. Ganesan, All rights reserved.
Restrictions on Network ID
Assignments
• In class A, network ID 127 is reserved for
loop back functions
• All bits of a network ID cannot be set to ones
– Reserved for use as an IP broadcast address
• All bits of a network ID cannot be set to zeros
– Reserved for a specific host on the local host
– Packets destined to this specific address will not
be routed
Loop Back Function
• Loop back function simply tests itself
– Eg: 127.0.0.1 performs a test on the
machine itself
• localhost is another way of testing the
loopback function
Valid Network IDs for Classes
Class
Beginning
Network
ID
Ending
Network
ID
A
1.0.0.0
126.0.0.0
B
128.0.0.0
191.255.0.0
C
192.0.0.0
223.255.255.0
Restrictions on Host ID
Assignments
• All the bits of a host ID cannot be set to
ones
– Reserved as the broadcast IP address to
send a packet to all the hosts
• All the bits of a host ID cannot be set to
zeros either
– Reserved to represent the IP network
address
Valid Host IDs for Classes
Class
Beginning
Host ID
Ending Host ID
A
w.0.0.1
w.255.255.254
B
w.x.0.1
w.x.255.254
C
w.x.y.1
w.x.y.254
Summary of Networks and Hosts
Supported in Each Class
A
Network Available Hosts per
ID Portion Networks Networks
126
16,777,214
B
16,384
65,534
C
2,097,152
254
End of Module
Module 4
Private IP Addresses
© N. Ganesan, All rights reserved.
End of Module 4
END OF MODULE
END OF CHAPTER