Web Science/Part1: Foundations of the web/Internet Protocol/IP header

IP header

Learning goals

  1. get a feeling for the IP header
  2. get a better understanding of how the protocol works
  3. understand which header fields are changed while routing

Video

Script

Like the Ethernet, the Internet protocol has IP header and Data parts and is a bit stream - a sequence of 1s and 0s.
Display of the bit-stream:
Every 32 bits which are called 32-bit-word or register in a 32-bit architecture.
1) Version
Represents the version of Internet protocol. 4bits=24=16 possible values. The version can be 4 or 6 but may be another one.
2) IHL (internet header length)
Internet protocol allows this header to have flexible size but it cannot be more than 15 words=15*32=15*4=60 bytes – maximum length
3) DSCP (differentiated services code point)
Formally known as the representation of the type of a project. But it was not used too frequently so internet service providers come up with idea of putting priority of IP packages in this field
4) ECN (explicit congestion notification)
Is rarely used. But what it really does is if the part of the wire has too much traffic on it at the moment of time this can be put there in this field so then routers might be able to search for other routs to the destination network.
5) Total length
-16 bit field
-represents the binary length of the package in bytes
- up to 65536 bytes are allowed
- might not fit into Ethernet frame
So when you want to put IP packages inside the Ethernet frames and the IP packages are bigger than the Ethernet frames you might have problems. When you do routing you don’t know what kind of link layer protocols you will use. So at the beginning you use DSL or ISDN and your package might fit link layer protocol. But at some network you can use Ethernet protocol with really small frame size so package doesn’t fit anymore. Internet protocol can solve this problem using fragmentation.
6) Identification
Is used for uniquely identifying fragments of original IP datagram.
7) Flags
You specify here will can your fragment be fragmented or not.
8) Fragment Offset
When you decide that package can be fragmented happens that packages that are being fragmented become an offset. When you have several fragmented offsets what you can do is you can reassemble those packages.
9) Time to live
Is a number usually 64 and every time a router forwards the package to the next router this number is decreased by 1. Why do we need it? Let’s assume that router is misconfigured and then IP packages are always forwarded inside a circle but never arrive at the final destination. This would mean that they blow up the network really fast.
10) Protocol
Used to identify upper level protocol.
11) Header checksum
In the Ethernet you have a checksum for the entire package but here only the header is checked. The Ethernet has already checked if the data is correct but we don’t want any false information inside IP package Header. Because then the package will be routed on the wrong route and this won’t be good.
12) Source IP Address
13) Destination IP Address
14) Options (if IHL > 5)
--Jane Kruch (discusscontribs) 23:12, 2 November 2013 (UTC)

Quiz

1 You are using ethernet II with etherType 0x0800 with a maximum data payload to store a standard IPv4 package with IHL=5. How much data can you put inside one ethernet frame

As much as I want
65536 Bytes
1518 Bytes
1500 Bytes
1480 Bytes

2 An IP package has Bit number 49 set to 1 and has a data payload of 2000 Bytes. It now arrives at an Ethernet Network. What will happen?

The package is fragmented into two packages which both fit into the Ethernet frames of the network
An error message will be send to the sender (specifying the maximum allowed data size)
This will never happen since Bit 49 was set to 1.

3 An IP package has Bit number 49 set to 0 and has a data payload of 2000 Bytes. It now arrives at an Ethernet Network. What will happen?

The package is fragmented into two packages which both fit into the Ethernet frames of the network
An error message will be send to the sender (specifying the maximum allowed data size)
This will never happen since Bit 49 was set to 0.

4 What is DSCP used for?

increase the service of internet service provider
prioritize traffic
increase the profit of internet service provider

5 Which of the following becomes possible due to the use of TTL

reliability
discarding falsely routed packages
high transfer speed
finding the shortest routes

6 Which of the IP header files will change while routing?

source IP address
destination IP address
TTL
Total length

Discussion