This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
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
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?
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.
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?
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?
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
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
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
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
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.
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
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
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)
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
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
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.
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
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
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
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
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
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.
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
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)
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.
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
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)
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.
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.
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
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
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
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.
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.
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)
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.
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
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
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.
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.
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.
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
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).
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
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..
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.
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..
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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
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
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.
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.
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.
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
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
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
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
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.
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
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.
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.
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
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
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”…
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.
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.
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.
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.
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)
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
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.
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.
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.
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
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
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
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,
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
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.
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
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
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
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.
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.
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.
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.
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.
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.