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

Module - 3 - Internet Protocol - Part 2

IPv4 is the main internet protocol and uses a connectionless datagram approach for switching at the network layer. It packetizes, forwards, and delivers packets while relying on higher-level protocols for reliability. IPv4 uses protocols like ICMP, IGMP, and ARP to handle errors, multicasting, and mapping between network and link layer addresses. It is an unreliable protocol and packets may be corrupted, lost, or delayed, requiring the use of TCP for reliability in many cases.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Module - 3 - Internet Protocol - Part 2

IPv4 is the main internet protocol and uses a connectionless datagram approach for switching at the network layer. It packetizes, forwards, and delivers packets while relying on higher-level protocols for reliability. IPv4 uses protocols like ICMP, IGMP, and ARP to handle errors, multicasting, and mapping between network and link layer addresses. It is an unreliable protocol and packets may be corrupted, lost, or delayed, requiring the use of TCP for reliability in many cases.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 52

1

Internet Protocol

IPV4 – Internet Protocol Version 4


1 Main protocol & 3 Auxiliary protocols
19-
Internet Protocol (IP) 2
 Switching at the network layer in the Internet uses the datagram approach
 Communication at the network layer in the Internet is connectionless
 Position of IPv4 in TCP/IP protocol suite
19-
Internet Protocol version 4 (IPv4), 3

Internet Protocol version 4 (IPv4), is responsible for packetizing,


forwarding, and delivery of a packet at the network layer.

The Internet Control Message Protocol version 4 (ICMPv4) helps IPv4 to


handle some errors that may occur in the network-layer delivery.

The Internet Group Management Protocol (IGMP) is used to help IPv4 in


multicasting.

The Address Resolution Protocol (ARP) is used to glue the network and
data-link layers in mapping network-layer addresses to link-layer
addresses.
19-
IPV4 4

Connectionless and Unreliable datagram protocol

May be corrupted, lost, arrive out of order, or delayed, and may


create congestion for the network.

If reliability is important, IPv4 must be paired with a reliable


transport-layer protocol such as TCP.

IPv4 relies on a higher-level protocol to take care of all these


problems.
19-
IPv4 Datagram 5
19-
IPv4 Header 6
 Version: IPv4
 Service type or differentiated services

• Precedence: never used


• TOS
Default TOS for Applications 7
19-
IPv4 Header 8
 Total length: Length of data = total length – header length
 Maximum 65535 (216 – 1) bytes
 Encapsulation of a small datagram in an Ethernet frame

• Identification: used in fragmentation


• Flag : used in fragmentation
• Fragmentation offset
• Time to live
• Checksum
• Source and destination address
Fragmentation : Maximum Transfer Unit (MTU) 19-
9
 Maximum length of the IPv4 datagram: 65,535 bytes
19-
Field related to fragmentation 10
 Identification: identifies a datagram originating form the source host

 Flags: the first bit (reserved), the second bit (do not fragment bit),
the third bit (more fragment bit).
 Fragmentation offset: (13 bits cannot represent a sequence of bytes
greater than 8191
19-
Detailed Fragmentation Example 11
19-
Detailed Fragmentation Example 12
19-
Checksum 13
19-
Options 14
 IPv4 header is made of two part: a fixed part and a variable part
 Fixed part: 20 bytes long
 Variable part comprises the options that can be a maximum of 40 bytes
15
Security issues in IPv4

There are three security issues that are particularly


applicable to the IP protocol:
 Packet sniffing
 Packet modification and
 IP spoofing
16
Security of IPV4 Datagram: IPSec

IPSec provides the following four services:


 Defining Algorithms and Keys
 Packet Encryption
 Data Integrity
 Origin Authentication
IPv6 ADDRESSING 17
 Representation

Abbreviation

Mixed Notation
We can use the colon hex notation for the leftmost six sections and four-byte
dotted-decimal notation instead of the rightmost two sections. However, this
happens when all or most of the leftmost sections of the IPv6 address are 0s. For
example, the address (::130.24.24.18) is a legitimate address in IPv6, in which the
zero compression shows that all 96 leftmost bits of the address are zeros.
Address Space 18
 The address space of IPv6 contains 2128 addresses. This address space is 296
times the IPv4 address—definitely no address depletion—as shown, the size of
the space is

Three Address Types:


 Unicast Address

 Anycast Address
 Multicast Address
Address Space Allocation 19

IPv6 is divided into several blocks of varying size and each block is allocated for a
special purpose. Most of the blocks are still unassigned and have been set aside for future
use.
Global Unicast Addresses 20
 The block in the address space that is used for unicast (one-to-one)
communication between two hosts in the Internet is called the global unicast
address block. CIDR for the block is 2000::/3, which means that the three leftmost
bits are the same for all addresses in this block (001).

 The size of this block is 2125 bits, which is more than enough for Internet
expansion for many years to come. An address in this block is divided into three
parts: global routing prefix (n bits), subnet identifier (m bits), and interface
identifier (q bits),
Global Unicast Addresses 21
22
Mapping EUI-64 23
Autoconfiguration 24
 When a host in IPv6 joins a network, it can configure itself using the following process:
 1. The host first creates a link local address for itself. This is done by taking the 10-bit link local prefix
(1111 1110 10), adding 54 zeros, and adding the 64-bit interface identifier, which any host knows how
to generate from its interface card. The result is a 128-bit link local address.

 The host then tests to see if this link local address is unique and not used by other hosts. Since the 64-
bit interface identifier is supposed to be unique, the link local address generated is unique with a high
probability. However, to be sure, the host sends a neighbor solicitation message (see Chapter 28) and
waits for a neighbor advertisement message. If any host in the subnet is using this link local address,
the process fails and the host cannot autoconfigure itself; it needs to use other means such as DHCP for
this purpose
Autoconfiguration 25

 If the uniqueness of the link local address is passed, the host stores this address as its link
local address (for private communication), but it still needs a global unicast address. The
host then sends a router solicitation message to a local router. If there is a router running
on the network, the host receives a router advertisement message that includes the global
unicast prefix and the subnet prefix that the host needs to add to its interface identifier to
generate its global unicast address. If the router cannot help the host with the
configuration, it informs the host in the router advertisement message (by setting a flag).
The host then needs to use other means for configuration.
Renumbering 26
 renumbering of the address prefix (n) was built into IPv6 addressing.
 If the site changes the provider, the address prefix needs to be changed. A router to
which the site is connected can advertise a new prefix and let the site use the old prefix
for a short time before disabling it. In other words, during the transition period, a site
has two prefixes.
 The main problem in using the renumbering mechanism is the support of the DNS,
which needs to propagate the new addressing associated with a domain name.
THE IPv6 PROTOCOL 27
 The following shows other changes implemented in the protocol in addition to changing address size and format.
 Better header format
 New options
 Allowance for extension.
 Support for resource allocation.
 Support for more security.
Packet Format 28
Version
Traffic class
Flow label
Payload Length
Next Header
Hop Limit
Source & Destination
Address
Payload
Extension Header 29
Unicast Routing 30

Internet needs routing protocols to update the forwarding tables for the
smooth datagram delivery.
 One-to-one delivery is called unicast routing.
 One-to-many delivery is called multicast routing.

Unicast routing –
A packet is routed, hop by hop, from its source to its
destination by the help of forwarding tables.
Least-Cost Routing 31
Properties of Least-Cost Routing 32

The least-cost trees for a weighted graph can have several properties if
they are created using consistent criteria.

1. The least-cost route from X to Y in X’s tree is the inverse of the least-
cost route from Y to X in Y’s tree; the cost in both directions is the
same.

2. Instead of travelling from X to Z using X’s tree, we can travel from X to


Y using X’s tree and continue from Y to Z using Y’s tree.
Least-Cost Routing 33
34

Root of the tree: A


Root of the tree: B Root of the tree: C
35

Root of the tree: D Root of the tree: E


36

Root of the tree: F

Root of the tree: G


Routing Algorithms 37

The common algorithms are


Distance-Vector Routing Algorithm
Link-State Routing Algorithm
Path-Vector Routing Algorithm
Distance-Vector Routing 38

In distance-vector routing, each node creates is its own


least-cost tree from immediate neighbors with a help of
Bellman-Ford equation.
Bellman-Ford equation 39

Dxy = min {(cxa + Day), (cxb + Dby), (cxc + Dcy)…}


Bellman-Ford equation 40

Dxy = min {Dxy, (cxz + Dzy)}


Concept of Distance Vector 41

Tree for node A Distance Vector for Node A


42
Updating Distance vector 43
Distance Vector Routing Algorithm
1 Distance_Vector_Routing ( ) 44
2 {
3 // Initialize (create initial vectors for the node)
4 D[myself] = 0
5 for (y = 1 to N)
6 {
7 if (y is a neighbor)
8 D[y] = c[myself ][y]
9 else
10 D[y] = ∞
11 }
12 send vector {D [1], D [2]… D [N]} to all neighbors
13 // Update (improve the vector with the vector received from a neighbor)
14 repeat (forever)
15 {
16 wait (for a vector Dw from a neighbor w or any change in the link)
17 for (y = 1 to N)
18 {
19 D[y] = min [D[y], (c[myself ][w] + Dw[y ])] // Bellman-Ford equation
20 }
21 if (any change in the vector)
22 send vector {D [1], D [2]…, D [N]} to all neighbors
23 }
24 } // End of Distance Vector
45
1 Distance_Vector_Routing ( )
2 {
3 // Initialize (create initial vectors for the node)
4 D[myself] = 0
5 for (y = 1 to N)
6 {
7 if (y is a neighbor)
8 D[y] = c[myself ][y]
9 else
10 D[y] = ∞
11 }
46
12 send vector {D [1], D [2]… D [N]} to all neighbors
13 // Update (improve the vector with the vector received from a neighbor)
14 repeat (forever)
15 {
16 wait (for a vector Dw from a neighbor w or any change in the link)
17 for (y = 1 to N)
18 {
19 D[y] = min [D[y], (c[myself ][w] + Dw[y ])] // Bellman-Ford equation
20 }
21 if (any change in the vector)
22 send vector {D [1], D [2]…, D [N]} to all neighbors
23 }
47
48
49
50
51
52

You might also like