Вы находитесь на странице: 1из 60

UNIVERSITY OF RWANDA

College of Science and Technology

Module ETE 4163 :


Computer Networks

Lecture # 3: Layer Communications

1
Lecture # 3: Layer Communication

 Network engineering is a complicated task, which


involves software, chip level engineering, hardware,
electric pulses, etc.

 To reduce the design complexity, the whole networking


concept is divided into multiple layers.

 Layers share data between them and they depend on each


other only to take input and send output.

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. Encoding: process of putting a sequence of characters


(letters, numbers, punctuation, and certain symbols) into a
specialized format for efficient transmission or storage

6. Standard message pattern: a network-oriented


architectural pattern which describes how two different
parts of a message passing system connect and
communicate with each other

5
Lecture #3: Layer Communication

Principle of communication: A human protocol and a computer


network protocol

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

The Open Systems Interconnection (OSI) model has been


created by International Standards Organization (ISO)

 OSI was created as a framework and reference model to


explain how different networking technologies work together
and interact

The TCP/IP (Transmission control protocol/Internet protocol)


suite is the commercial architecture because it was used and
tested extensively in the Internet

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

The process of moving data


between layers of the OSI Model

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

• Layers, protocols, and interfaces


• The entities comprising the
corresponding layers on different
machines are called peers.

• The peers may software


processes, hardware devices,
or even human beings, and by
using the protocol to talk to
each other

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

 The seven layers can be thought of as belonging to three subgroups.


 Layers 1, 2, and 3 (physical, data link, and network) are the
network support layers:
 they deal with the physical aspects of moving data from one
device to another (such as electrical specifications, physical
connections, physical addressing, and transport timing and
reliability)
 Layers 5, 6, and 7 (session, presentation, and application) are the
user support layers:
 they allow interoperability among unrelated software systems
 Layer 4 (transport layer):
 links the two subgroups and ensures that what the lower layers
have transmitted is in a form that the upper layers can use.
20
Lecture #3: Layer Communication

OSI Model:
Physical layer

 Deals with all aspects of physically moving data from one


hop (computer/device/node) to the next
 Converts data from the upper layers into 1s and 0s for
transmission over media
 Defines how data is encoded onto the media used to
transmit the data
 Medium used to transmit data, for example, Copper, fiber
optic cable, radio frequencies
 Device example: Hub (in computer networks) and NIC
21
Lecture #3: Layer Communication
OSI Model: Physical layer

The physical layer is responsible for movements of individual bits from


one hop (node) to the next:
• Representation of bits
• Physical characteristics of interfaces and medium
• Synchronisation of bits
• Data rates , transmission mode (simplex, half-duplex, full duplex)
• Line configuration 22
Lecture #3: Layer Communication
OSI Model: Data Link layer
Responsibilities of data link layer:
 Framing: divides the stream of bits received from the network
layer into manageable data units called frames
 Physical addressing: if frames are to be distributed to different
systems on the network, the data link layer adds a header to the frame
to define the sender and/or receiver of the frame
 Flow control: imposes a flow control mechanism to avoid
overwhelming the receiver.
 Error control: adds reliability to the physical layer by adding
mechanisms to detect and retransmit damaged or lost frames. Error
control is normally achieved through a trailer added to the end of the
frame
 Access control. When two or more devices are connected to the
same link, data link layer protocols to determine which device has
control over the link at any given time. 23
Lecture #3: Layer Communication

OSI Model: Data Link layer

 The data link layer is responsible for moving frames from one hop
(node) to the next

24
Lecture #3: Layer Communication

OSI Model: Data Link layer

Device example: Switch


 Two sublayers: Logical Link Control (LLC) and the Media Access
Control (MAC)
 LLC:
 Data Link layer addressing,
 flow control,
address notification,
 error correction
MAC:
 Determines which computer has access to the network media
at any given time
 Determines where one frame ends and the next one starts,
called frame synchronization
25
Lecture #3: Layer Communication

OSI Model: Network layer

The network layer is responsible for :


 Logical addressing (such as IP addresses ) and routing of
packets over the network
 Establishing and releasing connections and paths between
two nodes on a network
 Transferring data, generating and confirming receipts, and
resetting connections

 Device example: Router


– Routing is the ability of various network devices and their
related software to move data packets from source to
destination 26
Lecture #3: Layer Communication

OSI Model: Network layer

The network layer is responsible for the delivery of


individual packets from the source host to the destination
host
27
Lecture #3: Layer Communication

OSI Model: Transport layer

 The transport layer is responsible for reliable end-to-end


transmission of messages across the network
 The functions of the transport layer are:
1) Packet sequencing for segmentation of data packets and remote
reassembly
2) Multiplexing for combining data from several sources for
transmission over one data path
3) Virtual circuits for establishing sessions between communicating
stations
4) Error handling and acknowledgments to ensure that data is
retransmitted when required
5) End-to-end flow control to ensure that the transmitting device
does not send more data than the receiving device can handle.
28
Lecture #3: Layer Communication

OSI Model: Transport layer

 May use a connection-oriented protocol such as TCP to


ensure destination received segments
 May use a connectionless protocol such as UDP to send
segments without assurance of delivery
29
Lecture #3: Layer Communication

OSI Model: Session layer


 Responsible for managing the dialog between networked
devices
 Establishes, manages, and terminates connections
 Provides duplex, half-duplex, or simplex communications
between devices
 Provides procedures for establishing checkpoints,
adjournment, termination, and restart or recovery procedures
 Synchronization: allows a process to add checkpoints, or
synchronization points, to a stream of data.
For example, if a system is sending a file of 2000 pages, it is
advisable to insert checkpoints after every 100 pages to ensure
that each 100-page unit is received and acknowledged
independently. 30
Lecture #3: Layer Communication
OSI Model: Session layer

The session layer is responsible for dialog control and


synchronization.
 The session layer is the network dialog controller. It establishes,
maintains, and synchronizes the interaction among communicating
systems. 31
Lecture #3: Layer Communication
OSI Model: Presentation layer
 Concerned with how data is presented to the network
 Handles three primary tasks:
 Translation
 Compression
 Encryption

32
Lecture #3: Layer Communication
OSI Model: Application layer

 Contains all services or protocols needed by application


software or operating system to communicate on the network
 Examples of protocols that run at the application layer
include File Transfer Protocol (FTP), Hypertext Transfer
Protocol (HTTP), telnet, and similar protocols that can be
implemented as utilities the user can interface with.
 Examples
 Firefox web browser uses HTTP (Hyper-Text Transport
Protocol)
 E-mail program may use POP3 (Post Office Protocol
version 3) to read e-mails and SMTP (Simple Mail Transport
Protocol) to send emails
33
Lecture #3: Layer Communication
OSI Model: Application layer

 XAOO (message-handling services), X.500 (directory


services), and file transfer, access, and management (FTAM).
The user in this example employs XAOO to send an e-mail
34
message.
Lecture #3: Layer Communication
OSI Model: Application layer

 File transfer, access, and management. This


application allows a user to access files in a remote host (to
make changes or read data), to retrieve files from a remote
computer for use in the local computer, and to manage or
control files in a remote computer locally
 Mail services. This application provides the basis for e-
mail forwarding and storage
 Directory services. This application provides distributed
database sources and access for global information about
various objects and services

35
Lecture #3: Layer Communication
OSI Model: Summary of OSI layers

Physical Layer: How to transmit bits.


Data Link Layer: How to transmits frames
Network: How to route packets to the node.
Transport: How to send packets to the applications.
Session: Manage connections.
Presentation: Encode/Decode messages, security.
Application: Everything else. 36
Lecture #3: Layer Communication
OSI Model: How data moves through OSI model

 Each layer of OSI Model except Physical adds its own


header to the data that originated from the operating system
– Adds own header in front of the header from the
previous layer
– Header contains information that describes what each
layer of the OSI Model should do with the data
 Data Link layer also adds a tailer
– Tailer contains additional information that deals with
error correction

37
Lecture #3: Layer Communication
OSI Model: How data moves through OSI model

38
Lecture #3: Layer Communication

OSI Model: Examples of devices and protocols on each layer

39
Lecture #3: Layer Communication
TCP/IP Model

The major design goals of this model were:

1. To connect multiple networks together so that they


appear as a single network
2. To survive after partial subnet hardware failures
3. To provide a flexible architecture.

40
Lecture #3: Layer Communication
TCP/IP Model

Layers with same names as OSI Model don’t function


exactly the same

41
Lecture #3: Layer Communication

TCP/IP Model: Application layer

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

 Network File System (NFS): is a distributed file system


protocol suite developed by Sun Microsystems that allows file
access to a remote storage device such as a hard disk across a
network
 Simple Mail Transfer Protocol (SMTP) : administers the
transmission of e-mail over computer networks. It does not
provide support for transmission of data other than plain text
 Telnet: provides the capability to remotely access another
computer. It enables a user to log into an Internet host and
execute commands.
A Telnet client is referred to as a local host.
A Telnet server is referred to as a remote host.
44
.
Lecture #3: Layer Communication
TCP/IP Model: Application layer

 Simple Network Management Protocol (SNMP):


protocol that provides a way to monitor and control
network devices. SNMP is also used to manage
configurations, statistics, performance, and
Security
 Domain Name System (DNS): DNS is a system used on
the Internet to translate domain names and publicly
advertised network nodes into IP addresses.

45
Lecture #3: Layer Communication
TCP/IP Model: Transport layer

 Provides a logical connection (end-to-end control and


reliability) between a source host and a destination host.
Transport protocols segment and reassemble data sent by
upper-layer applications into the same data stream, or logical
connection, between end points.
 creates packet from bytes stream received from the
application layer
 uses port number to create process to process
communication
 uses a sliding window protocol to achieve flow control
 uses acknowledgement packet, timeout and
retransmission to achieve error control
46
Lecture #3: Layer Communication
TCP/IP Model: Transport layer

 Transport layer protocols include TCP and UDP


 TCP is a connection-oriented transport layer protocol that
provides reliable full-duplex data transmission
 In a connection-oriented environment, a connection is
established between both ends before the transfer of
information can begin
 TCP breaks messages into segments, reassembles them at
the destination, and resends anything that is not received
TCP supplies a virtual circuit between end-user
applications
 The following protocols use TCP protocols: FTP, HTTP,
SMTP, Telnet. 47
Lecture #3: Layer Communication
TCP/IP Model: Transport layer

 TCP Header format

 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

UDP:User Datagram Protocol

The following are the definitions of the fields in the UDP


segment:
 Source port: Number of the port that sends data
 Destination port: Number of the port that receives data
 Length: Number of bytes in header and data
 Checksum: Calculated checksum of the header and data
fields
 Data: Upper-layer protocol data

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

Performs same functions as OSI Model Network Layer


 The purpose of the Internet layer is to select the best path
through the network for packets to travel
 The main protocol that functions at this layer is IP
(Internet protocol)
 IP performs the following operations:
 Defines a packet and an addressing scheme
 Transfers data between the Internet layer and network
access layer
 Routes packets to remote hosts

54
Lecture #3: Layer Communication
TCP/IP Model: Internet layer

The following protocols operate at the TCP/IP Internet


layer:
 IP provides connectionless, best-effort delivery routing of
packets. IP is not concerned with the content of the packets
but looks for a path to the destination
 Internet Control Message Protocol (ICMP) provides
control and messaging capabilities
 Address Resolution Protocol (ARP) determines the data
link layer address, or MAC address, for known IP addresses
 Reverse Address Resolution Protocol (RARP) determines
the IP address for a known MAC address
55
Lecture #3: Layer Communication
TCP/IP Model: Network Access layer
 Allows an IP packet to make a physical link to the network
media
 It includes the LAN and WAN technology details and all the
details contained in the OSI physical and data link layers
 It defines the procedures used to interface with the network
hardware and access the transmission medium
 Drivers for software applications, modem cards, and other
devices operate at the network access layer
 Modem protocol standards such as Serial Line Internet Protocol
(SLIP) and Point-to-Point Protocol (PPP) provide network access
through a modem connection
 Network access layer protocols also map IP addresses to
physical hardware addresses and encapsulate IP packets into
frames 56
Lecture #3: Layer Communication
TCP/IP Model: TCP/IP Model and its relation to Protocols
of the TCP/IP Suite

57
Lecture #3: Layer Communication
• Example of Data Encapsulation TCP/IP model:

M: message, H: header 58
Lecture #3: Layer Communication
Review questions

1) Discuss the similarities and differences for TCP/IP and


OSI model

2) With reference to chapter I of the book:


J.F. Kurose and K. W. Ross, ´´Computer Networking: A
Top-Down Approach ’’, sixth edition, Pearson, 2013
(See page 68-78)
Answer the following:
 Questions 1, 3, 4,6-9, 11-13, 16-20, 22-25,
 Problems P1-P4, P6-P10, P25-P29, P31, P34

59
Lecture #3: Layer Communication
Review questions

3) TCP uses a transition state diagram to handle sending and


receiving segments. Find out about this diagram and how it
handles flow and control

4) Group Projects: see attached file. Deadline: 22 Janauary


2019

5) Lab assignement and reports requirements, see attached


file, Deadline: 08 Janauary 2019

60

Вам также может понравиться