ip addressing 2014
TRANSCRIPT
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 11
Computer NetworksComputer Networks(ECS - 601)(ECS - 601)
BM KalraBM KalraProfessor and HoDProfessor and HoD
Computer Science and EngineeringComputer Science and EngineeringAjay Kumar Garg Engineering College, GhaziabadAjay Kumar Garg Engineering College, Ghaziabad
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 22
Lecture 33Lecture 33(20 Mar 2015)(20 Mar 2015)
Network LayerNetwork LayerAddressingAddressing
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 33
OSI Model - Summary OSI Model - Summary of layersof layers
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 44
Network LayerNetwork Layer Responsible for source to destination delivery – data link layer Responsible for source to destination delivery – data link layer
oversees the delivery of packet between two systems on the same oversees the delivery of packet between two systems on the same network (link)network (link)
To provide internetworking – to move the packet through different To provide internetworking – to move the packet through different networksnetworks
Provides logical addressing – IP Address – network layer adds a Provides logical addressing – IP Address – network layer adds a header that includes the logical addresses of the sender and the header that includes the logical addresses of the sender and the receiverreceiver
Uses IP in TCP/IP protocol suiteUses IP in TCP/IP protocol suite Delivery of individual packets from the source to the destination hostDelivery of individual packets from the source to the destination host A delivery mechanism used by TCP/UDPA delivery mechanism used by TCP/UDP unreliable and connectionless datagram protocolunreliable and connectionless datagram protocol provides a best effort delivery serviceprovides a best effort delivery service
Provides no error control or flow controlProvides no error control or flow control Only provides error detectionOnly provides error detection
IP supporting protocolsIP supporting protocols ARP – Address Resolution ProtocolARP – Address Resolution Protocol RARP – Reverse Address Resolution ProtocolRARP – Reverse Address Resolution Protocol ICMP – Internet Control Message ProtocolICMP – Internet Control Message Protocol IGMP – Internet Group Message ProtocolIGMP – Internet Group Message Protocol
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 55
Links Between Two Links Between Two HostsHosts
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 66
Network layer in an Network layer in an internetworkinternetwork
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 77
Network Layer at Source & Network Layer at Source & DestinationDestination
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 88
Network Layer at the Network Layer at the RouterRouter
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 99
AddressingAddressing
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1010
AddressesAddresses
AnalogyAnalogyIf you want to know any info about me from If you want to know any info about me from
somebody or want to send some info to mesomebody or want to send some info to meHow do you identify me? How do you identify me? What is my identity?What is my identity?
My NameMy NameMy AddressMy Address
To send information on the net-To send information on the net-whom to send?whom to send?
How do you identify a machine on How do you identify a machine on the network?the network?
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1111
AddressesAddresses
FlatFlat voter-idvoter-id i-card numbersi-card numbers
HierarchicalHierarchical Postal PIN numbersPostal PIN numbers International telephone numbering International telephone numbering
schemescheme What is a MAC address?What is a MAC address?
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1212
Flat AddressingFlat Addressing
In a flat routing infrastructure, each network ID is In a flat routing infrastructure, each network ID is represented individually in the routing table. represented individually in the routing table.
The network IDs have no network/subnet structure The network IDs have no network/subnet structure and cannot be summarized. and cannot be summarized.
RIP-based IPX internetworks use flat network RIP-based IPX internetworks use flat network addressing and have a flat routing infrastructure.addressing and have a flat routing infrastructure.
.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1313
IP Address HierarchyIP Address HierarchyIP Address HierarchyIP Address Hierarchy
Does a telephone switch in California know how to reach a Does a telephone switch in California know how to reach a specific phone in Virginia? specific phone in Virginia?
(1-703-555-1212)(1-703-555-1212)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1414
IP Address Hierarchy IP Address Hierarchy IP Address Hierarchy IP Address Hierarchy
Does a telephone switch in California know how to reach a Does a telephone switch in California know how to reach a specific phone in Virginia? specific phone in Virginia?
(1-703-555-1212)(1-703-555-1212)
Long (remote)distance
Local office
California
Path to 1(A numberindicates
destinationis remote)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1515
Does a telephone switch in California know how to reach a Does a telephone switch in California know how to reach a specific phone in Virginia? specific phone in Virginia?
(1-703-555-1212)(1-703-555-1212)
Long (remote)distance
Long distanceVirginia
Path to 703(An area codesummarizes
an area in VA)Local office
California
Path to 1(A numberindicates
destinationis remote)
IP Address Hierarchy IP Address Hierarchy IP Address Hierarchy IP Address Hierarchy
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1616
Does a telephone switch in California know how to reach a specific Does a telephone switch in California know how to reach a specific phone in Virginia? phone in Virginia?
(1-703-555-1212)(1-703-555-1212)
Long (remote)distance
Long distanceVirginia
Path to 703(An area codesummarizes
an area in VA)
Path to 555(A prefix
summarizes a smaller area
in VA)
Local officeAlexandria
Local office
California
Path to 1(A numberindicates
destinationis remote)
IP Address HierarchyIP Address HierarchyIP Address HierarchyIP Address Hierarchy
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1717
Does a telephone switch in California know how to reach a Does a telephone switch in California know how to reach a specific phone in Virginia? specific phone in Virginia?
(1-703-555-1212)(1-703-555-1212)
Long (Remote)-Distance
Long-DistanceVirginia
Path to 703(An Area CodeSummarizes
an Area in VA)
Path to 555(A Prefix
Summarizes a Smaller Area
in VA)
Path to 1212(Number)
Local OfficeAlexandria
Local Office
Aunt JudyCalifornia
Path to 1(A NumberIndicates
DestinationIs Remote)
IP Address HierarchyIP Address HierarchyIP Address HierarchyIP Address Hierarchy
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1818
Benefits of Hierarchical Benefits of Hierarchical AddressingAddressingBenefits of Hierarchical Benefits of Hierarchical AddressingAddressing
Reduced number of route table entriesReduced number of route table entriesSummarize multiple addresses into route Summarize multiple addresses into route
summariessummaries
Efficient allocation of addressesEfficient allocation of addressesContiguous address assignment allows you to Contiguous address assignment allows you to
use all possible addressesuse all possible addresses
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1919
Hierarchical AddressingHierarchical Addressing
groups of network IDs can be represented as a single routing table entry through route summarization
The network IDs in a hierarchical internetwork have a network/subnet/sub-subnet structure
A routing table entry for the highest level (the network) is also the route used for the subnets and sub-subnets of the network
simplifes routing tables and lower the amount of routing information that is exchanged, but they require more planning
IP implements hierarchical network addressing, and IP internetworks can have a hierarchical routing structure
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2020
AddressesAddresses
Each communication endpoint must Each communication endpoint must have an address.have an address.
Consider 2 processes Consider 2 processes communicating over an internet:communicating over an internet: the network must be specifiedthe network must be specified the host must be specifiedthe host must be specified the process must be specified.the process must be specified.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2121
AddressesAddresses
Physical LayerPhysical Layer: no address necessary: no address necessary
Data Link LayerData Link Layer - address must be able to - address must be able to
select any host on the network.select any host on the network.
Network LayerNetwork Layer - address must be able to - address must be able to
provide information to enable routing.provide information to enable routing.
Transport LayerTransport Layer - address must identify the - address must identify the
destination process.destination process.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2222
Addresses in TCP/IPAddresses in TCP/IP
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2323
AddressesAddressesThree typesThree types Port AddressPort Address
Layer 4 addressLayer 4 address For running different applicationsFor running different applications
Logical AddressLogical Address Layer3 addressLayer3 address IP address and it is set by the operating systemIP address and it is set by the operating system Changes with location changeChanges with location change
Physical AddressPhysical Address Layer2 address Layer2 address MAC address MAC address generated by the manufacturergenerated by the manufacturer The MAC address is unique In a Local Area Network (LAN)The MAC address is unique In a Local Area Network (LAN) Fixed – does not changeFixed – does not change
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2424
Logical & Physical Logical & Physical AddressesAddressesAnalogyAnalogy
My Name: Physical AddressMy Name: Physical Address
My Home Address: Logical AddressMy Home Address: Logical Address
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2525
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2626
IPv4 AddressingIPv4 Addressing
An IPv4 address is a 32-bit address An IPv4 address is a 32-bit address that that uniquelyuniquely andand universallyuniversally defines defines the connection of a device (for the connection of a device (for example, a computer or a router) to example, a computer or a router) to the Internetthe Internet Unique Unique – two devices on the internet – two devices on the internet
can never have the same address at the can never have the same address at the same timesame time
Universal Universal – addressing system must be – addressing system must be accepted by any host that wants to be accepted by any host that wants to be connected to the Internetconnected to the Internet
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2727
IPv4 AddressingIPv4 Addressing
Logical Address Logical Address Layer3 AddressingLayer3 Addressing Example - IPv4/IPv6Example - IPv4/IPv6 IPv4 addresses are unique & universalIPv4 addresses are unique & universal Two Level Hierarchical AddressingTwo Level Hierarchical Addressing Network id + Host idNetwork id + Host id IPv4 – 32 bit addressing systemIPv4 – 32 bit addressing system
2232 32 = 4,294,967,296(more than 4 Billion IP Addresses)= 4,294,967,296(more than 4 Billion IP Addresses)
Network IDNetwork ID
(8 to 24 bits)(8 to 24 bits)
Host IDHost ID
(24 to 8 bits)(24 to 8 bits)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2828
IPv4 /Internet/Global IPv4 /Internet/Global /Logical Address/Logical Address
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2929
The IPv4 addresses are unique and universal.
NoteNote
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3030
The address space of IPv4 is 232 or 4,294,967,296 (more than 4 billion)
NoteNote
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3131
Layer 3 AddressesLayer 3 Addresses
Network IDNetwork ID Assigned by Assigned by
ARIN ARIN (www.arin.net)(www.arin.net)
Identifies the Identifies the network to network to which a device which a device is attached. is attached.
May be May be identified by identified by one, two, or one, two, or three of the three of the first three first three octets.octets.
Host IDHost ID Assigned by a Assigned by a
network network administrator.administrator.
Identifies the specific Identifies the specific device on that device on that network.network.
May be identified by May be identified by
one, two, or three of one, two, or three of the last three octets.the last three octets.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3232
IP Address: NotationIP Address: NotationBinary NotationBinary Notation In binary notation, the IPv4 address is displayed as 32 bits.In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred to as a byte. So it is common to hear an Each octet is often referred to as a byte. So it is common to hear an
IPv4 address referred to as a 32-bit address or a 4-byte address. (MAC IPv4 address referred to as a 32-bit address or a 4-byte address. (MAC Address – 6 bytes)Address – 6 bytes)
The following is an example of an IPv4 address in binary notation:The following is an example of an IPv4 address in binary notation:01110101 10010101 00011101 0000001001110101 10010101 00011101 00000010
Dotted-Decimal NotationDotted-Decimal Notation To make the IPv4 address more compact and easier to read, Internet To make the IPv4 address more compact and easier to read, Internet
addresses are usually written in decimal form with a decimal point addresses are usually written in decimal form with a decimal point (dot) separating the bytes. (dot) separating the bytes.
The following is the dotted-decimal notation of the above address:The following is the dotted-decimal notation of the above address:117.149.29.2117.149.29.2
One octet – 8 bitsOne octet – 8 bits total numbers – 2total numbers – 288=256 (0-255)=256 (0-255) So, highest number 255So, highest number 255
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3333
Dotted-decimal notation Dotted-decimal notation and binary notation for an and binary notation for an IPv4 addressIPv4 address
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3434
Dotted - Decimal Notation Dotted - Decimal Notation
Network layer addresses are 32 bits longNetwork layer addresses are 32 bits long1000010010100011100000000001000110000100101000111000000000010001
This binary number can be divided into four This binary number can be divided into four octets octets
10000100 10100011 10000000 0001000110000100 10100011 10000000 00010001Each octet (or byte) can be converted to Each octet (or byte) can be converted to
decimal numberdecimal number132 163 128 17132 163 128 17
Finally the address can be written in dotted Finally the address can be written in dotted decimal notationdecimal notation
132.163.128.17132.163.128.17
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3535
Example 19.1Example 19.1
Change the following IPv4 addresses from Change the following IPv4 addresses from binary notation to dotted-decimal notation.binary notation to dotted-decimal notation.
SolutionSolutionWe replace each group of 8 bits with its We replace each group of 8 bits with its
equivalent decimal number and add dots for equivalent decimal number and add dots for separation.separation.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3636
Example 19.2Example 19.2
Change the following IPv4 addresses from Change the following IPv4 addresses from dotted-decimal notation to binary notation.dotted-decimal notation to binary notation.
SolutionSolutionWe replace each decimal number with its We replace each decimal number with its
binary equivalentbinary equivalent
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3737
Example 19.3Example 19.3Find the error, if any, in the following IPv4 addresses.Find the error, if any, in the following IPv4 addresses.a.a. 111.56.045.78111.56.045.78b.b. 221.34.7.8.20221.34.7.8.20c.c. 75.45.301.1475.45.301.14d.d. 11100010.23.14.6711100010.23.14.67
SolutionSolutiona.a. There must be no leading zero ( There must be no leading zero (0045).45).b.b. There can be no more than four numbers. There can be no more than four numbers.c.c. Each number needs to be less than or equal to 255. Each number needs to be less than or equal to 255.d.d. A mixture of binary notation and dotted-decimal A mixture of binary notation and dotted-decimal
notation is not allowed.notation is not allowed.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3939
Classful IP AddressesClassful IP Addresses
Three major organizationsThree major organizationsLarge OrganizationLarge Organization with a large with a large
number of attached hosts or routersnumber of attached hosts or routersMidsize organizationMidsize organization with tens and with tens and
thousands of attached hosts or thousands of attached hosts or routersrouters
Small organizationSmall organization with a small with a small number of attached hosts or routersnumber of attached hosts or routers
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4040
In classful addressing, the address space is divided into five classes:
A, B, C, D, and E.
NoteNote
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4141
Classful IP AddressesClassful IP Addresses
Three major classesThree major classesClass AClass A: Small number of Networks – : Small number of Networks –
Large number of hostsLarge number of hostsClass BClass B: Medium number of : Medium number of
Networks – Medium number of hostsNetworks – Medium number of hostsClass CClass C: Large number of Networks : Large number of Networks
– Small number of hosts– Small number of hosts
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4242
Classful IP AddressesClassful IP Addresses
N – NetworkN – NetworkH – HostH – Host
First First OctetOctet
Second Second OctetOctet
Third Third OctetOctet
Fourth Fourth OctetOctet
Class AClass A NN HH HH HH
Class BClass B NN NN HH HH
Class CClass C NN NN NN HH
Class DClass D
Class EClass E
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4343
Classes – Binary & Classes – Binary & Dotted DecimalDotted Decimal
Class D: for multicastingClass D: for multicasting
Class E: for future/research useClass E: for future/research use
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4444
First OctetFirst Octet Class AClass A
00 0000000 0000000 00 0 0 11111111111111 127127
Class BClass B 1010 000000 000000 128128 1010 111111 111111 191191
Class CClass C 110110 00000 00000 192192 110110 11111 11111 223223
Class D: Class D: MulticastMulticast 11101110 0000 0000 224224 11101110 1111 1111 239239
Class E: Class E: ExperimentalExperimental 11111111 0000 0000 240240 11111111 1111 1111 255255
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4545
Address Class UsageAddress Class Usage
Address Address classes A, B, and Cclasses A, B, and C are available for are available for Internet useInternet use
Class DClass D addresses are used for addresses are used for multicastingmulticasting Some Class D multicast addresses are Some Class D multicast addresses are used by used by
routing protocolsrouting protocolsOSPF—224.0.0.5, 224.0.0.6OSPF—224.0.0.5, 224.0.0.6RIPv2—224.0.0.9RIPv2—224.0.0.9EIGRP—224.0.0.10EIGRP—224.0.0.10
Other Class D multicast addresses are used by Other Class D multicast addresses are used by videoconferencing or other applicationsvideoconferencing or other applications
Class E Class E addresses are reserved for future use addresses are reserved for future use and for research purposes and for research purposes
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4646
What Class?What Class? How do you know what class an IP address is in?How do you know what class an IP address is in?
For Dotted Decimal AddressFor Dotted Decimal Address If the first octet is between:If the first octet is between:
0 – 127 0 – 127 Class A addressesClass A addresses 128 – 191 128 – 191 Class B AddressesClass B Addresses 192 – 223 192 – 223 Class C AddressesClass C Addresses 224 – 239 224 – 239 Class D AddressesClass D Addresses 240 – 255 240 – 255 Class E AddressesClass E Addresses
For Binary IP AddressFor Binary IP Address The first bit is 0The first bit is 0 Class A AddressClass A Address The first 2 bits are 10The first 2 bits are 10 Class B AddressClass B Address First three bits are 110First three bits are 110 Class C AddressClass C Address First four bits are 1110First four bits are 1110 Class D AddressClass D Address First four bits are 1111First four bits are 1111 Class E AddressClass E Address
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4747
Example 19.4Example 19.4Find the class of each addressFind the class of each addressa.a. 000000001 00001011 00001011 111011110000001 00001011 00001011 11101111b.b. 11011000001 10000011 00011011 1111111100001 10000011 00011011 11111111c.c. 1414.23.120.8.23.120.8d.d. 252252.5.15.111.5.15.111
SolutionSolutiona.a. The first bit is 0. This is a class A address. The first bit is 0. This is a class A address.b.b. The first 2 bits are 1; the third bit is 0. This is a class C The first 2 bits are 1; the third bit is 0. This is a class C
address.address.c.c. The first byte is 14; the class is A. The first byte is 14; the class is A.d.d. The first byte is 252; the class is E. The first byte is 252; the class is E.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4848
Number of NetworksNumber of NetworksNumber of networks in each classNumber of networks in each class
Class A has 128 networks (0 to 127)Class A has 128 networks (0 to 127) Class B has 16,384 networksClass B has 16,384 networks Class C has 2,097,152 networks Class C has 2,097,152 networks
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4949
Number of HostsNumber of HostsMaximum number of hosts vary for each Maximum number of hosts vary for each
classclass Class A has 16,777,214 available hosts (2Class A has 16,777,214 available hosts (22424 –2) –2) Class B has 65,534 available hosts (2Class B has 65,534 available hosts (21616 –2) –2) Class C has 254 available hosts (2Class C has 254 available hosts (288 –2) –2)
The first address in each network is The first address in each network is reserved for the reserved for the Network Address Network Address (all zeros) (all zeros) and the last address is reserved for the and the last address is reserved for the Broadcast Address Broadcast Address (all ones)(all ones)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5050
No. of blocks and block No. of blocks and block sizesize
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5151
In classful addressing, a large part of the available addresses were wasted.
NoteNote
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5252
Lecture 34Lecture 34(20 Mar 2015)(20 Mar 2015)
IP AddressingIP Addressing
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5353
Reserved AddressesReserved AddressesNetwork Address (wire address)Network Address (wire address) – This is an – This is an
IP address that ends with binary IP address that ends with binary 0s in all 0s in all host bits.host bits.
Class A Network Address example:Class A Network Address example: 113.0.0.0113.0.0.0
Hosts on a network can only communicate Hosts on a network can only communicate directlydirectly with other hosts if they have the with other hosts if they have the same network ID. same network ID.
If they don’t, they will not be able to If they don’t, they will not be able to communicate unless there is communicate unless there is another deviceanother device connecting the networks.connecting the networks.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5454
Reserved AddressesReserved Addresses
Broadcast AddressBroadcast Address – is used to send data – is used to send data to all of the devices on a network. to all of the devices on a network.
Broadcast IP addresses end with binary Broadcast IP addresses end with binary 1s 1s in the host partin the host part of the address. of the address.
Class B Broadcast Address example:Class B Broadcast Address example: 176.10.255.255176.10.255.255
(Remember decimal 255 = binary 11111111)(Remember decimal 255 = binary 11111111)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5555
Special AddressSpecial Address Host ID “all 0s” is reserved to refer to Host ID “all 0s” is reserved to refer to network nunetwork nu
mbermber 192.168.100.0 192.168.100.0 158.108.0.0158.108.0.0 18.0.0.018.0.0.0
Host ID “all 1s” is reserved to Host ID “all 1s” is reserved to broadcastbroadcast to all ho to all hosts on a specific networksts on a specific network 192.168.100.255 192.168.100.255 158.108.255.255 158.108.255.255 18.255.255.255 18.255.255.255
Address 0.0.0.0 means “Address 0.0.0.0 means “default routedefault route”” Address 127.0.0.0 means “Address 127.0.0.0 means “this nodethis node” ” Address 127.0.0.1 Address 127.0.0.1 ((local loopbacklocal loopback). Message sent ). Message sent
to this address will never leave the local hostto this address will never leave the local host Address 255.255.255.255 is reserveAddress 255.255.255.255 is reservedd to broadcast to broadcast
to every host on the local network (limited broadto every host on the local network (limited broadcast)cast)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5656
Netid and HostidNetid and Hostid
Netid and host id are of varying length – Netid and host id are of varying length – depending on class of the addressdepending on class of the address
First First OctetOctet
Second Second OctetOctet
Third Third OctetOctet
Fourth Fourth OctetOctet
Class AClass A NN HH HH HH
Class BClass B NN NN HH HH
Class CClass C NN NN NN HH
Class DClass D
Class EClass E
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5757
Netid and HostidNetid and Hostid
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5858
MaskMask Although the length of the netid and hostid (in Although the length of the netid and hostid (in
bits) is predetermined in classful addressing,bits) is predetermined in classful addressing, we can also use a mask (also called the default we can also use a mask (also called the default
mask), a 32-bit number made of contiguous 1s mask), a 32-bit number made of contiguous 1s followed by contiguous 0s.followed by contiguous 0s.
The mask can help us to find the netid and the The mask can help us to find the netid and the hostid.hostid.
For example, the mask for a class A address has For example, the mask for a class A address has eight 1s, which means the first 8 bits of any eight 1s, which means the first 8 bits of any address in class A define the netid; the next 24 address in class A define the netid; the next 24 bits define the hostid. bits define the hostid.
The concept does not apply to classes D and E.The concept does not apply to classes D and E.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5959
MaskingMasking
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6060
Default Mask for Default Mask for classful addressingclassful addressing
The last column shows the mask in the form /n The last column shows the mask in the form /n where n can be 8, 16, or 24 in classful addressing. where n can be 8, 16, or 24 in classful addressing.
This notation is also called This notation is also called slash notationslash notation or or Classless Interdomain RoutingClassless Interdomain Routing (CIDR) notation. (CIDR) notation.
Classful addressing is a special case of classless Classful addressing is a special case of classless addressing.addressing.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6161
IP AddressingIP AddressingCrisis & SolutionsCrisis & Solutions
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6262
Flaw in Classful Flaw in Classful AddressAddressWe can see the flaw in this design.We can see the flaw in this design.A block in class A address is too large for A block in class A address is too large for
almost any organizationalmost any organizationA block in class B is also very large, A block in class B is also very large,
probably too large for any of the probably too large for any of the organizations that received a class B block.organizations that received a class B block.
A block in class C is probably too small.A block in class C is probably too small.A and B always wasted. But C is always not A and B always wasted. But C is always not
enuff!!!enuff!!!
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6565
Issues with IP Issues with IP AddressingAddressingIssues with IP Issues with IP AddressingAddressing
IP address exhaustionIP address exhaustion Routing table growthRouting table growth
U N I V E R S I T YU N I V E R S I T Y
Internet
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6666
IP Addressing SolutionsIP Addressing Solutions
Subnetting Subnetting (RFCs 950, 1812) (RFCs 950, 1812) Private Addresses Private Addresses (RFC 1918)(RFC 1918) Network Address Translation (NAT) Network Address Translation (NAT)
(RFC 1631)(RFC 1631)Classless Interdomain Routing (CIDR)Classless Interdomain Routing (CIDR)
(RFCs 1518, 1519, 2050)(RFCs 1518, 1519, 2050)
Route summarization Route summarization (RFC 1518)(RFC 1518)Variable Length Subnet Masking (VLSM) Variable Length Subnet Masking (VLSM)
(RFC 1812)(RFC 1812)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6767
SubnettingSubnetting
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6868
Basics of SubnettingBasics of Subnetting Subnetwork is a smaller divisions of a networksSubnetwork is a smaller divisions of a networks A larger network is split into several smaller parts A larger network is split into several smaller parts
for internal use – say different departments of a for internal use – say different departments of a college – but still act like a single network to the college – but still act like a single network to the outside worldoutside world
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6969
SubnettingSubnetting
Basically without subnetting, most of Basically without subnetting, most of organization is limited to two levels organization is limited to two levels of hierarchyof hierarchy In this case, the hosts cannot be In this case, the hosts cannot be
organized into groups, and all of the organized into groups, and all of the hosts are at the same level.hosts are at the same level.
As a result the organization has one As a result the organization has one network with many many hosts network with many many hosts
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7070
A Network with Two A Network with Two Levels of HierarchyLevels of Hierarchy
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7171
To make a network more organize, To make a network more organize, three levels of hierarchy is three levels of hierarchy is implemented.implemented.
Subnetting creates an intermediate Subnetting creates an intermediate level of hierarchy in the IP addressing level of hierarchy in the IP addressing system.system.
Now we have 3 levels: Now we have 3 levels: NetidNetid subnetid, and subnetid, and hostid. hostid.
SubnettingSubnetting
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7272
Subnet AddressesSubnet Addresses Changing from 2 Level hierarchy to 3 Level Changing from 2 Level hierarchy to 3 Level
hierarchyhierarchy Include Class A, B, or C network portion plus a Include Class A, B, or C network portion plus a
subnet field and a host field.subnet field and a host field. Bits are borrowed from the host field and are Bits are borrowed from the host field and are
designated as the subnet field.designated as the subnet field.
NetworkNetwork SubnetSubnet HostHost
NetworkNetwork HostHost
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7373
A Network with Three Levels A Network with Three Levels of Hierarchyof Hierarchy
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7474
Basics of SubnettingBasics of SubnettingThey provide addressing flexibilityThey provide addressing flexibilityLess wastage of IP addressesLess wastage of IP addressesBetter logical organizationBetter logical organizationProvides a logical network structure that Provides a logical network structure that
is hidden from the outside worldis hidden from the outside worldA.K.A. subnetsA.K.A. subnetsSubnet addresses are assigned locally, Subnet addresses are assigned locally,
usually by a network administrator.usually by a network administrator.Subnets reduce a broadcast domain.Subnets reduce a broadcast domain.RFC 950 (1985)RFC 950 (1985)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7575
SupernettingSupernetting The time came when most of the class A and class B The time came when most of the class A and class B
addresses were depleted; however, here was still a addresses were depleted; however, here was still a huge demand for midsize blocks. huge demand for midsize blocks.
The size of a class C block with a maximum number of The size of a class C block with a maximum number of 256 addresses did not satisfy the needs of most 256 addresses did not satisfy the needs of most organizations.organizations.
Even a midsize organization needed more addresses. Even a midsize organization needed more addresses. One solution was supernetting.One solution was supernetting. In supernetting, an organization can combine several In supernetting, an organization can combine several
class C blocks to create a larger range of addresses. class C blocks to create a larger range of addresses. In other words, several networks are combined to In other words, several networks are combined to
create a supernetwork or a supernet. create a supernetwork or a supernet.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7676
SupernettingSupernetting An organization can apply for a set of class C blocks An organization can apply for a set of class C blocks
instead of just one.instead of just one. For example, an organization that needs 1000 For example, an organization that needs 1000
addresses can be granted four contiguous class C addresses can be granted four contiguous class C blocks. blocks.
The organization can then use these addresses to The organization can then use these addresses to create one supernetwork. create one supernetwork.
Supernetting decreases the number of 1s in the mask. Supernetting decreases the number of 1s in the mask. For example, if an organization is given four class C For example, if an organization is given four class C
addresses, the mask changes from /24 to /22. addresses, the mask changes from /24 to /22. We will see that classless addressing eliminated the We will see that classless addressing eliminated the
need for supernetting.need for supernetting.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7777
Addresses with and Addresses with and without Subnettingwithout Subnetting
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7878
Subnet MaskSubnet Mask
To implement subnetting, main To implement subnetting, main router needs a subnet mask – that router needs a subnet mask – that indicates the network + subnet indicates the network + subnet portion and the host portionportion and the host portion
Subnet mask is also 32 bit longSubnet mask is also 32 bit longWritten in dotted decimal notation Written in dotted decimal notation
with a slash followed by the number with a slash followed by the number of bits in the network + subnet partof bits in the network + subnet part
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7979
Subnet MaskSubnet Mask
Subnet mask can be written as Subnet mask can be written as 255.255.252.0255.255.252.0
Alternative notation Alternative notation /22/22 – indicates – indicates that the subnet mask is 22 bit longthat the subnet mask is 22 bit long
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8080
Classful addressing, which is almost obsolete, is replaced with classless
addressing.
Note
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8181
Classless Classless Interdomain Routing Interdomain Routing
(CIDR)(CIDR)
“cider”“cider”
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8282
Classless AddressingClassless Addressing To overcome address depletion and give more organizations To overcome address depletion and give more organizations
access to the Internet, classless addressing was designed and access to the Internet, classless addressing was designed and implemented. implemented.
In this scheme, In this scheme, there are no classesthere are no classes, but the addresses are still , but the addresses are still granted in blocks.granted in blocks.
Address BlocksAddress Blocks In classless addressing, when an entity, small or large, needs In classless addressing, when an entity, small or large, needs
to be connected to the Internet, it is granted a block (range) of to be connected to the Internet, it is granted a block (range) of addresses. addresses.
The size of the block (the number of addresses) varies based The size of the block (the number of addresses) varies based on the nature and size of the entity. on the nature and size of the entity.
For example, For example, a household may be given only two addresses; a household may be given only two addresses; a large organization may be given thousands of addressesa large organization may be given thousands of addresses an ISP, as the Internet service provider, may be given thousands an ISP, as the Internet service provider, may be given thousands
or hundreds of thousands based on the number of customers it or hundreds of thousands based on the number of customers it may serve.may serve.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8383
Classless AddressingClassless Addressing
To simplify the handling of addresses, To simplify the handling of addresses, the Internet authorities impose three the Internet authorities impose three restrictions on classless address restrictions on classless address blocks:blocks: 1. The addresses in a block must be 1. The addresses in a block must be
contiguous, one after another.contiguous, one after another. 2. The number of addresses in a block 2. The number of addresses in a block
must be a power of 2 (I, 2, 4, 8, ... ).must be a power of 2 (I, 2, 4, 8, ... ). 3. The first address must be evenly 3. The first address must be evenly
divisible by the number of addresses.divisible by the number of addresses.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8484
Example 19.5Example 19.5Figure 19.3 shows a block of Figure 19.3 shows a block of
addresses, in both binary and dotted-addresses, in both binary and dotted-decimal notation, granted to a small decimal notation, granted to a small business that needs 16 addresses.business that needs 16 addresses.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8585
Example 19.5Example 19.5
Figure 19.3, A block of 16 addresses granted to a small organizationFigure 19.3, A block of 16 addresses granted to a small organization
We can see that the restrictions are applied to this block. We can see that the restrictions are applied to this block. The addresses are contiguous.The addresses are contiguous. The number of addresses is a power of 2 (16 = 24), and The number of addresses is a power of 2 (16 = 24), and The first address is divisible by 16. The first address is divisible by 16. The first address, when converted to a decimal number, is The first address, when converted to a decimal number, is
3,440,387,360, which when divided by 16 results in 215,024,2103,440,387,360, which when divided by 16 results in 215,024,210
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8686
MaskMask
A better way to define a block of addresses is A better way to define a block of addresses is to select any address in the block and the to select any address in the block and the mask. mask.
As we discussed before, a mask is a 32-bit As we discussed before, a mask is a 32-bit number in which the number in which the n leftmost bits are 1sn leftmost bits are 1s and the 32 - n rightmost bits are 0s. and the 32 - n rightmost bits are 0s.
However, in classless addressing the mask However, in classless addressing the mask for a block can take any value from 0 to 32. for a block can take any value from 0 to 32.
It is very convenient to give just the value of It is very convenient to give just the value of n preceded by a slash (CIDR notation).n preceded by a slash (CIDR notation).
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8787
MaskMask
In IPv4 addressing, a block of In IPv4 addressing, a block of addresses can be defined asaddresses can be defined as
x.y.z.t /x.y.z.t /nnin which x.y.z.t defines one of the in which x.y.z.t defines one of the
addresses and the /addresses and the /nn defines the mask defines the maskWhere n is the number of 1s in the maskWhere n is the number of 1s in the mask
NoteNote
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8888
MaskMask
The address and the /n notation The address and the /n notation completely define the whole block (the completely define the whole block (the first address, the last address, and the first address, the last address, and the number of addresses).number of addresses).
First Address: First Address: Network Address Network Address (host part 0s) (host part 0s)The first address in the block can be The first address in the block can be
found by setting the found by setting the (32 – n) rightmost (32 – n) rightmost bitsbits in the binary notation of the in the binary notation of the address to address to 0s0s..
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8989
MaskMask
The first address in the block can be found by setting the rightmost
32 − n bits to 0s.
NoteNote
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9090
Example 19.6Example 19.6A block of addresses is granted to a small A block of addresses is granted to a small organization. We know that one of the addresses is organization. We know that one of the addresses is 205.16.37.39/28205.16.37.39/28. What is the first address in the . What is the first address in the block?block?
SolutionSolutionThe binary representation of the given address isThe binary representation of the given address is11001101 00010000 00100101 0010011111001101 00010000 00100101 00100111If we set 32−28 rightmost bits to 0, we get If we set 32−28 rightmost bits to 0, we get 11001101 00010000 00100101 001000011001101 00010000 00100101 0010000 or or
205.16.37.32205.16.37.32 This is actually the block shown in Figure 19.3.This is actually the block shown in Figure 19.3.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9191
Last Address: Last Address:
Broadcast Address (host part 1s)Broadcast Address (host part 1s)The last address in the block can be The last address in the block can be
found by setting the found by setting the (32 – n) rightmost (32 – n) rightmost bitsbits in the binary notation of the in the binary notation of the address to address to 1s1s..
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9292
The last address in the block can be found by setting the rightmost
32 − n bits to 1s.
NoteNote
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9393
Example 19.7Example 19.7Find the last addressFind the last address for the block in Example 19.6.
A block of addresses is granted to a small organization. A block of addresses is granted to a small organization. We know that one of the addresses is We know that one of the addresses is 205.16.37.39/28205.16.37.39/28. . What is the first address in the block?What is the first address in the block?
SolutionThe binary representation of the given address is11001101 00010000 00100101 00100111If we set 32 − 28 rightmost bits to 1, we get 11001101 00010000 00100101 00101111 or 205.16.37.47This is actually the block shown in Figure 19.3.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9494
Number of Addresses Number of Addresses The number of addresses in the The number of addresses in the
block is the difference between the block is the difference between the last and first address. last and first address.
It can easily be found using the It can easily be found using the formula formula 2232- n32- n..
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9595
The number of addresses in the block can be found by using the formula
232−n.
NoteNote
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9696
Example 19.8Example 19.8
Find the number of addresses in Example Find the number of addresses in Example 19.6.19.6.A block of addresses is granted to a small A block of addresses is granted to a small organization. We know that one of the organization. We know that one of the addresses is addresses is 205.16.37.39/28205.16.37.39/28. What is the first . What is the first address in the block?address in the block?
SolutionSolutionformula formula 2232- n32- n
The value of n is 28, which means that The value of n is 28, which means that number of addresses is 2 number of addresses is 2 32−2832−28 or 16. or 16.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9797
Example 19.9Example 19.9 Another way to find the first address, the last Another way to find the first address, the last
address, and the number of addresses is to address, and the number of addresses is to represent the mask as a represent the mask as a 32-bit binary32-bit binary (or 8-digit (or 8-digit hexadecimal) number. hexadecimal) number.
This is particularly useful when we are writing a This is particularly useful when we are writing a program to find these pieces of information. program to find these pieces of information.
In Example 19.5 the /28 can be represented as In Example 19.5 the /28 can be represented as 11111111 11111111 11111111 1111000011111111 11111111 11111111 11110000 (twenty-eight 1s and four 0s). (twenty-eight 1s and four 0s).
FindFinda.a. The first address The first addressb.b. The last address The last addressc.c. The number of addresses. The number of addresses.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9898
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.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9999
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 1to 0 and each 0 to 1.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 100100
c. The number of addresses can be found by complementing the mask, interpreting it as a decimal number, and adding 1 to it.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 101101
Lecture 35Lecture 35(1 4Mar 2014)(1 4Mar 2014)
IP AddressingIP Addressing
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 102102
Network AddressesNetwork Addresses When an organization is given a block of When an organization is given a block of
addresses, the organization is free to allocate the addresses, the organization is free to allocate the addresses to the devices that need to be addresses to the devices that need to be connected to the Internet. connected to the Internet.
The first address in the class, however, is The first address in the class, however, is normally (not always) treated as a special normally (not always) treated as a special address. address.
The The first address is called the network addressfirst address is called the network address and and defines the organization networkdefines the organization network. .
It defines the organization itself to the rest of the It defines the organization itself to the rest of the world. world.
The first address is the one that is The first address is the one that is used by used by routers to direct the message sent to the routers to direct the message sent to the organizationorganization from the outside. from the outside.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 103103
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
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 104104
Figure 19.5 Two levels of hierarchy in an IPv4 address
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 105105
Two-Level Hierarchy: Two-Level Hierarchy: No SubnettingNo Subnetting
An IP address can define only two levels of hierarchy An IP address can define only two levels of hierarchy when not subnetted. when not subnetted.
PrefixPrefix: The part of the address that defines the : The part of the address that defines the network is called the prefix - The network is called the prefix - The n leftmost bitsn leftmost bits of of the address x.y.z.t/n define the network (organization the address x.y.z.t/n define the network (organization network)network)
SuffixSuffix: the part that defines the host is called the : the part that defines the host is called the suffix - the suffix - the (32-n)(32-n) rightmost bits define the particular rightmost bits define the particular host (computer or router) to the network. host (computer or router) to the network.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 106106
Each address in the block can be considered as a two-level
hierarchical structure: the leftmost n bits (prefix) define
the network;the rightmost 32 − n (suffix) bits define
the host.
NoteNote
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 107107
Three-Levels of Three-Levels of Hierarchy: SubnettingHierarchy: Subnetting
An organization that is granted a large block of An organization that is granted a large block of addresses may want to create clusters of networks addresses may want to create clusters of networks (called subnets) and divide the addresses between (called subnets) and divide the addresses between the different subnets. the different subnets.
The rest of the world still sees the organization as The rest of the world still sees the organization as one entity; however, internally there are several one entity; however, internally there are several subnets. subnets.
All messages are sent to the router address that All messages are sent to the router address that connects the organization to the rest of the Internet; connects the organization to the rest of the Internet; the router routes the message to the appropriate the router routes the message to the appropriate subnets. subnets.
The organization, however, needs to create small sub The organization, however, needs to create small sub blocks of addresses, each assigned to specific blocks of addresses, each assigned to specific subnets. subnets.
The organization has its own mask; The organization has its own mask; each subnet each subnet must also have its own mask.must also have its own mask.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 108108
Three-Level Hierarchy in Three-Level Hierarchy in an IPv4 Addressan IPv4 Address
subnet prefix length can differ for the subnet prefix length can differ for the subnetssubnets
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 109109
ExampleExample suppose an organization is given the block 17.12.40.0/26, suppose an organization is given the block 17.12.40.0/26,
which contains 64 addresses. which contains 64 addresses. The organization has three offices and needs to divide the The organization has three offices and needs to divide the
addresses into three sub blocks of 32, 16, and 16 addresses. addresses into three sub blocks of 32, 16, and 16 addresses.
SolutionSolution We can We can find the new masksfind the new masks by using the following arguments: by using the following arguments:
1. Suppose the mask for the first subnet is n1, then 21. Suppose the mask for the first subnet is n1, then 232- n132- n1 must be must be 32, which means that n1 =27.32, which means that n1 =27.
2. Suppose the mask for the second subnet is n2, then 22. Suppose the mask for the second subnet is n2, then 232- n232- n2 must must be 16, which means that n2 = 28.be 16, which means that n2 = 28.
3. Suppose the mask for the third subnet is n3, then 23. Suppose the mask for the third subnet is n3, then 232- n332- n3 must be must be 16, which means that n3 =28.16, which means that n3 =28.
This means that we have the masks This means that we have the masks 27, 28, 2827, 28, 28 with the with the organization mask being organization mask being 2626..
Figure shows one configuration for the above scenario.Figure shows one configuration for the above scenario.
Three-Levels of Three-Levels of Hierarchy: SubnettingHierarchy: Subnetting
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 110110
Configuration & Addresses: Configuration & Addresses: Subnetted NetworkSubnetted Network
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 111111
Finding subnet addresses Finding subnet addresses from one of the addresses from one of the addresses in the subnet.in the subnet. In subnet 1In subnet 1, the address 17.12.14.29/27 can , the address 17.12.14.29/27 can
give us the subnet address if we use the give us the subnet address if we use the subnet mask /27 subnet mask /27
HostHost: : 00010001 00001100 00001110 0001110100010001 00001100 00001110 00011101
ANDing with MaskANDing with Mask: /27 (27 1s): /27 (27 1s)11111111 11111111 11111111 1110000011111111 11111111 11111111 11100000
We get the We get the subnetsubnet: : 00010001 00001100 00001110 0000000000010001 00001100 00001110 0000000017.12.14.017.12.14.0
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 112112
Finding subnet addresses Finding subnet addresses from one of the addresses from one of the addresses in the subnet.in the subnet. In subnet 2In subnet 2, the address 17.12.14.45/28 can , the address 17.12.14.45/28 can
give us the subnet address if we use the give us the subnet address if we use the subnet mask /28 subnet mask /28
HostHost: : 00010001 00001100 00001110 0010110100010001 00001100 00001110 00101101
ANDing with MaskANDing with Mask: /28 (28 1s): /28 (28 1s)11111111 11111111 11111111 1111000011111111 11111111 11111111 11110000
We get the subnetWe get the subnet: : 00010001 00001100 00001110 0010000000010001 00001100 00001110 0010000017.12.14.3217.12.14.32
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 113113
Finding subnet addresses Finding subnet addresses from one of the addresses from one of the addresses in the subnet.in the subnet. In subnet 3In subnet 3, the address 17.12.14.50/28 can , the address 17.12.14.50/28 can
give us the subnet address if we use the give us the subnet address if we use the subnet mask /28 becausesubnet mask /28 because
HostHost: : 00010001 00001100 00001110 0011001000010001 00001100 00001110 00110010
ANDing with MaskANDing with Mask: /28 (28 1s): /28 (28 1s)11111111 11111111 11111111 1111000011111111 11111111 11111111 11110000
We get the subnetWe get the subnet: : 00010001 00001100 00001110 0011000000010001 00001100 00001110 0011000017.12.14.4817.12.14.48
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 114114
More Levels of More Levels of HierarchyHierarchy
The structure of classless addressing does not The structure of classless addressing does not restrict the number of hierarchical levels.restrict the number of hierarchical levels.
An organization can divide the granted block of An organization can divide the granted block of addresses into subblocks. addresses into subblocks.
Each subblock can in turn be divided into smaller Each subblock can in turn be divided into smaller subblocks. And so on. subblocks. And so on.
One example of this is seen in the ISPs. One example of this is seen in the ISPs. A national ISP can divide a granted large block into smaller A national ISP can divide a granted large block into smaller
blocks and assign each of them to a regional ISP. blocks and assign each of them to a regional ISP. A regional ISP can divide the block received from the A regional ISP can divide the block received from the
national ISP into smaller blocks and assign each one to a national ISP into smaller blocks and assign each one to a local ISP. local ISP.
A local ISP can divide the block received from the regional A local ISP can divide the block received from the regional ISP into smaller blocks and assign each one to a different ISP into smaller blocks and assign each one to a different organization. organization.
Finally, an organization can divide the received block and Finally, an organization can divide the received block and make several subnets out of it.make several subnets out of it.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 115115
Address AllocationAddress Allocation The ultimate responsibility of address allocation The ultimate responsibility of address allocation
is given to a global authority called the Internet is given to a global authority called the Internet Corporation for Assigned Names and Addresses Corporation for Assigned Names and Addresses (ICANN). (ICANN).
However, ICANN does not normally allocate However, ICANN does not normally allocate addresses to individual organizations. addresses to individual organizations.
It assigns a large block of addresses to an ISP.It assigns a large block of addresses to an ISP. Each ISP, in turn, divides its assigned block into Each ISP, in turn, divides its assigned block into
smaller subblocks and grants the subblocks to smaller subblocks and grants the subblocks to its customers. its customers.
In other words, an ISP receives one large block to In other words, an ISP receives one large block to be distributed to its Internet users. be distributed to its Internet users.
This is called This is called address aggregationaddress aggregation: many blocks : many blocks of addresses are aggregated in one block and of addresses are aggregated in one block and granted to one ISP.granted to one ISP.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 116116
An ISP is granted a block of addresses starting An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536 addresses). The ISP with 190.100.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses to three needs to distribute these addresses to three groups of customers as follows:groups of customers as follows:a. a. The first group has The first group has 64 customers64 customers; each needs ; each needs 256 addresses256 addresses..b. b. The second group has The second group has 128 customers128 customers; each ; each needs needs 128 addresses128 addresses..c. c. The third group has The third group has 128 customers128 customers; each needs ; each needs 64 addresses64 addresses..Design the sub blocks and find out how many Design the sub blocks and find out how many addresses are still available after these addresses are still available after these allocations.allocations.
Example 19.10Example 19.10
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 117117
SolutionFigure 19.9 shows the situation.
Group 1For this group, each customer needs 256 addresses. This means that 8 (log2 256) bits are needed to define each host. The prefix length is then 32 − 8 = 24. The addresses are
Example 19.10 (contd….)Example 19.10 (contd….)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 118118
Group 2For this group, each customer needs 128 addresses. This means that 7 (log2 128) bits are needed to define each host. The prefix length is then 32 − 7 = 25. The addresses are
Example 19.10 (contd….)Example 19.10 (contd….)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 119119
Group 3For this group, each customer needs 64 addresses. This means that 6 (log264) bits are needed to each host. The prefix length is then 32 − 6 = 26. The addresses are
Number of granted addresses to the ISP: 65,536Number of allocated addresses by the ISP: 40,960Number of available addresses: 24,576
Example 19.10 (contd….)Example 19.10 (contd….)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 120120
Address allocation and Address allocation and distribution by an ISPdistribution by an ISP
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 121121
Lecture 36Lecture 36(26 Mar 2014)(26 Mar 2014)
IP v6 IP v6
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 122122
IPv6IPv6IPngIPng
Next-Generation Next-Generation IPIP
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 123123
Why A New IP?Why A New IP? Inefficient usage of available IP addresses – classful Inefficient usage of available IP addresses – classful
schemescheme IP address depletion/exhaustionIP address depletion/exhaustion
Aug ‘90 - Class B exhausted by Mar ‘94Aug ‘90 - Class B exhausted by Mar ‘94 Backbone routing table growthBackbone routing table growth
Too much data to exchangeToo much data to exchange Routing calculation complexityRouting calculation complexity
Other issuesOther issues Security - No security mechanism (no encryption and Security - No security mechanism (no encryption and
authentication is provided by IPv4).authentication is provided by IPv4). Quality of Service - Inadequate QoS for nowadays Quality of Service - Inadequate QoS for nowadays
application such as real-time audio and video transmission application such as real-time audio and video transmission (due to delay & resource reservation) strategy(due to delay & resource reservation) strategy
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 124124
ADVANTAGE OF IPv6ADVANTAGE OF IPv6 Larger address spaceLarger address space: IPv4 only 2: IPv4 only 23232. IPv6 2. IPv6 2128 128
340,282,366,920,938,463,463,374,607,431,768,211,340,282,366,920,938,463,463,374,607,431,768,211,456 addresses. Can stand more than 150 years456 addresses. Can stand more than 150 years
Better Better header formatheader format New optionsNew options: allow for additional functionalities : allow for additional functionalities
for future usefor future use Allowance for extensionAllowance for extension: allow the extension of : allow the extension of
the protocol if required by new technologies or the protocol if required by new technologies or applications.applications.
Support for resource allocationSupport for resource allocation.- to support .- to support traffic such as real-time audio and video very traffic such as real-time audio and video very very efficiently compared to IPv4.very efficiently compared to IPv4.
Support for more securitySupport for more security. The encryption and . The encryption and authentication options in IPv6 provide authentication options in IPv6 provide confidentiality and integrity of the packet.confidentiality and integrity of the packet.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 126126
Features of IPv6Features of IPv6 Larger Address SpaceLarger Address Space Efficient and hierarchical addressing and routing Efficient and hierarchical addressing and routing
infrastructureinfrastructure efficient, hierarchical, and summarizable routing efficient, hierarchical, and summarizable routing
infrastructure infrastructure Aggregation-based address hierarchy – Efficient Aggregation-based address hierarchy – Efficient
backbone routing – smaller routing tablesbackbone routing – smaller routing tables Efficient and Extensible IP datagramEfficient and Extensible IP datagram Efficient Header FormatEfficient Header Format
The IPv6 header has a new format that is designed to The IPv6 header has a new format that is designed to minimize header overhead. minimize header overhead.
This is achieved by moving both nonessential fields and This is achieved by moving both nonessential fields and option fields to extension headers that are placed after option fields to extension headers that are placed after the IPv6 header. the IPv6 header.
The streamlined IPv6 header provides more efficient The streamlined IPv6 header provides more efficient processing at intermediate routers.processing at intermediate routers.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 127127
Features of IPv6Features of IPv6 Auto-configuration - To simplify host configuration, Auto-configuration - To simplify host configuration,
Stateless and stateful address configurationStateless and stateful address configuration stateful address configuration, such as address configuration in the stateful address configuration, such as address configuration in the
presence of a DHCP server - hosts on a link automatically configure presence of a DHCP server - hosts on a link automatically configure themselves with IPv6 addresses for the link (link-local addresses) themselves with IPv6 addresses for the link (link-local addresses)
stateless address configuration (address configuration in the absence of stateless address configuration (address configuration in the absence of a DHCP server) - are derived from prefixes advertised by local routers. a DHCP server) - are derived from prefixes advertised by local routers.
Even in the absence of a router, hosts on the same link can Even in the absence of a router, hosts on the same link can automatically configure themselves with link-local addresses and automatically configure themselves with link-local addresses and communicate without manual configuration.communicate without manual configuration.
Built-in security - IPsec mandatoryBuilt-in security - IPsec mandatory Better support for quality of service (QoS) - New fields in the IPv6 Better support for quality of service (QoS) - New fields in the IPv6
header define how traffic is handled and identified - traffic is header define how traffic is handled and identified - traffic is identified in the IPv6 header, support for QoS can be easily identified in the IPv6 header, support for QoS can be easily achieved even when the packet payload is encrypted with IPSecachieved even when the packet payload is encrypted with IPSec
New protocol for neighboring node interaction - The Neighbor New protocol for neighboring node interaction - The Neighbor Discovery protocol for IPv6 - Neighbor Discovery replaces Address Discovery protocol for IPv6 - Neighbor Discovery replaces Address Resolution Protocol (ARP)Resolution Protocol (ARP)
Extensibility - IPv6 can be extended for new features by adding Extensibility - IPv6 can be extended for new features by adding extension headers after the IPv6 header. extension headers after the IPv6 header.
MobilityMobility
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 128128
IPv6 – Improvements over IPv6 – Improvements over IPv4IPv4
Longer addresses than IPv4Longer addresses than IPv4 16 Bytes – 128 bits long16 Bytes – 128 bits long Provides unlimited supply of Internet AddressesProvides unlimited supply of Internet Addresses
Simplification of the headerSimplification of the header Contains 7 fields (13 in IPv4)Contains 7 fields (13 in IPv4) Allows routers to process packets fasterAllows routers to process packets faster Improves throughput and delayImproves throughput and delay
Better support for optionsBetter support for options Required because fields previously required for IPv4 are now Required because fields previously required for IPv4 are now
optionaloptional Options are represented in a different way – makes simple for Options are represented in a different way – makes simple for
routers to skip over options not intended for them – this feature routers to skip over options not intended for them – this feature speeds up packet processing timespeeds up packet processing time
Big advance in securityBig advance in security Authentication and privacy are key featuresAuthentication and privacy are key features
More attention to Quality of service (QoS)More attention to Quality of service (QoS) AutoconfigurationAutoconfiguration
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 133133
IPv6 AddressesIPv6 Addresses128-bit long. Fixed size128-bit long. Fixed sizeLarger Address space - 2Larger Address space - 2128128 = 3.4×10 = 3.4×103838 addresses addresses
665×10 665×102121 addresses per sq. m of earth surface addresses per sq. m of earth surface If assigned at the rate of 10If assigned at the rate of 1066//s, it would take 20 s, it would take 20
yearsyearsExpected to support 8×10Expected to support 8×101717 to 2×10 to 2×103333 addresses addresses
8×108×101717 1,564 address per sq. m1,564 address per sq. mAllows multiple interfaces per host.Allows multiple interfaces per host.Allows multiple addresses per interface Allows multiple addresses per interface Allows unicast, multicast, anycastAllows unicast, multicast, anycastAllows provider based, site-local, link-localAllows provider based, site-local, link-local85% of the space is unassigned85% of the space is unassigned
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 137137
IPv6 AddressingIPv6 Addressing
128 bit addresses!128 bit addresses! 340,282,366,920,938,463,463,374,607,431340,282,366,920,938,463,463,374,607,431
,768,211,456 addresses!,768,211,456 addresses! Uses hierarchical addressing structureUses hierarchical addressing structure Allows embedding of IEEE 802 address Allows embedding of IEEE 802 address
as EUI-64 identifiersas EUI-64 identifiers Specified as 8 16-bit hexadecimal Specified as 8 16-bit hexadecimal
numbers separated by colonsnumbers separated by colons
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 138138
Hexadecimal Colon Hexadecimal Colon NotationNotation Written as Written as eight sections eight sections each of 2 byte length separated by colonseach of 2 byte length separated by colons 2 bytes (16 bits) in hexadecimal requires 2 bytes (16 bits) in hexadecimal requires four hexadecimal digitsfour hexadecimal digits Therefore address contain 32 hexadecimal digits with every four digits separated Therefore address contain 32 hexadecimal digits with every four digits separated
by a colonby a colonSo, There are:So, There are: 8 groups of 4 hexadecimal digits.8 groups of 4 hexadecimal digits. Each group represents 16 bits (4 hexa digits X 4 bit)Each group represents 16 bits (4 hexa digits X 4 bit) Separator is “:” (colon)Separator is “:” (colon) Hex digits are not case sensitive, so “DBCA” is same as “dbca” or “DBca”…Hex digits are not case sensitive, so “DBCA” is same as “dbca” or “DBca”…
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 139139
Abbreviated IPv6 Abbreviated IPv6 AddressesAddresses
The The leading zeros within a group can be omittedleading zeros within a group can be omitted – only the leading zeros can be – only the leading zeros can be dropped, not the trailing zeros dropped, not the trailing zeros
Further abbreviations are possible if there are Further abbreviations are possible if there are consecutive sectionsconsecutive sections consisting consisting of zeros only.of zeros only.
One or more consecutive groups of zeros can be replaced by a pair of colons – One or more consecutive groups of zeros can be replaced by a pair of colons – allowed only once per addressallowed only once per address
Re-expansion of the abbreviated address is very simple: Align the unabbreviated Re-expansion of the abbreviated address is very simple: Align the unabbreviated portions and insert zeros to get the original expanded address.portions and insert zeros to get the original expanded address.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 140140
Expand the address 0:15::1:12:1213 to its original.
SolutionWe 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.
Example 19.11Example 19.11
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 141141
Prefix and Interface IDPrefix and Interface IDIPv6 (128-bit) address contains two parts:IPv6 (128-bit) address contains two parts: The first 64-bits is known as the The first 64-bits is known as the prefixprefix. The prefix . The prefix
includes the network and subnet address. Because includes the network and subnet address. Because addresses are allocated based on physical location, the addresses are allocated based on physical location, the prefix also includes global routing information. The 64-prefix also includes global routing information. The 64-bit prefix is often referred to as the global routing bit prefix is often referred to as the global routing prefix.prefix.
The last 64-bits is the The last 64-bits is the interface IDinterface ID. This is the unique . This is the unique address assigned to an interface.address assigned to an interface.
NoteNote: Addresses are assigned to interfaces (network : Addresses are assigned to interfaces (network connections), not to the host. Each interface can have connections), not to the host. Each interface can have more than one IPv6 address. more than one IPv6 address.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 142142
IPv6 Addressing In UseIPv6 Addressing In Use IPv6 uses the IPv6 uses the “/” notation“/” notation to denote how to denote how
many bits in the IPv6 address represent many bits in the IPv6 address represent the subnet.the subnet.
The full syntax of IPv6 isThe full syntax of IPv6 isipv6-address/prefix-lengthipv6-address/prefix-length
wherewhere ipv6-address is the 128-bit IPv6 addressipv6-address is the 128-bit IPv6 address /prefix-length is a decimal value /prefix-length is a decimal value
representing how many of the left most representing how many of the left most contiguous bits of the address comprise contiguous bits of the address comprise the prefix.the prefix.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 143143
IPv6 Addressing In UseIPv6 Addressing In Use
Let’s analyze an example:Let’s analyze an example:
2001:C:7:ABCD::1/642001:C:7:ABCD::1/64 is really is really
2001:000C:0007:ABCD2001:000C:0007:ABCD::0000:0000:0000:00010000:0000:0000:0001//6464The first 64-bits The first 64-bits 2001:000C:0007:ABCD2001:000C:0007:ABCD is the is the
address prefixaddress prefixThe last 64-bits The last 64-bits 0000:0000:0000:00010000:0000:0000:0001 is the is the
interface IDinterface ID /64/64 is the is the prefix lengthprefix length (/64 is well-known and (/64 is well-known and
also the prefix length in most cases)also the prefix length in most cases)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 144144
Address SpaceAddress Space
IPv6 is divided into IPv6 is divided into several categoriesseveral categories. . A few leftmost bits, called the A few leftmost bits, called the type type
prefixprefix, in each address define its , in each address define its category. category.
The type prefix is The type prefix is variable in lengthvariable in length
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 145145
Type Prefixes for IPv6 Type Prefixes for IPv6 AddressesAddresses
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 146146
Type Prefixes for IPv6 Type Prefixes for IPv6 AddressesAddresses
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 147147
IPv6IPv6
IPv6 supports 3 types of addresses IPv6 supports 3 types of addresses UnicastUnicast MulticastMulticast AnycastAnycast
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 148148
IPv6 Address TypesIPv6 Address Types
A single interface may be assigned multiple IPv6 addresses of any type (unicast, anycast, multicast)
Address TypeAddress Type Description Description
UnicastUnicastOne to One (Global, Link local, Site local)+ An address destined for a single interface.
MulticastMulticast
One to Many+ An address for a set of interfaces+ Delivered to a group of interfaces identified by that address.+ Replaces IPv4 “broadcast”
AnycastAnycastOne to Nearest (Allocated from Unicast)+ Delivered to the closest interface as determined by the IGP
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 149149
Lecture 37Lecture 37(27 Mar 2014)(27 Mar 2014)
IP v6 contdIP v6 contd……..
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 150150
Unicast AddressesUnicast Addresses
Unicast addresses identify a single Unicast addresses identify a single interface, so defines a single computer.interface, so defines a single computer.
The packet sent to a unicast address must The packet sent to a unicast address must be delivered to that specific computer. be delivered to that specific computer.
IPv6 defines two types of unicast IPv6 defines two types of unicast addresses:addresses: Geographically based, and Geographically based, and provider-based - the provider-based address is provider-based - the provider-based address is
generally used by a normal host as a unicast generally used by a normal host as a unicast address.address.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 151151
Multicast AddressesMulticast Addresses
Multicast addresses identify a group of Multicast addresses identify a group of interfaces - which define a group of hosts interfaces - which define a group of hosts instead of just one. instead of just one.
A packet sent to a multicast address is A packet sent to a multicast address is delivered to all of the interfaces in the delivered to all of the interfaces in the group – in turn delivered to each member group – in turn delivered to each member of the group.of the group.
NOTE: There are no broadcast addresses in NOTE: There are no broadcast addresses in IPv6, their function being superseded by IPv6, their function being superseded by multicast addresses. multicast addresses.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 152152
Anycast AddressesAnycast Addresses IPv6 also defines anycast addresses. IPv6 also defines anycast addresses. Anycast addresses identify a set of interfaces such that a Anycast addresses identify a set of interfaces such that a
packet sent to a anycast address will be delivered to one packet sent to a anycast address will be delivered to one member of the set. member of the set.
An anycast address, like a multicast address, also An anycast address, like a multicast address, also defines a defines a group of nodesgroup of nodes. .
However, a packet destined for an anycast address is However, a packet destined for an anycast address is delivered to only one of the members of the anycast group, delivered to only one of the members of the anycast group, the the nearest onenearest one (the one with the shortest route). (the one with the shortest route).
Although the definition of an anycast address is still Although the definition of an anycast address is still debatable, one possible use is to assign an anycast debatable, one possible use is to assign an anycast address to all routers of an ISP that covers a large logical address to all routers of an ISP that covers a large logical area in the Internet. area in the Internet.
The routers outside the ISP deliver a packet destined for The routers outside the ISP deliver a packet destined for the ISP to the nearest ISP router. the ISP to the nearest ISP router.
No block is assigned for anycast addresses.No block is assigned for anycast addresses.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 153153
Reserved AddressesReserved Addresses
Another category in the address Another category in the address space is the reserved address. space is the reserved address.
These addresses start with eight Os These addresses start with eight Os (type prefix is 00000000). (type prefix is 00000000).
A few subcategories are further A few subcategories are further defined in this categorydefined in this category
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 154154
Reserved Addresses in Reserved Addresses in IPv6IPv6
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 155155
Local AddressesLocal AddressesThese addresses are used when an These addresses are used when an
organization wants to use IPv6 protocol organization wants to use IPv6 protocol without being connected to the global without being connected to the global Internet. Internet.
In other words, they provide addressing In other words, they provide addressing for private networks.for private networks.
Nobody outside the organization can send Nobody outside the organization can send a message to the nodes using these a message to the nodes using these addresses. addresses.
Two types of addresses are defined for Two types of addresses are defined for this purposethis purpose Link LocalLink Local Site LocalSite Local
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 156156
SecuritySecurity
IPv6 adds three security servicesIPv6 adds three security services Packet authenticationPacket authentication Packet integrityPacket integrity Packet confidentialityPacket confidentiality
Implemented using the Implemented using the Authentication Header and the Authentication Header and the Encapsulating Security Payload Encapsulating Security Payload HeaderHeader
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 157157
IPv6 HeadersIPv6 Headers
Simpler header - faster processing Simpler header - faster processing by routers.by routers. No optional fields - fixed size (40 bytes)No optional fields - fixed size (40 bytes) No fragmentation fields.No fragmentation fields. No checksumNo checksum
Support for multiple headersSupport for multiple headers more flexible than simple “protocol” more flexible than simple “protocol”
field.field.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 158158
IPv4 HeaderIPv4 Header
VERS HL
Fragment Offset
Fragment LengthService
Datagram ID FLAG
TTL Protocol Header Checksum
Source Address
Destination Address
Options (if any)
Data
1 byte1 byte 1 byte 1 byte
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 159159
IPv6 HeaderIPv6 Header
VERS PRIO
Hop Limit
Flow Label
Payload Length Next Header
1 byte1 byte 1 byte 1 byte
Source Address (128 bits - 16 bytes)
Dest. Address (128 bits - 16 bytes)
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 160160
IPv6 Header FieldsIPv6 Header Fields VERS:VERS: IP version number – 6 (4 for IPv4) IP version number – 6 (4 for IPv4) Priority/Traffic Class:Priority/Traffic Class: will be used in congestion will be used in congestion
control – to distinguish between packet with control – to distinguish between packet with different real-time delivery requirementsdifferent real-time delivery requirements
Flow Label:Flow Label: experimental - sender can label a experimental - sender can label a sequence of packets as being in the same flow.sequence of packets as being in the same flow.
Payload LengthPayload Length: number of bytes following the 40 : number of bytes following the 40 byte header byte header
Next Header:Next Header: tells which of the six extension tells which of the six extension headers follow this oneheaders follow this one
Hop Limit:Hop Limit: same as TTL field in IPv4 same as TTL field in IPv4 Source/Destination Address:Source/Destination Address: 16 Bytes each 16 Bytes each
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 161161
Extension HeadersExtension Headers
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 162162
Extension HeadersExtension HeadersHop-by-Hop Option – Special options that Hop-by-Hop Option – Special options that
require hop-by-hop processingrequire hop-by-hop processingDestination Options – Optional information to Destination Options – Optional information to
be examined by the destination nodebe examined by the destination nodeRouting – Extended routing, like IPv4 loose list Routing – Extended routing, like IPv4 loose list
of routers to visitof routers to visitFragmentation – Fragmentation and Fragmentation – Fragmentation and
reassemblyreassemblyAuthentication – Integrity and authentication, Authentication – Integrity and authentication,
security security Encrypted Security payload – ConfidentialityEncrypted Security payload – Confidentiality
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 163163
IPv6 Vs IPv4 HeaderIPv6 Vs IPv4 Header IPv6 twice the size of IPv4 headerIPv6 twice the size of IPv4 headerVersion: only field with same position and Version: only field with same position and
meaningmeaningRemovedRemoved: :
Header length, fragmentation fields Header length, fragmentation fields (identification, flags, fragment offset), (identification, flags, fragment offset), header checksumheader checksum
ReplacedReplaced:: Datagram length by payload lengthDatagram length by payload length Protocol type by next headerProtocol type by next header Time to live by hop limitTime to live by hop limit Type of service by “class” octetType of service by “class” octet
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 164164
Major Improvements of Major Improvements of IPv6 HeaderIPv6 Header
No option fieldNo option field: Replaced by extension : Replaced by extension header. Result in a fixed length, 40-header. Result in a fixed length, 40-byte IP header.byte IP header.
No header checksumNo header checksum: Result in fast : Result in fast processing. processing.
No fragmentation at intermediate No fragmentation at intermediate nodesnodes: Result in fast IP forwarding.: Result in fast IP forwarding.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 165165
4040bytesbytes
6060bytesbytes
IPv4IPv4
IPv6IPv6
00 1515 1616 3131
vers IHL TOS total lengthvers IHL TOS total length
identification flags frag-offsetidentification flags frag-offset
TTL protocol header checksumTTL protocol header checksum
source addresssource address
destination addressdestination address
options and paddingoptions and padding
vers traffic class flow-labelvers traffic class flow-label
payload length next header hop limitpayload length next header hop limit
source addresssource address
destination addressdestination address
Removed (6)Removed (6)• IHL, TOSIHL, TOS• ID, flags, frag offsetID, flags, frag offset• header checksumheader checksum
Changed (3)Changed (3)
Added (2)Added (2)
ExpandedExpanded
• total length => payloadtotal length => payload• protocol => next headerprotocol => next header• TTL => hop limitTTL => hop limit
• traffic classtraffic class• flow labelflow label
• address 32 to 128 bitsaddress 32 to 128 bits
Header comparisonHeader comparison
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 166166
IPv6 vs IPv4IPv6 vs IPv4AddedAdded: flow label: flow labelAll fields - All fields - fixed size fixed size No Optional No Optional fields. Replaced by fields. Replaced by Extension Extension
Headers.Headers. Idea:Idea: avoid unnecessary processing by avoid unnecessary processing by
intermediate routers w/o sacrificingintermediate routers w/o sacrificing the the flexibility flexibility
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 167167
Transition from IPv4 TO Transition from IPv4 TO IPv6IPv6
Because of the huge number of Because of the huge number of systems on the Internet, the transition systems on the Internet, the transition from IPv4 to IPv6 cannot happen from IPv4 to IPv6 cannot happen drastically.drastically.
Takes a large amount of time before it Takes a large amount of time before it will happen will happen
The transition must be smooth to The transition must be smooth to prevent any problems between IPv4 to prevent any problems between IPv4 to IPv6 systems.IPv6 systems.
The strategies have been devised by The strategies have been devised by the IETF to help the transitionthe IETF to help the transition
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 168168
Three Transition Three Transition StrategiesStrategies
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 169169
Dual stackDual stack
It is recommended that all hosts, It is recommended that all hosts, before migrating completely to before migrating completely to version 6, have a dual stack of version 6, have a dual stack of protocols.protocols.
In other words a station must run In other words a station must run IPv4 and IPv6 simultaneously until all IPv4 and IPv6 simultaneously until all the Internet uses IPv6. see fig. 20.19the Internet uses IPv6. see fig. 20.19
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 170170
Dual stackDual stack
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 171171
TunnelingTunneling
A strategy used when two computers A strategy used when two computers using IPv6 want to communicate with using IPv6 want to communicate with each other and the packet must pass each other and the packet must pass thru a region that uses IPv4.thru a region that uses IPv4.
To pass thru this region, the packet To pass thru this region, the packet must have an IPv4 address.must have an IPv4 address.
So the IPv6 packet is encapsulated So the IPv6 packet is encapsulated in an IPv4 packet when it enters the in an IPv4 packet when it enters the region, and it leaves its capsule region, and it leaves its capsule when exits the region.when exits the region.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 172172
Tunneling StrategyTunneling Strategy
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 173173
Header TranslationHeader Translation
Header translation is necessary when Header translation is necessary when the majority of the internet has moved the majority of the internet has moved to IPv6 but some systems still use to IPv6 but some systems still use IPv4.IPv4.
E.g. the sender wants to use IPv6, but E.g. the sender wants to use IPv6, but the receiver does not understand the receiver does not understand IPv6. see fig. 20.21.IPv6. see fig. 20.21.
Tunneling doesn’t work in this Tunneling doesn’t work in this situation bcoz the packet must be in situation bcoz the packet must be in IPv4 format to be understood by the IPv4 format to be understood by the receiver.receiver.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 174174
Header Translation Header Translation StrategyStrategy
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 175175
Summary – IPv6Summary – IPv6
IPv6 uses 128-bit addressesIPv6 uses 128-bit addresses Allows provider-based, site-local, link-local, multicast, Allows provider-based, site-local, link-local, multicast,
anycast addressesanycast addresses Fixed header size. Extension headers instead of Fixed header size. Extension headers instead of
options for provider selection, security etcoptions for provider selection, security etc Allows auto-configurationAllows auto-configuration Dual-IP, 6-to-4 etcDual-IP, 6-to-4 etc for transitionfor transition
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 176176
SUMMARYSUMMARY At the network layer, a global identification At the network layer, a global identification
system that uniquely identifies every host and system that uniquely identifies every host and router is necessary for delivery of a packet from router is necessary for delivery of a packet from host to host.host to host.
An IPv4 address is 32 bits long and uniquely and An IPv4 address is 32 bits long and uniquely and universally defines a host or router on the universally defines a host or router on the Internet.Internet.
In classful addressing, the portion of the IP In classful addressing, the portion of the IP address that identifies the network is called the address that identifies the network is called the netid.netid.
In classful addressing, the portion of the IP In classful addressing, the portion of the IP address that identifies the host or router on the address that identifies the host or router on the network is called the hostid.network is called the hostid.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 177177
SUMMARYSUMMARY An IP address defines a device's connection to a An IP address defines a device's connection to a
network.network. There are five classes in IPv4 addresses. Classes A, B, There are five classes in IPv4 addresses. Classes A, B,
and C differ in the number of hosts allowed per and C differ in the number of hosts allowed per network. Class D is for multicasting and Class E is network. Class D is for multicasting and Class E is reserved.reserved.
The class of an address is easily determined by The class of an address is easily determined by examination of the first byte.examination of the first byte.
Addresses in classes A, B, or C are mostly used for Addresses in classes A, B, or C are mostly used for unicast communication.unicast communication.
Addresses in class D are used for multicast Addresses in class D are used for multicast communication.communication.
Subnetting divides one large network into several Subnetting divides one large network into several smaller ones, adding an intermediate level of hierarchy smaller ones, adding an intermediate level of hierarchy in IP addressing.in IP addressing.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 178178
SUMMARYSUMMARY Supernetting combines several networks into one Supernetting combines several networks into one
large one.large one. In classless addressing, we can divide the In classless addressing, we can divide the
address space into variable-length blocks.address space into variable-length blocks. There are three restrictions in classless There are three restrictions in classless
addressing:addressing: a. The number of addresses needs to be a power of 2.a. The number of addresses needs to be a power of 2. b. The mask needs to be included in the address to b. The mask needs to be included in the address to
define the block.define the block. c. The starting address must be divisible by the number c. The starting address must be divisible by the number
of addresses in the block.of addresses in the block. The mask in classless addressing is expressed The mask in classless addressing is expressed
as the prefix length (/n) in CIDR notation.as the prefix length (/n) in CIDR notation.
April 18, 2023April 18, 2023 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 179179
SUMMARYSUMMARY To find the first address in a block, we set the rightmost (32-n) bits to To find the first address in a block, we set the rightmost (32-n) bits to
O.O. To find the number of addresses in the block, we calculate 2To find the number of addresses in the block, we calculate 232- n32- n, where , where
n is the prefix length.n is the prefix length. To find the last address in the block, we set the rightmost (32-n) bits to To find the last address in the block, we set the rightmost (32-n) bits to
1.1. Subnetting increases the value of n.Subnetting increases the value of n. The global authority for address allocation is ICANN. ICANN normally The global authority for address allocation is ICANN. ICANN normally
grants large blocks of addresses to ISPs, which in turn grant small grants large blocks of addresses to ISPs, which in turn grant small subblocks to individual customers.subblocks to individual customers.
IPv6 addresses use hexadecimal colon notation with abbreviation IPv6 addresses use hexadecimal colon notation with abbreviation methods available.methods available.
There are three types of addresses in IPv6: There are three types of addresses in IPv6: unicast, unicast, anycast, and anycast, and multicast.multicast.
In an IPv6 address, the variable type prefix field defines the address In an IPv6 address, the variable type prefix field defines the address type or purpose.type or purpose.