chapter 7
chapter 7
NETWORK PROTOCOLS
1
Outline
• Introduction to protocols
• The OSI reference model
• TCP/IP suits
2
Introduction to Protocols
• The concepts of distributed processing and computer
networking imply that entities in different systems need
to communicate.
• We use the terms entity and system in a very general
sense.
• Examples of entities are:-
- user application programs,
- file transfer packages,
- data base management systems,
- electronic mail facilities,
3
• Examples of systems are:-
- computers
- terminals
• For two entities to successfully communicate, they must
"speak the same language.“ :-
- What is communicated,
- How it is communicated, and
- When it is communicated
• Protocol is defined as a set of rules governing the
exchange of data between two entities.
4
The key elements of a protocol are:-
• Syntax. Includes such things as data format, coding, and
signal levels.
• Semantics. Includes control information for coordination
and error handling.
• Timing. Includes speed matching and sequencing.
5
We can group protocol functions into the
following categories:
• Segmentation and reassembly
• Encapsulation
• Connection control
• Ordered delivery
• Flow control
• Error control
• Addressing/routing
6
The OSI Reference Model
• In 1978, the International Organization for
Standardization (ISO) released a set of specifications
that described network architecture for connecting
dissimilar devices.
• The OSI reference model is the best-known and most
widely used guide for visualizing networking
environments.
• The OSI reference model architecture divides network
communication into seven layers.
• Each layer covers different network activities,
equipments, or protocols.
7
Relationships among OSI
Reference Model Layers
• Each layer provides services to the next layer.
8
9
Application Protocols
• Provide application-to-application interaction and data
exchange.
Transport Protocols
• Facilitate communication sessions between computers.
• Ensure that data is able to move reliably between
computers.
Network Protocols
• Network protocols provide what are called "link
services.“
• Handle addressing and routing information, error
checking, and retransmission requests.
10
The OSI Layers
• In this section, we will discuss each of the OSI layers.
Physical Layer
• The physical layer covers the physical interface
between devices and the rules by which bits are
passed from one computer to another.
• The physical layer has four important characteristics:
1 - Mechanical. Relates to the physical properties of
the interface to a transmission medium.( e.g.,
circuits)
2 - Electrical. Relates to the representation of bits
(e.g., in terms of voltage levels) and the data
transmission rate of bits. 11
3 - Functional. Specifies the functions performed by
individual circuits of the physical interface between a
system and the transmission medium.
4 - Procedural. Specifies the sequence of events by which
bit streams are exchanged across the physical medium.
Main functions of physical layer
• It transmits the unstructured, raw bit stream over a
physical medium.
• It establishes and maintains a physical link between
communicating computers.
• It defines how the cable is attached to the NIC.
• It defines how each bit is translated into the appropriate
electrical or optical pulses for the network cable.
12
Physical Layer activities
• Connection Types
• Transmission
• Signal Types
• Modulation
• Synchronization
• Transmission Media
• Multiplexing
13
Data link layer
– Means of activating, maintaining and deactivating a
reliable link.
– Error detection and control.
– Higher layers may assume error free transmission.
14
The above figure shows a simple data frame.
• The sender ID represents the address of the computer
that is sending the information.
• The destination ID represents the address of the
computer to which the information is being sent.
• The control information is used for frame type, and
routing information.
• The cyclical redundancy check (CRC) provides error
correction and verification.
15
Data Link Protocol Functions
Acknowledgments
• An acknowledgment (ACK) is sent by a receiver to a
transmitter to indicate that a frame has been
received seemingly intact.
• A negative acknowledgment (NAK) is sent by a
receiver to a transmitter to indicate that:-
– a corrupt frame has been received, or
– a frame is missing.
16
Timers
• An important timer called T are used by Link Protocol.
• T is set by a transmitter upon transmitting a frame.
• The transmitter expects to receive an acknowledgment
frame before T expires.
Retransmission
• Data link layer’s approach to dealing with corrupted or
lost frames is to retransmit them.
17
Selective Reject, upon encountering a faulty frame, the
receiver requests the retransmission of that specific
frame.
Go-Back-N, involves the transmitter requesting the
retransmission of the faulty frame as well as all
succeeding frames.
(i.e., all frames transmitted after the faulty frame)
• The advantage of Selective Reject over Go-Back-N is
that it leads to better throughput.
18
Error Checking
• The most important role of the data link layer is
to provide error-free transmission.
• Many different error detection methods have
been devised.
• Parity checking is a simple error detection
method used with character-oriented protocols.
• One bit in every character bit sequence is
reserved for parity.
• This bit is set by the transmitter to 0 or 1.
19
• So that the total number of 1 bits in the character is
always even (in case of even parity checking) or always
odd (in case of odd parity checking).
• The receiver checks the parity bit of each character to
see if it is as expected.
Even parity error checking.
20
Network layer
• The network layer handles the routing of data packets
across the network.
• It defines the interface between a host and a network
node.
Network Layer activities
• Switching
• Circuit switching
• Packet switching
21
Packet Handling
22
Routing
24
There are three classes of routing algorithms:
• Flooding
• Static Routing
• Dynamic Routing
25
• In static routing, a fixed routing directory is used to
guide the selection of a route which remains unchanged
for the duration of the connection.
27
IP
• The Internet Protocol (IP) is a connectionless datagram protocol
developed by the US Department of Defense Advanced Research
Projects Agency (DARPA).
• IP datagrams are referred to as Internet Protocol Data Units, or
IPDUs.
28
Transport layer
• It provides mechanism for the exchange of data
between end systems.
• The connection-oriented transport service ensures that
data is delivered:-
- error-free,
- in sequence,
- with no losses and
- no duplications.
• It also provides quality of service to session entities by
specifying ; acceptable error rates, maximum delay,
priority, and security. Example: TCP
29
Session Layer
30
Presentation Layer
– Data formats and coding
– Encryption
Application Layer
• It provides services that directly support user
applications, such as software for file transfers,
database access, and e-mail.
• Means for applications to access OSI environment.
• Example: FTP, HTTP, SMTP
31
1- HTTP
• Hypertext Transfer Protocol (HTTP) works with the
World Wide Web.
• A Web browser is a client-server application.
• Hyperlinks make the World Wide Web easy to navigate.
• A hyperlink is an object, word, phrase, or picture, on a
Web page.
• The Web page contains an address location known as a
Uniform Resource Locator (URL).
• Usually, the format of an URL. Consists of four parts:
protocol, server (or domain), path, and filename.
32
• Example:
• In the URL :http: //www.xyz.Com.tutor/start/main.htm
• The structure of this URL
• Protocol: http:// tells the browser which protocol to
use.
• The second part, "www", is the hostname or name of a
specific machine with a specific IP address of the Web
server using DNS.
• Domain (SERVER) name: xyz
• Domain type: COM
• Path: tutor/Start/
• File name: main. Htm
33
2 -FTP
FTP is a reliable, connection-oriented service.
It uses TCP to transfer files between systems that
support FTP.
The main function of FTP is to transfer files from one
computer to another by copying and moving.
When files are copied from a server: -
• FTP first establishes a control connection between the
client and the server.
• Then a second connection is established, which is a
link between the computers through which the data is
transferred.
34
35
3- TFTP is a connectionless service.
• It uses User Datagram Protocol (UDP).
• TFTP is used on the router to transfer configuration files.
4- SMTP
• Within the Internet, email is delivered by having the
source machine establish a TCP connection to port 25 of
the destination machine.
• Listening to this port is an email daemon that "speaks"
SMTP.
• This daemon accepts incoming connections and copies
messages from them into the appropriate mailboxes.
• Email servers communicate with each other using the
Simple Mail Transfer Protocol (SMTP) to send and receive
mail. 36
Data Packets and the OSI Reference Model
37
• Packet assembly and disassembly process
38
Packet Assembly/Encapsulation
39
• Disassembly/Decapsulation process in the OSI model
40
The IEEE 802.x Standard
• The bottom two layers of the OSI reference model
pertain to hardware: the NIC and the network cabling.
• The Institute of Electrical and Electronics Engineers (IEEE)
has developed enhancements specific to different NICs
and cabling.
• Collectively, these refinements are known as the 802
project.
• The 802 specifications set standards for:
- Network interface cards (NICs).
- Wide area network (WAN) components.
- Components used to create twisted-pair and
coaxial cable networks. 41
Enhancements to the OSI Reference Model
The 802 standards committee divided the data-link layer into two
sub layers:
• Logical Link Control (LLC) Establishing and terminating links,
controlling frame traffic, sequencing frames, and acknowledging
frames
• Media Access Control (MAC) Managing media access, delimiting
frames, checking frame errors, and recognizing frame addresses.
42
Logical Link Control (LLC) Sublayer
• The LLC sub layer manages:
- data-link communication and
- defines the use of logical interface points called
service access points (SAP).
• Other computers can refer to and use SAPs to transfer
information from the LLC sub layer to the upper OSI
layers.
Media Access Control (MAC) Sub layer
• The MAC sub layer is the lower of the two sub layers.
• It provides shared access to the physical layer for the
computers' NICs.
43
• It communicates directly with the NIC.
• It is responsible for delivering error-free data between
two computers on the network.
44
Presentation and session with CORBA
45
46
TCP/IP Layer
• It is known as Internet Protocol Suite.
• Developed by DARPA (Defense Advance Research
Projects Agency).
– To interconnect various Defense Department
computer networks.
• The five layers of TCP/IP (top to bottom) which govern
today’s means of communication are:-
• Application Layer:- a layer which consists of applications
and processes that use the network.
• Host-to-Host or Transport Layer:- a layer which is
responsible for end-to-end reliable data transfer.
47
• Internet Layer:- this layer defines datagram and handles
routing of data across multiple networks.
• Network Access Layer:- consists of routines for
accessing the physical network
48
49
Network Access Layer
• Corresponds to the physical and data-link layers of the OSI
reference model.
• It provides the interface between the network architecture
(such as token ring, Ethernet) and the Internet layer.
• Classification of LAN development standards
– Ethernet (CSMA/CD)
– Token Ring
Ethernet
• The most commonly used medium access control.
• Employees CSMA/CD technology
• Specified in standard IEEE 802.3
50
IEEE 802 has developed a number of LAN standards
– The standard specifies a medium access control method,
multiple transmission media and data rate options
– Notation developed by IEEE 802 committee is
<data rate in Mbps><signaling method><max. segment length
in hundreds of meters>
eg. IEEE 802.3 10Mbps
• 10BASE5 coaxial cable (50ohm) Baseband signaling and max.
500m length
• 10BASE2 coaxial cable(50ohm) Baseband signaling and max
200m length.
• 10BASE-T Twisted pair, 100m length.
• 10BASE-F Fiber 500m.
• Fast Ethernet 100Mbps
51
Internet Layer
• The Internet layer, corresponding to the network layer
of the OSI reference model.
• Uses several protocols for routing and delivering
packets.
A) Internet Protocol (IP)
• Is a packet-switched protocol that performs addressing
and route selection.
• IP is a connectionless protocol.
• It sends packets without expecting the receiving host to
acknowledge receipt.
• IP is responsible for packet assembly and disassembly.
52
Some of IP header in formations:
• source and a destination address,
• protocol identifier,
• checksum (a calculated value),
• TTL ("time to live").
B) Address Resolution Protocol (ARP)
• Before an IP packet can be forwarded to another host,
the hardware address of the receiving machine must be
known.
• The ARP determines hardware address (MAC addresses)
that corresponds to an IP address.
• If ARP does not contain the address in its own cache, it
broadcasts a request for the address.
53
Transport layer
54
The main characteristics and mechanisms of TCP are discussed as
follows: -
Connection setup
Sender’s Reciever’s
event netw ork event
messages
Send SYN seq=x
55
Flow and congestion control
• The sending rate of a TCP connection is regulated by
two distinct mechanisms, the flow control and the
congestion control.
Flow control is implemented to avoid that a TCP sender
don’t overflows the receiver’s buffer.
• Thus, the receiver advertises in every ACK transmitted a
window limit to the sender (AWND).
• AWND changes over time depending on :
– the traffic conditions and
– the application speed in reading the receiver’s buffer.
56
Congestion control is concerned with the traffic inside
the network.
Its purpose is to prevent collapse inside the network
when the traffic source (sender) is faster than the
network in forwarding data.
TCP sender also uses a limiting window called congestion
window (CWND).
Connection control
• The sending window size of the sender, W, is taken as
being the minimum of the AWND and the CWND.
57
TCP connection management
Currently TCP’s connection management has four
phases: slow start, congestion avoidance, fast
retransmit and fast recovery.
Slow start: The sender starts by transmitting one
segment and waiting for its ACK.
• Afterwards, CWND is doubled each time an ACK is
received.
Congestion avoidance: At some point during
the connection, a bottleneck in the network might be
occurred and will start discarding packets.
• Only one packet will be sent.
58
TCP responds in different ways when congestion is
detected in the network either by: -
– Retransmission Time Out (RTO).
– Three duplicate ACKs.
59
TCP Duplicate acknowledgment
threshold
16
Congestion threshold
Window size
8 Slow start
0 2 4 6 8 10 12 14 16 18 20
Transmission Number
61
TCP header
62