Upload
lj-projects
View
417
Download
0
Embed Size (px)
Citation preview
TCP/IPTCP/IP
• Why we should know this?
• Because we do not use any GUI (Wireshark)
when we are on a remote machine.
• We rely on CLI?
• A thorough and packet/bit -level knowledge
is required for packet / protocol analysis.
ANSWER THE QUESTIONS
• TCP/IP is multi-layered.
•Means - one functionality is running at one
layer and another functionality running at
another layer.
INTRODUCTION – TCP/IP
•Why this layered architecture?
• Extensible
•We can add new functionality to the layer
without having to re-implement the whole
TCP/IP stack code.
INTRODUCTION – TCP/IP
• There are two basic architectures to follow
when talking about layers.
• TCP/IP reference model
• OSI (Open Systems Interconnect) Reference
Model
INTRODUCTION – TCP/IP
INTRODUCTION – TCP/IP
• A packet originating from the source
computer traverse through the layers from top
layer to bottom.
• Each layer adds its own set of headers to the
packet.
• At the destination, the packets traverse from
bottom layer to the top layer.
HOW IT WORKS?
• At each layer, the headers are stripped out of
the packet.
• These header give the destination host all the
information needed to process the packet.
HOW IT WORKS?
OSI MODEL
9
• Sending process passes data to the
application layer.
• The application layer attaches an application
header and then passes the frame to the next
layer (presentation layer) – known as
encapsulation.
LET’S GET SOME MORE DETAILS
• The process of adding headers is repeated
from layer to layer until the frame reaches the
data link layer.
• There, in addition to a data-link header, a
data-link trailer is added.
• The data-link trailer contains a checksum and
padding if needed.
LET’S GET SOME MORE DETAILS
•Why Checksum?
• For error detection
•Why padding?
• For frame synchronization
LET’S GET SOME MORE DETAILS
HEADER PAYLOAD TRAILER
A TCP PACKET
DATA DATA
T
C
P
I
P
F
R
A
M
E
T
R
A
I
L
E
R
• PDU = Protocol Data Unit
• Information that is delivered as a unit.
• Consists of layer's Header, Trailer and Data
encapsulated.
PDU
• Process of taking one Protocol Data Unit
(PDU) and enveloping it within a set of protocol
header and trailer.
ENCAPSULATION & PDU
• Each layer may add a Header and a Trailer to
its PDU as it proceeds through the layers.
• The Headers contain information that
specifically addresses layer-to-layer
communication
ENCAPSULATION & PDU
• Packet – PDU @ Layer 3 (Network Layer)
• Frame – PDU @ Layer 2 (Data Link)
ENCAPSULATION & PDU
PACKETS VS FRAMES
19