Ip-Header
Ip-Header
option
each words is of 4 bytes, by default there are total 5words or 20 byte in IP header
S.A : source IP address
D.A : Destination IP address
V : Version 4, H.L : Header Length, TOS/DS : Type of service/Differentiated Service, T.L : Total
Length
TTL : Time To Live, Prot : Protocol
2nd word is related to fragmentation , option field is of 40 byte
1
IP Header
V : Version 4
H.L : 4 bits
max value = 15 words each word = 4 byte
Max H.L = 15 x 4 = 60 byte
By default H.L = 20 byte (5 words)
TOS/DS : used to assign priority to a packet real/non real time traffic packet
real time traffic ( on line audio / video )packet gets higher priority,
non real time traffic ( file transfer, mail transfer etc ) gets lower priority
2
IP Header
Checksum : to check error in IP header during transmission
Prot : Protocol is to tell which higher layer TCP (4)/UDP (17) will accept this packet
TTL : Time to live used to drop the packet if it goes to infinite loop.
by dropping this type of packets Internet traffic is controlled
3
Fragmentation
• If router receives a bigger packet from ( interface1)which can not be forwarded through the
(interface2)
• Router divides the packet and it is known as fragmentation
• R receives packet P size 2200 byte from interface 1 but interface 2 do not allow more than
1500 byte
• R need to divide packet P in 2 packets so that it can forward each packet from interface2
4
Fragmentation Example
p1 p3
TR Ethernet Ethernet
D
p p1 p2 p3 p21, p22 ppp p1 p21 p22 p3
R1 R2
mtu 4464 mtu 1500 mtu 1000
Packet p is IP packet it contains 4000 byte data and 20 byte IP header total 4020 byte
R1 receives p from TR interface and forward p to Ethernet interface
5
Fragmentation
P --- 4000 byte data and 20 byte IP header 4000 byte packet divided to 3 packets p1 p2 p3
IP fragmentation ---- ident x ----remain same for IP fragments p1, p2, p3 p2—p21,p22
----- 3 flag bit 1st –reserve, 2nd – do not fragment, 3rd – more fregment
------ 0 for first frag, size of 1st frag for 2nd frag, total size of 1st & 2nd frag for
3rd frag ….