Chapter 4-2
Chapter 4-2
Network Layer
● HLEN (Header Length ,4 bits): Length of headeris 4 bit in 32 bit words. The minimum value
is five for a minimum header length of 20 octets
● TOS (Type-of-Service , 8 bit): The Type-of-Service field contains an 8- bit binary value
that is used to determine the priority of each packet
● Identifier (16 bits): A sequence number that, together with the source address, destination
address, and user protocol, is intended to uniquely identify a packet
• Flags(3 bits): Only two of the bits are currently defined
1. MF(More Fragments) bit
2. DF(Don't Fragment) bit
3. Future use bit
• Fragment Offset : A router may have to fragment a packet when
forwarding it from one medium to another medium that has a smaller
MTU *. When fragmentation occurs, the IPv4 packet uses the
Fragment Offset field and the MF flag in the IP header to
reconstruct the packet when it arrives at the destination host.
• TTL (Time-to-Live, 8-bit): Indicates the remaining "life" of the
packet
• The TTL value is decreased by at least one each time the packet is
processed by a router (that is, each hop). When the value becomes
zero, the router discards or drops the packet and it is removed from
the network data flow
• Protocol (8-bits): Indicates the data payload type that the packet
is carrying (TCP/UDP).
• Destination Address(32 bits): value that represents the packet
destination Network layer host address
• Source Address (32 bit): value that represents the packet source
Network layer host address
Address Depletion Problem in Internet
● 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
● IPv6 has a much larger address space; 2^128 addresses are available
Example IPv6
FDEC: 0074 : 0000 : 0000 : 0000 : BOFF : 0000 : FFFO
•To pass through this region, the packet must have an IPv4 address.
•It seems as if the IPv6 packet goes through a tunnel at one end
and emerges at the other end.
•To make it clear that the IPv4 packet is carrying an IPv6 packet as
data, the protocol value is set to 41.
Header translation
•The sender wants to use IPv6, but the receiver does not
understand IPv6.
• Metric : is a unit that help the router choose the best route among
multiple feasible routes to a destination.
• Static routing manually sets up the optimal paths between the source
and the destination computers.
• On the other hand, the dynamic routing uses dynamic protocols to
update the routing table and to find the optimal path between the
source and the destination computers.
• The static routing is suitable for very small networks and they cannot
be used in large networks.
As against this, dynamic routing is used for larger networks.
• The manual routing has no specific routing algorithm.
The dynamic routers are based on various routing algorithms like
OSPF (Open Shortest Path First), IGRP (Interior Gateway Routing
Protocol) and RIP (Routing Information Protocol).
• The static routing is the simplest way of routing the data packets
from a source to a destination in a network.
The dynamic routing uses complex algorithms for routing the data
packets.
• The static routing has the advantage that it requires minimal
memory.
Dynamic router, however, require large memory, depending on the
routing algorithms used.
• The network administrator finds out the optimal path and makes the
changes in the routing table in the case of static routing.
In the dynamic routing algorithm, the algorithm and the protocol is
responsible for routing the packets and making the changes
accordingly in the routing table.
Routing Table
• 2 types of sharing(updates)
1. Periodic
2. Triggered
• Directly connected neighbors exchange(share)
updates periodically
(on the order of several seconds 30 sec)
• Whenever table changes (called triggered
update)
Update Process
• Each update is a list of pairs: (Destination, Cost)
• Routing table will compare old routing table values with the shared
table
• Updating of routing table is based on minimum cost
Final Routing Table
LINK STATE ROUTING
Code:
For error messages, this defines the sub type of field error.
Checksum:
The checksum is calculated by the header and the data that is
used to detect the errors.
Data:
packet in this section contains the complete information of the
packet.
Destination un-reachable :
Destination unreachable is generated by the host or its inbound gateway to inform the
client that the destination is unreachable for some reason.
Parameter problem :
Whenever packets come to the router then calculated header checksum should be equal
to received header checksum then only packet is accepted by the router.
ICMP will take the source IP from the discarded packet and informs to source by sending
parameter problem message.
Time exceeded message :
When some fragments are lost in a network then the holding fragment by the router will be
dropped then ICMP will take source IP from discarded packet and informs to the source, of
discarded datagram due to time to live field reaches to zero, by sending time exceeded
message.
Redirection message :
Redirect requests data packets be sent on an alternate route. The message informs to a
host to update its routing information (to send packets on an alternate route).
THE END