clears an unreachable route from the routing table after the invalid timer expires
prevents regular update messages from inappropriately reinstating a route that may have gone bad
removes an unreachable route from the routing table after the flush timer expires
limits the period of time or number of hops a packet can traverse through the network before it should be discarded
used to mark the route as unreachable in a routing update that is sent to other routers
differentiated services
There may sometimes be a problem, usually temporary, that data is sent back and forth, or goes around in a loop, due to some routing error. If this happens, the data will eventually be discarded. Every time a packet is re-sent, the TTL is reduced by one; when it goes down to zero, the packet "dies".
next header
time to live
A packet will not go around networks endlessly because it has a field in the header called the TTL field. This is a number that limits the number of hops or networks a packet will be forwarded to.
The protocol field, in the IP header, identifies what kind of data is in the IP packet - the upper-layer protocol. For example, if the code is 6, that means that the data is a TCP segment.
in tcp header (32 bits) we have a field that is called options and padding that has variable in length and the header length shows the actual header size i.e size of 20 octets+size of options and padding field and in UDP we dont have any field like that and its header is fixed of 8 OCTETS (32 bits header size) refrence: WIRELESS COMMUNICATIONS AND NETWORKS by William Stallings Second Edition pg 91(see fig)
The field in the IP header used to ensure that a packet is forwarded through no more than N routers is the "Time to Live" (TTL) field. The TTL value is decremented by each router that forwards the packet, and if it reaches zero, the packet is discarded. This mechanism prevents packets from circulating indefinitely in the network due to routing errors. By setting the TTL to a specific value, a sender can effectively control the maximum number of hops a packet can take.
TTL is a value in data packet of Internet Protocol. It communicates to the network router whether or not the packet should be in the network for too long or discarded. Usually, data packets might not be transmitted to their intended destination within a stipulated period of time. The TTL value is set by a system default value which is an 8-bit binary digit field in the header of the packet. The purpose of TTL is, it would specify certain time limit in seconds, for transmitting the packet header. When the time is exhausted, the packet would be discarded. Each router receives the subtracts count, when the packet is discarded, and when it becomes zero, the router detects the discarded packets and sends a message, Internet Control Message Protocol message back to the originating host.
If a packet size exceeds the Maximum Transmission Unit (MTU) of a network link, the sender will fragment the packet into smaller pieces that fit within the MTU. Each fragment will have its own IP header with a Fragment Offset field to specify its position in the original packet. The fragments will be transmitted individually and reassembled by the receiving host before passing the complete packet to the upper layers.
To calculate the checksum of an ICMP packet, you first need to create a pseudo-header that includes the source and destination IP addresses, the protocol number (1 for ICMP), and the length of the ICMP packet. Then, concatenate this pseudo-header with the ICMP packet data. The checksum is computed by performing a bitwise one's complement sum of all 16-bit words in the combined data, followed by taking the one's complement of the final sum. Finally, the calculated checksum is inserted into the ICMP packet's checksum field.
1)Source and destination MAC Address 2)FCS Field