0% found this document useful (0 votes)
3 views4 pages

CN Notes

Uploaded by

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

CN Notes

Uploaded by

ramapriyasrk
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Computer networks

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.
Datagram
Packets in the IPv4 layer are called datagrams.

Fig:IPV4 datagram format


 Version − Version no. of Internet Protocol used (e.g. IPv4).
HLEN − Header length (HLEN). This 4-bit field defines the total length of the datagram
header in 4-byte words. This field is needed because the length of the header
 is variable (between 20 and 60 bytes).
 Service – Provides Differentiated Services Code Point; this is Type of Service.
 Total Length − Length of entire IP Packet (including IP header and IP Payload).
 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’.
 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.
 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

IPv6 datagram format


The Internet must accommodate real-time audio and video transmission. This type of transmission
requires minimum delay strategies and reservation of resources not provided in the IPv4 design.
The Internet must accommodate encryption and authentication of data for some applications. No
encryption or authentication is provided by IPv4.
To overcome these deficiencies, IPv6 (Internetworking Protocol, version 6), also known as IPng
(Internetworking Protocol, next generation), was proposed and is now a standard.
Advantages
 Larger address space. An IPv6 address is 128 bits long, Compared with the 32-bit address
of IPv4, this is a huge (296) increase in the address space.
 Better header format. IPv6 uses a new header format in which options are separated from
the base header and inserted, when needed, between the base header and the upper-layer data.
This simplifies and speeds up the routing process because most of the options do not need to
be checked by routers.
 New options. IPv6 has new options to allow for additional functionalities.
 Allowance for extension. IPv6 is designed to allow the extension of the protocol if required
by new technologies or applications.
 Support for resource allocation. In IPv6, the type-of-service field has been removed, but a
mechanism (calledjlow label) has been added to enable the source to request special handling
of the packet. This mechanism can be used to support traffic such as real-time audio and
video.
 Support for more security. The encryption and authentication options in IPv6 provide
confidentiality and integrity of the packet.

Packet Format

IPv6 datagram header and payload


.
Format of an IPv6 datagram
Version. This 4-bit field defines the version number of the IP. For IPv6, the value is 6.
Priority. The 4-bit priority field defines the priority of the packet with respect to traffic congestion.
The priority field of the IPv6 packet defines the priority of each packet with respect to other packets
from the same source. For example, if one of two consecutive datagrams must be discarded due to
congestion, the datagram with the lower packet priority will be discarded. IPv6 divides traffic into
two broad categories:

 congestion-controlled and
 noncongestion-controlled.

IPV4 Address Space


The address space of IPv4 is 232 or 4,294,967,296. The IPv4 addresses are unique and universal.

Notations
There are two prevalent notations to show an IPv4 address: binary notation and dotted decimal
notation.

Binary Notation
In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred
to as a byte. So an IPv4 address referred to as a 32-bit address or a 4-byte address. The following is an
example of an IPv4 address in binary notation:
01110101 10010101 00011101 00000010
Dotted-Decimal Notation
To make the IPv4 address more compact and easier to read, Internet addresses are usually
written in decimal form with a decimal point (dot) separating the bytes. The following
is the dotted~decimal notation of the above address:
[Link]

IPv6 ADDRESSES

The need for more addresses, in addition to other concerns about the IP layer, motivated a new design
of the IP layer called the new generation of IP or IPv6 (lP version 6). In this version, the Internet uses
128-bit addresses that give much greater flexibility in address allocation. These addresses are referred
to as IPv6 (IP version 6) addresses.

Hexadecimal Colon Notation


To make addresses more readable, IPv6 specifies hexadecimal colon notation. In this notation,128 bits
is divided into eight sections, each 2 bytes in length. Two bytes in hexadecimal notation requires four
hexadecimal digits. Therefore, the address consists of 32 hexadecimal digits, with every four digits
separated by a colon.

Figure: IPv6 address in binary and hexadecimal colon notation

You might also like