Beruflich Dokumente
Kultur Dokumente
1
Lecture # 3: Layer Communication
2
Lecture #3: Layer Communication
Principle of communication
In order for data packets to travel from a source to a
destination on a network, it is important that all the devices on
the network speak the same language or protocol
3
Lecture #3: Layer Communication
Principle of communication
1. Message format: follows specific format rules for it to be
delivered and processed
2. Message size: for a long message sent from one host to
another over a network, it is necessary to break the message into
smaller pieces
3. Timing: how well a message is received and understood is
timing. Here are rules for engagement: Access methods, flow
control, response timeout
4. Encapsulation: process of taking data from one protocol and
translating it into another protocol, so the data can continue across a
network.
4
Lecture #3: Layer Communication
Principle of communication
5
Lecture #3: Layer Communication
6
Lecture #3: Layer Communication
Concept of Layers
In layered architecture of network model, whole network
process is divided into small tasks.
Each small task is then assigned to a particular layer
which works dedicatedly to process the task only. Every
layer does only specific work.
In layered communication system, one layer of a host
deals with the task done by or to be done by its peer layer at
the same level on the remote host.
The task is either initiated by layer at the lowest level or
at the top most level.
7
Lecture #3: Layer Communication
Concept of Layers: Examples of human analogy
Let us consider two friends who communicate through postal mail
The process of sending a letter to a friend would be complex if there were
no services available from the post office
Tasks involved
in sending a letter
8
Lecture #3: Layer Communication
Concept of Layers: Examples of human analogy
Let us consider airline system
How would you find the structure to describe this complex system
that has ticketing agents, baggage checkers, gate personnel, pilots,
airplanes, air traffic control, and a worldwide system for routing
airplanes?
Horizontal layering
of airline
functionality
9
Lecture #3: Layer Communication
Concept of Layers: Protocol layering
When taken together, the protocols of the various layers are called
the protocol stack
The Internet protocol (IP) stack consists of five layers: the physical,
link, network, transport, and application layers
The Open Systems Interconnection (OSI) model consists of seven
layers
10
Lecture #3: Layer Communication
Concept of Layers: Protocol layering
11
Lecture #3: Layer Communication
Seven-layers/OSI Model
• It breaks network
communication into smaller,
more manageable parts
• It standardizes network
components to allow multiple
vendor development and support
• It allows different types of
network hardware and software
to communicate with each other
• It prevents changes in one layer from affecting other layers
• It divides network communication into smaller parts to make
learning it easier to understand
12
Lecture #3: Layer Communication
Peer-to-Peer communication
In order for data to travel from the source to the destination,
each layer at the source must communicate with its peer layer at
the destination. This is referred to as peer-to-peer
communication
Data packets on a network originate at a source and then travel
to a destination
During this process, the protocols of each layer exchange
information, called protocol data units (PDUs).
The lower layer uses encapsulation to put the PDU from the
upper layer into its data field.
Then it adds whatever headers and trailers the layer needs to
perform its function
13
Lecture #3: Layer Communication
Data encapsulation
Encapsulation:
Data > segment > packet > frame > bits
De-encapsulation:
Bits > frame > packet > segment > data
14
Lecture #3: Layer Communication
OSI Model
• Data Encapsulation
15
Lecture #3: Layer Communication
Data encapsulation
• Example:
Perform the following five conversion
steps in order to encapsulate the data.
1. Build the data
2. Package the data for end-to-end
transport.
3. Add the network IP address to the
header.
4. Add the data link layer header and
trailer.
5. Convert to bits for transmission.
16
Lecture #3: Layer Communication
A five-layer network
17
Lecture #3: Layer Communication
Interaction between layers
Each interface
defines the
information
and services a
layer must
provide for the
layer above it.
18
Lecture #3: Layer Communication
How data is referred:
19
Lecture #3: Layer Communication
OSI Model
OSI Model:
Physical layer
The data link layer is responsible for moving frames from one hop
(node) to the next
24
Lecture #3: Layer Communication
32
Lecture #3: Layer Communication
OSI Model: Application layer
35
Lecture #3: Layer Communication
OSI Model: Summary of OSI layers
37
Lecture #3: Layer Communication
OSI Model: How data moves through OSI model
38
Lecture #3: Layer Communication
39
Lecture #3: Layer Communication
TCP/IP Model
40
Lecture #3: Layer Communication
TCP/IP Model
41
Lecture #3: Layer Communication
42
Lecture #3: Layer Communication
TCP/IP Model: Application layer
TCP/IP protocol suite combines all application related issues
into one layer.
TCP/IP has protocols to support file transfer, e-mail, and
remote login, in addition to the following:
File Transfer Protocol (FTP): reliable, connection oriented
service that uses TCP to transfer files between systems. It
supports bi-directional binary file and ASCII file transfers
Trivial File Transfer Protocol (TFTP): a connectionless
service that uses the User Datagram Protocol (UDP). TFTP is
used on the router to transfer configuration files and it is useful
in some LANs because it operates faster than FTP in a stable
environment
43
Lecture #3: Layer Communication
TCP/IP Model: Application layer
45
Lecture #3: Layer Communication
TCP/IP Model: Transport layer
TCP uses only a single type of protocol data unit, called a TCP
segment
Because one header must serve to perform all protocol
mechanisms, it is rather large, with a minimum length of 20 octets 48
Lecture #3: Layer Communication
TCP/IP Model: Transport layer
TCP segment:
Source port: Number of the port that sends data
Destination port: Number of the port that receives data
Sequence number: Number used to ensure that the data
arrives in the correct order
Acknowledgment number: Next expected TCP octet
HLEN: Number of 32-bit words in the header
Reserved: Set to zero
Code bits: Control functions, such as setup and
termination of a session
Window : Number of octets that the sender will accept
49
Lecture #3: Layer Communication
TCP/IP Model: Transport layer
TCP segment:
Checksum: Calculated checksum of the header and data
fields
Urgent pointer: Indicates the end of the urgent data
Option: One option currently defined, maximum TCP
segment size
Data: Upper-layer protocol data
Code Bits or Flags (6 bits)
• URG: Urgent pointer field significant.
• ACK: Acknowledgment field significant.
• PSH: Push function.
• RST: Reset the connection.
• SYN: Synchronize the sequence numbers.
• FIN: No more data from sender 50
Lecture #3: Layer Communication
TCP/IP Model: Transport layer
UDP:User Datagram Protocol
UDP is the connectionless transport protocol in the TCP/IP
protocol stack
UDP is a simple protocol that exchanges datagrams without
guaranteed delivery.
It relies on higher-layer protocols to handle errors and
retransmit data
The following protocols use UDP: TFTP, SNMP, DHCP, DNS
UDP datagram:
51
Lecture #3: Layer Communication
TCP/IP Model: Transport layer
52
Lecture #3: Layer Communication
TCP/IP Model: Transport layer: TCP vs UDP
TCP UDP
connection-oriented, reliable (virtual connectionless, unreliable, does not
circuit) check message delivery
Divides outgoing messages into sends “datagrams”
segments
reassembles messages at the does not reassemble incoming
destination messages
re-sends anything not received Does-not acknowledge.
provides flow control provides no flow control
more overhead than UDP (less low overhead - faster than TCP
efficient)
Examples:HTTP, NFS, SMTP Eg. VOIP,DNS,TFTP 53
Lecture #3: Layer Communication
TCP/IP Model: Internet layer
54
Lecture #3: Layer Communication
TCP/IP Model: Internet layer
57
Lecture #3: Layer Communication
• Example of Data Encapsulation TCP/IP model:
M: message, H: header 58
Lecture #3: Layer Communication
Review questions
59
Lecture #3: Layer Communication
Review questions
60