0% found this document useful (0 votes)
4 views

Unit-4

This document covers the IP Protocol, focusing on IPv4 and IPv6 addressing schemes, their characteristics, advantages, and disadvantages. It details the packet structure of IPv4, including its components and addressing schemes, as well as the differences between classful and classless addressing. The learning outcomes aim to equip students with the ability to describe, illustrate, and differentiate between IPv4 and IPv6 protocols.

Uploaded by

dhairyavyas3125
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Unit-4

This document covers the IP Protocol, focusing on IPv4 and IPv6 addressing schemes, their characteristics, advantages, and disadvantages. It details the packet structure of IPv4, including its components and addressing schemes, as well as the differences between classful and classless addressing. The learning outcomes aim to equip students with the ability to describe, illustrate, and differentiate between IPv4 and IPv6 protocols.

Uploaded by

dhairyavyas3125
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

C. U.

Shah (Government) Polytechnic, Surendranagar


Department of Computer Engineering

Subject Code: 4340703 UNIT – 4


Subject Name: Computer Networking IP Protocol

Prepared By:
Mr. Shaktisinh S. Parmar (Lecturer)
Department of Computer Engineering, C.U.S.P., Surendranagar

COURSE OUTCOME(S) (COs) ASSOCIATED


WITH THIS UNIT
Students are able to:
• CompareIPv4 and IPv6 addressing scheme.

1
LEARNING OUTCOME(S) (LOs) OF THIS UNIT
Students are able to:
• Describe IP v4 and IP v6 protocol.
• Illustrate subnet and usage of subnet masking.
• Differentiate IPv4 and IPv6.

TOPICS WILL BE COVERED IN THIS UNIT:


• IP Protocol–IPv4:
• Characteristics,
• Advantages and Disadvantages,
• Packet structure,
• Address classes,
• Subnet & masking,
• Reserved Address.
• IP Protocol – IP v6:
• Characteristics,
• Addressing modes,
• Address types,
• Special Address.
• Difference between IPv4 and IPv6

2
IP Protocol
• The Internet Protocol (IP) is the principal communications protocol in the
Internet protocol suite for transferring datagrams across network boundaries.
• Its routing function enables internetworking, and essentially establishes
the Internet.
• IP has the task of delivering packets from the source host to the
destination host based on the IP addresses in the packet headers.
• IP defines packet structures that encapsulate the data to be delivered.
• It also defines addressing methods that are used to label the datagram with
source and destination information.
• The first major version of IP, Internet Protocol Version 4 (IPv4), is the dominant
protocol of the Internet. Its successor is Internet Protocol Version 6 (IPv6).
• IPv4
• IPv6

3
IP PROTOCOL VERSION 4
• Internet Protocol version 4 (IPv4) is the fourth version of the
Internet Protocol (IP).
• It is one of the core protocols of standards-based internetworking
methods in the Internet, and was the first version deployed for
production in the ARPANET in 1983.
• IPv4 is a connectionless protocol for use on packet- switched
networks.
• It does not provide error control and flow control.
• It is unreliable protocol.
• IP version four addresses are 32-bit integers which will be expressed
in decimal notation.
• Example- 192.0.2.126 could be an IPv4 address.

Parts of IPv4
• Network part:
• The network part indicates the distinctive variety that’s appointed to the
network. The network part conjointly identifies the category of the network
that’s assigned.
• Host Part:
• The host part uniquely identifies the machine on your network. This part of the
IPv4 address is assigned to every host.
• For each host on the network, the network part is the same, however, the host
part must vary.
• Subnet number:
• It is an optional part of the IP address. It is the partition of an IP address into
many smaller segments. It helps interconnect networks and reduces traffic.
• Local networks that have massive numbers of hosts are divided into subnets and
subnet numbers are appointed to that.
4
5
Characteristics of IPv4
• IPv4 could be a 32-Bit IP Address.
• IPv4 could be a numeric address, and its bits are separated by a dot.
• It has Unicast, broadcast, and multicast style of addresses.
• IPv4 supports VLSM (Virtual Length Subnet Mask).
• IPv4 uses the Post Address Resolution Protocol to map to the MAC
address.
• Routing Information Protocol(RIP) may be a routing protocol supported
by the routed daemon.
• Networks ought to be designed either manually or with DHCP.
• Packet fragmentation permits from routers and causing host.

Advantages of IPV4
• IPV4 is necessary to encrypt data to ensure privacy. It takes security
measures to encrypt data in its address packets.
• IPV4 protocol can be easily supported by most of the topology.
• Since addresses are combined more effectively the process of routing has
become more efficient in IPV4.
• Devices can easily handle IPV4 routing, which is part of the IPV4 protocol.
As a consequence, practically every major device will accept the IPV4
protocol.
• IPV4 does to great lengths to ensure that data packets arrive at their
destination. This is because the transmission control protocol employs
IPV4 variants.
• Compatible with any device. IPv4’s fundamental purpose is to connect
devices across the network. And certainly, millions of devices already
support this protocol. That makes it the easiest compatible Internet
Protocol for devices.

6
Disadvantages of IPV4
• The lack of address space - the number of different devices connected to the
Internet grows exponentially, and the size of the address space is quickly
depleted;
• Weak protocol extensibility - the insufficient size of the IPv4 header, which
does not accommodate the required number of additional parameters;
• The problem of security of communications - no means are provided to limit
access to information hosted on the network. IPv4 has never been designed for
security.
• Originally designed as an isolated military network
• Then adapted for public education and research network
• Lack of quality-of-service support - placement of information about
bandwidth, delays required for smooth operation of some network applications
are not supported;
• Geographic limitations - since the Internet was created in the USA, this country
is also involved in the distribution of IP addresses. Almost 50% of all addresses
are reserved for the United States.

IPv4 - Packet Structure

• Internet Protocol being a layer-3 protocol (OSI) takes data Segments


from layer-4 (Transport) and divides it into packets. IP packet
encapsulates data unit received from above layer and add to its own
header information.

• The encapsulated data is referred to as IP Payload. IP header contains


all the necessary information to deliver the packet at the other end.

7
IPv4 - Packet Structure

IPv4 - Packet Structure

8
IPv4 - Packet Structure
• Version − Version no. of Internet Protocol used (e.g. IPv4).

• IHL − Internet Header Length; Length of entire IP header.

• DSCP − Differentiated Services Code Point; this is Type of Service. Originally defined as the
Type of service (ToS) field. New technologies are emerging that require real-time data
streaming and therefore make use of the DSCP field. An example is Voice over IP (VoIP),
which is used for interactive data voice exchange.

• ECN − Explicit Congestion Notification; It carries information about the congestion seen in
the route.

• Total Length − Length of entire IP Packet (including IP header and IP Payload). This 16-bit
field defines the entire packet size, (header + data) in bytes. The minimum-length of packet
is 20 bytes and the maximum is 65,535 bytes.

IPv4 - Packet Structure


• Identification − If IP packet is fragmented during the transmission, all the fragments
contain same identification number. to identify original IP packet, they belong to.
• Flags − As required by the network resources, if IP Packet is too large to handle, these
‘flags’ tells if they can be fragmented or not. In this 3-bit flag, the MSB is always set to
‘0’.
• bit 0: Reserved; must be zero.
• bit 1: Don't Fragment (DF) which indicates that this packet should not be fragmented.
• bit 2: More Fragments (MF) which is set on all fragmented packets except the last one.
• Fragment Offset − This offset tells the exact position of the fragment in the original
IP Packet.
• Time to Live − To avoid looping in the network, every packet is sent with some TTL
value set, which tells the network how many routers (hops) this packet can cross. At
each hop, its value is decremented by one and when the value reaches zero, the
packet is discarded.

9
IPv4 - Packet Structure
• Protocol − Tells the Network layer at the destination host, to which Protocol this packet
belongs to, i.e. the next level Protocol. For example, protocol number of ICMP is 1, TCP is 6
and UDP is 17.

• Header Checksum − This field is used to keep checksum value of entire header which is then
used to check if the packet is received error-free.

• Source Address − 32-bit address of the Sender (or source) of the packet.

• Destination Address − 32-bit address of the Receiver (or destination) of the packet.

• Options − This is optional field, which is used if the value of IHL is greater than 5. These
options may contain values for options such as Security, Record Route, Time Stamp, etc.

IP ADDRESSING SCHEMES
• IP Address: it is a logical address used to identify a device in a
network uniquely.
• IPv4 uses 32-bit (four-byte) addresses, which limits the address space
to 4294967296 (2^32) addresses.
• IP addressing schemes:
• Classful addressing
• Classless addressing
• IP Address Notations:
• Binary notation
• Dotted decimal notation

10
IP ADDRESS NOTATIONS

CLASSFUL ADDRESSING
• Internet Protocol hierarchy contains several classes of IP Addresses to
be used efficiently in various situations as per the requirement of hosts per
network. Broadly, the IPv4 Addressing system is divided into five classes
of IP Addresses. All the five classes are identified by the first octet of IP
Address.
• Internet Corporation for Assigned Names and Numbers is responsible for
assigning IP addresses.
• The number of networks and the number of hosts per class can be derived
by this formula −

• When calculating hosts' IP addresses, 2 IP addresses are decreased because


they cannot be assigned to hosts, i.e. the first IP of a network is network
number and the last IP is reserved for Broadcast IP.

11
CLASSFUL ADDRESSING
• The high order octet of the addresses was redefined to
create a set of classes of networks, in a system which
later became known as Classful networking.
• The system defined five classes, Class A, B, C, D, and E.
• The Classes A, B, and C had different bit lengths for
the new network identification.
• The rest of an address was used as previously to identify a
host within a network, which meant that each network
class had a different capacity to address hosts.
• Class D was allocated for multicast addressing.
• Class E was reserved for future applications.

CLASSFUL ADDRESSING
Network id Host id

12
Class A Address
• The first bit of the first octet is always set to 0 (zero). Thus, the first octet
ranges from 1 – 127, i.e.

• Class A addresses only include IP starting from 1.x.x.x to 126.x.x.x only. The
IP range 0.X.X.X is reserved for default network 127.x.x.x is reserved for
loopback IP addresses.

• Class A IP address format is thus:


0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH
• The default subnet mask for Class A IP address is 255.0.0.0 which implies
that Class A addressing can have 126 networks (2^7-2) and 16777214 hosts
(2^24-2).

Class B Address
• An IP address which belongs to class B has the first two bits in the first
octet set to 10, i.e.

• Class B IP Addresses range from 128.0.x.x to 191.255.x.x. The default


subnet mask for Class B is 255.255.x.x.

• Class B IP address format is:


10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
• Class B has 16384 (2^14) Network addresses and 65534 (2^16-2) Host
addresses.
13
Class C Address
• The first octet of Class C IP address has its first 3 bits set to 110, that is −

• Class C IP addresses range from 192.0.0.x to 223.255.255.x. The default


subnet mask for Class C is 255.255.255.x.

• Class C IP address format is:


110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
• Class C gives 2097152 (2^21) Network addresses and 254 (2^8-2) Host
addresses.

Class D Address
• Very first four bits of the first octet in Class D IP addresses are set to
1110, giving a range of −

• Class D has IP address range from 224.0.0.0 to 239.255.255.255. Class D


is reserved for Multicasting. In multicasting data is not destined for a
particular host, that is why there is no need to extract host address from
the IP address, and Class D does not have any subnet mask.

14
Class E Address
• This IP Class is reserved for experimental purposes only for R&D or
Study. IP addresses in this class ranges from 240.0.0.0 to
255.255.255.254. Like Class D, this class too is not equipped with any
subnet mask.

Summary of Classes of IPv4

15
Disadvantage of Classful Addressing:
• Class A with a mask of 255.0.0.0 can support 128 Network, 16,777,216
addresses per network and a total of 2,147,483,648 addresses.
• Class B with a mask of 255.255.0.0 can support 16,384 Network,
65,536 addresses per network and a total of 1,073,741,824 addresses.
• Class C with a mask of 255.255.255.0 can support 2,097,152 Network,
256 addresses per network and a total of 536,870,912 addresses.
• But what if someone requires 2000 addresses ?
• One way to address this situation would be to provide the person with class B
network. But that would result in a waste of so many addresses.
• Another possible way is to provide multiple class C networks, but that too can
cause a problem as there would be too many networks to handle.
• To resolve problems like the one mentioned above Classless Inter-
Domain Routing (CIDR) was introduced.

CIDR notation:
• In CIDR subnet masks are denoted by /X. For example, a subnet of
255.255.255.0 would be denoted by /24. To work a subnet mask in CIDR,
we have to first convert each octet into its respective binary value. For
example, if the subnet is of 255.255.255.0. then :
• First Octet – 255 has 8 binary 1's when converted to binary
• Second Octet –255 has 8 binary 1's when converted to binary
• Third Octet – 255 has 8 binary 1's when converted to binary
• Fourth Octet – 0 has 0 binary 1's when converted to binary
• Therefore, in total there are 24 binary 1’s, so the subnet mask is /24.
• While creating a network in CIDR, a person has to make sure that the
masks are contiguous, i.e. a subnet mask like 10111111.X.X.X can’t exist.

16
Difference between Classful Addressing and Classless Addressing
Sr. No. Parameter Classful Addressing Classless Addressing

In Classful addressing IP addresses are allocated according to the Classless addressing came to replace the classful addressing and to
1. Basics
classes- A to E. handle the issue of rapid exhaustion of IP addresses.

2. Practical It is less practical. It is more practical.

3. Network ID and Host ID The changes in the Network ID and Host ID depend on the class. There is no such restriction of class in classless addressing.

4. VLSM It does not support the Variable Length Subnet Mask (VLSM). It supports the Variable Length Subnet Mask (VLSM).

Classful addressing requires more bandwidth. As a result, it


It requires less bandwidth. Thus, fast and less expensive as
5. Bandwidth becomes slower and more expensive as compared to classless
compared to classful addressing.
addressing.

6. CIDR It does not support Classless Inter-Domain Routing (CIDR). It supports Classless Inter-Domain Routing (CIDR).

7. Updates Regular or periodic updates Triggered Updates

Troubleshooting and problem detection are easy than classless


Troubleshooting and
8. addressing because of the division of network, host and subnet It is not as easy compared to classful addressing.
Problem detection
parts in the address.

•Network
•Host
9. Division of Address •Host
•Subnet
•Subnet

SUBNET AND SUBNET MASKING


• Every website or device on network needs a unique IP address; in
order to uniquely identify the website, we are dividing the IP network
into two or more networks called subnet, which is preferred to
control network traffic.
• It is a smaller network inside a large network. This technique makes
the network routing an efficient one.
• The main features of subnet are as follows :
• Reduce network congestion.
• Control network growth
• Ease administration
• Boost network security

17
SUBNET AND SUBNET MASKING
• Generally, we divide the network into smaller networks or subnets
which is called subnetting.
• Let’s take a class A of network. In class A, we have 224hosts. To
manage such a large number of hosts is a very difficult job. So, if we
divide this large network into the smaller network then maintaining
each network would become easy.

SUBNET AND SUBNET MASKING


• IP address are designed at two level of hierarchy. In that network id part is
used to identify a network and host id part is used to identify a host in a
network.
• [ netid  hostid ], two level of hierarchy.
• Sometimes two level of hierarchy is not suitable for an organizations. At
that time three level of hierarchy is used.
• [netidsubnet-idhostid], three level of hierarchy.
• Subnetting enables the network administrator to further divide the host
part of the address into two or more subnets.
• In this case, a part of the host address is reserved to identify the particular
subnet.

18
SUBNET AND SUBNET MASKING

SUBNET AND SUBNET MASKING

19
SUBNET AND SUBNET MASKING

SUBNET AND SUBNET MASKING

20
SUBNET AND SUBNET MASKING
• When a router receives a packet, it route a packet
based on network address or sub network address.
• Router uses masking process to extract the address
of network or subnetwork from IP address.

SUBNET AND SUBNET MASKING

21
SUBNET AND SUBNET MASKING

SUBNET AND SUBNET MASKING


• For example:- Let us take an IP address of 128.38.130.89 which
belongs to the network with six subnets. Then how can we
calculate the subnet mask?

• Step 1: Identify the Given Information


 IP Address: 128.38.130.89
 Class of IP Address: Since 128 falls within the range 128-191, it is a Class B address.
 Default Subnet Mask for Class B: 255.255.0.0 (/16)
 Required Subnets: 6

22
SUBNET AND SUBNET MASKING
• Step 2: Determine the Number of Bits to Borrow
• The formula to calculate the number of subnets is:
• 2n ≥ Required Subnets (where n is the number of bits to borrow from the host portion.)
• 2n ≥ 6
 22 = 4 (Not enough)
 23 = 8 (Sufficient, as it covers at least 6 subnets)

• Thus, we need to borrow 3 bits from the host portion.

SUBNET AND SUBNET MASKING


Step 3: Calculate the New Subnet Mask
• The default Class B subnet mask is 255.255.0.0, or /16 (16 network bits).

• Borrowing 3 bits from the host portion increases the network bits to 16 + 3 = 19.
• This leaves 32 - 19 = 13 bits for hosts.
• The new subnet mask becomes /19. Now, let’s convert this to dotted-decimal notation:

• A /19 mask means the first 19 bits are set to 1 in binary.


• Break it into octets (8 bits each):
• First octet: 1 in all 8 bits = 11111111 = 255
• Second octet: 1 in all 8 bits = 11111111 = 255
• Third octet: 1 in first 3 bits = 11100000 = 224 (128 + 64 + 32 = 224)
• Fourth octet: No 1 in any bit so put 0 = 00000000 = 0

• So, the subnet mask is 255. 255. 224. 0

23
SUBNET AND SUBNET MASKING
Step 4: Verify the Subnetting and Subnet Ranges
• The increment for subnets is determined by: 256−224=32

• This means the subnet blocks will be:

 128.38.0.0 – 128.38.31. 255

 128.38.32. 0 – 128.38.63. 255

 128.38.64. 0 – 128.38.95. 255

 128.38.96. 0 – 128.38.127. 255

 128.38.128. 0 – 128.38.159. 255

 128.38.160. 0 – 128.38.191. 255

• Since 128.38.130.89 falls within the 128.38.128.0 – 128.38.159.255 subnet, the subnetting is valid. The network
address for this subnet is 128.38.128.0, and the broadcast address is 128.38.159.255.

SUBNET AND SUBNET MASKING


• Step 5: Number of Hosts per Subnet
• With a /19 mask, 13 bits remain for hosts.
• Number of addresses per subnet = 2^13 – 2 = 8190.
• Usable hosts = 8190 hosts per subnet.

Final Answer
• The subnet mask for a network with the IP address 128.38.130.89 divided
into six subnets is 255.255.224.0 (or /19).

24
Reserved IP Addresses:
• There are a few reserved IPv4 address spaces which cannot be
used on the internet. These addresses serve special purpose and
cannot be routed outside the Local Area Network.
• Classification of Reserved IP Addresses are:
• Private IP Addresses
• Link-local Addresses or Automatic Private IP Addressing
• Special IP Addresses

Private IP Addresses

25
Private IP Addresses
• Within each network class, there are designated IP address that is
reserved specifically for private/internal use only.
• This IP address cannot be used on Internet-facing devices as that are
non-routable. For example, web servers and FTP servers must use
non-private IP addresses.
• However, within your own home or business network, private IP
addresses are assigned to your devices (such as workstations, printers,
and file servers).
• Class A Private Range: 10.0.0.0 to 10.255.255.255 (Subnet Mask: 255.0.0.0)
• Class B Private Range: 172.16.0.0 to 172.31.255.255 (Subnet Mask: 255.240.0.0)
• Class C Private Range: 192.168.0.0 to 192.168.255.255 (Subnet Mask: 255.255.0.0)

Link-local Addresses or Automatic


Private IP Addressing
• Class B Private APIPA Range: 169.254.0.0 to 169.254.255.255

• Automatic Private IP Addressing (APIPA) is a feature with Microsoft


Windows-based computers to automatically assign itself an IP address
within this range if a Dynamic Host Configuration Protocol (DHCP) server
is not available on the network. A DHCP server is a network device that is
responsible for assigning IP addresses to devices on the network.

• At your home, your Internet modem or router likely provides this


functionality. In your work place, a Microsoft Windows Server, a network
firewall, or some other specialized network device likely provides this
functionality for the computer at your work environment.

26
Special IP Addresses
• IP Range: 127.0.0.1 to 127.255.255.255 are network testing
addresses (also referred to as loop-back addresses).
• These are virtual IP address, in that they cannot be assigned to a
device. Specifically, the IP 127.0.0.1 is often used to troubleshoot
network connectivity issues using the ping command.
• Specifically, it tests a computer's TCP/IP network software driver
to ensure it is working properly.

IP PROTOCOL VERSION 6
• Internet Protocol version 6 (IPv6) is the most recent version of the
Internet Protocol (IP), the communications protocol that provides
an identification and location system for computers on networks
and routes traffic across the Internet.
• IPv6 was developed by the Internet Engineering Task Force
(IETF) to deal with the long-anticipated problem of IPv4 address
exhaustion.
• IPv6 or Internet Protocol Version 6 is a network layer protocol that
allows communication to take place over the network. IPv6 was
designed by Internet Engineering Task Force (IETF) in December
1998 with the purpose of superseding the IPv4 due to the global
exponentially growing internet users.

27
IP PROTOCOL VERSION 6
• Initially, it was assumed it would never run out of addresses but
the present situation paves a new way to IPv6, let’s see why? An
IPv6 address consists of eight groups of four hexadecimal digits.
Here’s an example IPv6 address:
3001:0da8:75a3:0000:0000:8a2e:0370:7334
• This new IP address version is being deployed to fulfil the need
for more Internet addresses. It was aimed to resolve issues
which are associated with IPv4. With 128-bit address space, it
allows 340 undecillion unique address space. IPv6 also called
IPng (Internet Protocol next generation).

IP PROTOCOL VERSION 6

28
CHARACTERISTICS IP PROTOCOL VERSION 6
• Larger Address Space
• Simplified Header
• End-to-end Connectivity
• Auto-configuration
• Faster Forwarding/Routing
• IPSec
• No Broadcast
• Anycast Support
• Mobility
• Enhanced Priority Support
• Smooth Transition
• Extensibility

Advantages of IPv6
• High Reliability
• Faster Speeds: IPv6 supports multicast rather than broadcast in
IPv4.This feature allows bandwidth-intensive packet flows (like
multimedia streams) to be sent to multiple destinations all at once.
• Stronger Security: IPSecurity, which provides confidentiality, and data
integrity, is embedded into IPv6.
• Routing efficiency
• Most importantly it’s the final solution for growing nodes in Global-
network.

29
Disadvantages of IPv6
• Conversion: Due to widespread present usage of IPv4 it will take a
long period to completely shift to IPv6.
• Communication: IPv4 and IPv6 machines cannot communicate
directly with each other. They need an intermediate technology to
make that possible.

Compression of IPv6 address


• IPv6 address is short form of IP address version 6. It is basically a 128 bit
address. In IPv6 address, hexadecimal notation is preferred. There are
total 8 fields in IPv6 hexadecimal notation and each field consists of 16
bits.
• Hence, total bits are 8 x 16 = 128
• Rules for compression: There are basically three rules for compression:
• Rule-1: When only 0 (zero) is available in a field then it is removed from
the IPv6 address notation.
IPv6 = FE82:1234:0:1235:1416:1A12:1B12:1C1F
After compression,
IPv6 = FE82:1234::1235:1416:1A12:1B12:1C1F

30
Compression of IPv6 address
• Rule-2: When continuous 0s (zeros) are available in IPv6 address
notation then all zeros are replaced by ::.
IPv6 = FE82:0:0:0:0:1A12:1234:1A12
After compression,
IPv6 = FE82::1A12:1234:1A12
• Rule-3: When zeros are present in discontinuous places then at only
one junction, 0s (zeros) are replaced by ::.
IPv6 = 2001:1234:0:0:1A12:0:0:1A13
After compression,
IPv6 = 2001:1234::1A12:0:0:1A13 or 2001:1234:0:0:1A12::1A13

Compression of IPv6 address


• Dual IPV6 Address:
• An IPv6 (Dual) address combines an IPv6 and an IPv4 address and has the
following format: y : y : y : y : y : y : x . x . x . x The IPv6 portion of the
address (indicated with y's) is always at the beginning, followed by the IPv4
portion (indicated with x's).
• In the IPv6 portion of the address, y is called a segment and can be any
hexadecimal value between 0 and FFFF. The segments are separated by colons -
not periods. The IPv6 portion of the address must have six segments but there is
a short form notation for segments that are zero.
• In the IPv4 portion of the address x is called an octet and must be a decimal
value between 0 and 255. The octets are separated by periods. The IPv4 portion
of the address must contain three periods and four octets.

31
Compression of IPv6 address
• Dual IPV6 Address Examples:
• The following list shows examples of valid IPv6 (Dual) addresses:

• 2001 : db8: 3333 : 4444 : 5555 : 6666 : 1 . 2 . 3 . 4

• : : 11 . 22 . 33 . 44 (implies all six IPv6 segments are zero)

• 2001 : db8: : 123 . 123 . 123 . 123 (implies that the last four IPv6 segments are zero)

• : : 1234 : 5678 : 91 . 123 . 4 . 56 (implies that the first four IPv6 segments are zero)

• : : 1234 : 5678 : 1 . 2 . 3 . 4 (implies that the first four IPv6 segments are zero)

• 2001 : db8: : 1234 : 5678 : 5 . 6 . 7 . 8 (implies that the middle two IPv6 segments are zero)

Compression of IPv6 address


• Unspecified Address: When in hexadecimal notation of IPv6 all fields
are 0. It is denoted by ::.
:: = 0:0:0:0:0:0:0:0
• Loop Back Address: When in hexadecimal notation of IPv6 all fields
are 0 except the last field and last field value is 1. It is denoted by ::1.
::1 = 0:0:0:0:0:0:0:1

32
Example

• The following list shows examples of valid IPv6 (Normal) addresses:


• 2001 : db8: 3333 : 4444 : 5555 : 6666 : 7777 : 8888
• 2001 : db8 : 3333 : 4444 : CCCC : DDDD : EEEE : FFFF
• : : (implies all 8 segments are zero)
• 2001: db8: : (implies that the last six segments are zero)
• : : 1234 : 5678 (implies that the first six segments are zero)
• 2001 : db8: : 1234 : 5678 (implies that the middle four segments are zero)
• 2001:0db8:0001:0000:0000:0ab9:C0A8:0102 (This can be compressed to
eliminate leading zeros, as follows: 2001:db8:1::ab9:C0A8:102 )

Example

• The following list shows examples of valid IPv6 (Normal) addresses:


• 2001 : db8: 3333 : 4444 : 5555 : 6666 : 7777 : 8888
• 2001 : db8 : 3333 : 4444 : CCCC : DDDD : EEEE : FFFF
• : : (implies all 8 segments are zero)
• 2001: db8: : (implies that the last six segments are zero)
• : : 1234 : 5678 (implies that the first six segments are zero)
• 2001 : db8: : 1234 : 5678 (implies that the middle four segments are zero)
• 2001:0db8:0001:0000:0000:0ab9:C0A8:0102 (This can be compressed to
eliminate leading zeros, as follows: 2001:db8:1::ab9:C0A8:102 )

33
ADRESSING MODES OF IP PROTOCOL VERSION 6
• Unicast addresses: In unicast mode of addressing, an IPv6 interface (host) is
uniquely identified in a network segment. The IPv6 packet contains both source
and destination IP addresses. A host interface is equipped with an IP address
which is unique in that network segment. When a network switch or a router
receives a unicast IP packet, destined to a single host, it sends out one of its
outgoing interface which connects to that particular host.

ADRESSING MODES OF IP PROTOCOL VERSION 6


• Multicast addresses: The IPv6 multicast mode is same as that of IPv4. The
packet destined to multiple hosts is sent on a special multicast address. All
the hosts interested in that multicast information, need to join that multicast
group first. All the interfaces that joined the group receive the multicast
packet and process it, while other hosts not interested in multicast packets
ignore the multicast information.

34
ADRESSING MODES OF IP PROTOCOL VERSION 6
• Anycast addresses: IPv6 has introduced a new type of addressing, which is
called Anycast addressing. In this addressing mode, multiple interfaces
(hosts) are assigned same Anycast IP address. When a host wishes to
communicate with a host equipped with an Anycast IP address, it sends a
Unicast message. With the help of complex routing mechanism, that Unicast
message is delivered to the host closest to the Sender in terms of Routing
cost.

ADRESSING TYPES OF IP PROTOCOL VERSION 6


• Global Unicast Address: This address type is equivalent to IPv4’s public address.
Global Unicast addresses in IPv6 are globally identifiable and uniquely addressable.
Global Routing Prefix: The most significant 48-bits are designated as Global Routing
Prefix which is assigned to specific autonomous system. The three most significant
bits of Global Routing Prefix is always set to 001.

35
ADRESSING TYPES OF IP PROTOCOL VERSION 6
• Link-Local Address: Auto-configured IPv6 address is known as Link-Local address.
This address always starts with FE80. The first 16 bits of link-local address is
always set to 1111 1110 1000 0000 (FE80). The next 48-bits are set to 0, thus:

• Link-local addresses are used for communication among IPv6 hosts on a link
(broadcast segment) only. These addresses are not routable, so a Router never
forwards these addresses outside the link.

ADRESSING TYPES OF IP PROTOCOL VERSION 6


• Unique-Local Address: This type of IPv6 address is globally unique, but it should
be used in local communication. The second half of this address contain Interface ID
and the first half is divided among Prefix, Local Bit, Global ID and Subnet ID.

• Prefix is always set to 1111 110. L bit, is set to 1 if the address is locally assigned. So
far, the meaning of L bit to 0 is not defined. Therefore, Unique Local IPv6 address
always starts with ‘FD’.

36
ADRESSING TYPES OF IP PROTOCOL VERSION 6
• Scope of IPv6 Unicast Addresses: The scope of Link-local address is limited to the
segment. Unique Local Address are locally global, but are not routed over the
Internet, limiting their scope to an organization’s boundary. Global Unicast
addresses are globally unique and recognizable. They shall make the essence of
Internet v2 addressing.

SPECIAL ADRESSES OF IP PROTOCOL VERSION 6

• As shown in the table, the address 0:0:0:0:0:0:0:0/128 does not specify anything
and is said to be an unspecified address. After simplifying, all the 0s are compacted
to ::/128.
• In IPv4, the address 0.0.0.0 with netmask 0.0.0.0 represents the default route. The
same concept is also applied to IPv6, address 0:0:0:0:0:0:0:0 with netmask all 0s
represents the default route. After applying IPv6 rule, this address is compressed to
::/0.
• Loopback addresses in IPv4 are represented by 127.0.0.1 to 127.255.255.255 series.
But in IPv6, only 0:0:0:0:0:0:0:1/128 represents the Loopback address. After
loopback address, it can be represented as ::1/128.
37
SPECIAL ADRESSES OF IP PROTOCOL VERSION 6
• IPv4-mapped address: Like the loopback address, IPv4-mapped addresses are
only used for internal representation on a host. They allow developers to use one
API for both IPv4 and IPv6 calls. The syntax of IPv4-mapped addresses looks like
this: ::FFFF:w.x.y.z, where "w.x.y.z" is the IPv4 address that is represented in the
IPv6 address.

• IPv6 multicast addresses: Like in IPv4, IPv6 multicast addresses are used to send
the same data to multiple hosts simultaneously. Since multicast-capable software,
such as OS imaging tools, typically do all the IP configuration, Windows admins
usually are not bothered with the networking details. But if you ever stumble across
an IPv6 address that begins with FF, you know what you are dealing with.

SPECIAL ADRESSES OF IP PROTOCOL VERSION 6


• Solicited-node address : A special type of multicast address are the solicited-node
addresses, which have the prefix FF02::1:FF00:0/104. Solicited-node addresses are
used for neighbor discovery, If a host needs to know the MAC address that belongs
to a certain IP address, it won't use an ARP broadcast like in IPv4. Instead, it would
use multicast to contact only those hosts that listen to the solicited-node addresses
where the last 24 bits are identical to the ones in the IP address that has to be
resolved.

38
Difference between IPv4 and IPv6
CRITERIA IPV4 IPV6
Address length IPv4 is a 32-bit address. IPv6 is a 128-bit address.
Fields IPv4 is a numeric address that consists of 4 IPv6 is an alphanumeric address that
fields which are separated by dot (.). consists of 8 fields, which are separated by
colon.
Classes IPv4 has 5 different classes of IP address IPv6 does not contain classes of IP
that includes Class A, Class B, Class C, Class addresses.
D, and Class E.

Number of IP address IPv4 has a limited number of IP addresses. IPv6 has a large number of IP addresses.
VLSM It supports VLSM (Virtual Length Subnet It does not support VLSM.
Mask). Here, VLSM means that Ipv4
converts IP addresses into a subnet of
different sizes.
Address configuration It supports manual and DHCP It supports manual, DHCP, auto-
configuration. configuration, and renumbering.
Address space It generates 4 billion unique addresses It generates 340 undecillion unique
addresses.

Difference between IPv4 and IPv6


CRITERIA IPV4 IPV6
End-to-end connection In IPv4, end-to-end connection integrity In the case of IPv6, end-to-end
integrity is unachievable. connection integrity is achievable.
Security features In IPv4, security depends on the In IPv6, IPSEC is developed for security
application. This IP address is not purposes.
developed in keeping the security
feature in mind.
Address representation In IPv4, the IP address is represented in In IPv6, the representation of the IP
decimal. address in hexadecimal.

Fragmentation Fragmentation is done by the senders Fragmentation is done by the senders


and the forwarding routers. only.
Packet flow identification It does not provide any mechanism for It uses flow label field in the header for
packet flow identification. the packet flow identification.

Checksum field The checksum field is available in IPv4. The checksum field is not available in
IPv6.

39
Difference between IPv4 and IPv6
CRITERIA IPV4 IPV6
Transmission scheme IPv4 supports broadcasting. On the other hand, IPv6 supports
multicasting, which provides efficient
network operations.
Encryption and It does not provide encryption and It provides encryption and
Authentication authentication. authentication.

Number of octets It consists of 4 octets. It consists of 8 fields, and each field


contains 2 octets. Therefore, the total
number of octets in IPv6 is 16.

40

You might also like