Network Technology and
Protocols – CYB 122
LAB1 :Packet Decoding
Data Encapsulation
Ethernet Frame Format
PREAMBLE: 62 bits, for synchronization = the Physical Layer Signaling (PLS) circuitry
SYNC (Synchronize): 2 bits, indicates that the data portion of the frame will follow.
DA (Destination Address) and SA (Source Address):
◦ 48 bits, Media Access Control (MAC) address. Three types of destination addressing
are supported:
◦ Individual (unicast): unique address of one node.
◦ Multicast: first bit of the DA is set a group address is being used.
◦ Broadcast: if the DA field is set to all 1’s
TYPE (Type Field):
◦ 16 bits, this field identifies the higher layer protocol
◦ Contains Value > 1500.
DATA (Data field): This contains the actual data being transmitted and is 46-1500 bytes.
FCS: 32 bits, the result of a cyclic redundancy check algorithm.
IP Packet Header
The IP datagram header consists of 20 bytes of data.
An option exists within the header, which allows further optional bytes
to be added.
IP Packet Header
Version: The field contains the IP protocol version. Version is
◦ 4 IPv4
◦ 5 is an experimental version.
◦ 6 is the version for IPv6.
IHL: IP Header Length: The length of the IP header.
◦ IHL = 5 means header length=20 bytes no Padding & no options
Type of Service: usually set to 0, otherwise Quality of ServiceQoS.
Total Length (Size of Datagram):
◦ length of the header and the data).
IP Packet Header
Identification: 16-bit number
◦ Identifies this packet - used during reassembly of fragmented datagrams.
Flags (a sequence of three flags): used to control whether a packet
is allowed to fragment or not and to indicate the last part of a packet
to the receiver.
Fragmentation Offset: This is used to aid the reassembly of the full
datagram.
TTL: Time To Live: (Number of hops/links which the packet may be
routed over.
IP Packet Header
Protocol: It indicates the type of the higher-level protocol. Examples: -
◦ 0: Reserved.
◦ 01: Internet Control Message Protocol (ICMP) ,
◦ 04: IP (IP encapsulation).
◦ 06: Transmission Control Protocol (TCP),
◦ 11: User Datagram Protocol (UDP),
Header Checksum: This field is a checksum for the information
contained in the header
IP Packet Header
Source Address: the IP address of the original sender of the packet (4 bytes).
Destination Address: the IP address of the final destination of the packet (4
bytes).
Options
◦ not normally used
◦ But when used the IP header length will be > 20 bytes.
Padding: If an option is used, the datagram is padded with all-zero.
Data: The data contained in the datagram. It is passed to the higher level
protocol specified in the protocol field.
Example
We need to get the header information
according the definitions above.
Solution
Solution
Solution
Solution
Solution
THANKS!
Best Regards!