Packet
A unit of information to transfer through the Network Switch
IP Header
Version
(4 bits)- identifies which version the IP is
0100
for IPv4 and0110
for IPv6
- identifies which version the IP is
Header Length
(4 bits)- Length of the ip header, tell you how big it is
Type of service/ Differentiate Service (TOS/ DS)
: QoS (Quality of service) — treating some packet more care than other packet- Type of service (8 bits) has two component
precedence
: set the priority for this packetTOS
throughput, delay, reliability, monetary cost
- However now it's being used as differentiate service (DS)
DSCP
: This is where you specify the code to classify the serviceECN
: Used by some router to signal support for explicit congestion notification
- Type of service (8 bits) has two component
Total Length
(16-bit): the length of the entire packet (Header + Data)- Length of
data = total_length - header_length
- Length of
Identifier
(16 - bit),Flags
,Flagment Offset
: Use to fragment a packet as a packet needs to fragment into smaller packets if the original length exceed the MTU (Maximum Transmission unit)Flags
: 3 bits field.- First bit is unused
DF (Don't Fragment)
bit: router cannot fragment the packet. If the packet exceeds the MTU (Maximum Transmission unit) and this bit turned on, it will ==drop the packet==.MF (More Fragment)
bit: Set to1
if the receiver should expect more fragment. In the last fragment sent, this will be set to0
Fragment Offset
: 13 bits field specify the offset. Since fragment does not arrive in order, this offset is to sort the fragment.TTL (Time to live)
: 8 bit field which set when the packet first received. To prevent routing loop in the network- Originally it was specified by second but then it's hard to implement so it never generally supported.
- Now this is more like expected hop count. The router simply decrement the
TTL
before passing to another router. - If this number reaches 0, router will discard this packet and send an error message to the source.
- This process prevent lost packets from wandering in the network
- This is the mechanism used in
trace
Protocol
: 8 bit field that gives the protocol number.Header Checksum
: error detection for IP header. contains 16 bits. Receiver will calculate this checksum to see if there is error. If there is no error then the result of the checksum would be1
. This checksum will be recalculated at each routerSource Address
andDestination Address
: store the originator of the packet and teh destination of the packet.Options
(optional): normally used for testing. Variable length field. Use to store additional infromation.