0% found this document useful (0 votes)
60 views43 pages

03 Communication Networks

The document discusses protocol architectures and layered network models. It describes the need for standardized protocols to allow different systems to communicate. It outlines the OSI 7-layer model and compares it to the TCP/IP model. Key points include defining protocols, specifying protocols using space-time diagrams, and how protocol data units are used to add control information at each layer to allow reliable data exchange across networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views43 pages

03 Communication Networks

The document discusses protocol architectures and layered network models. It describes the need for standardized protocols to allow different systems to communicate. It outlines the OSI 7-layer model and compares it to the TCP/IP model. Key points include defining protocols, specifying protocols using space-time diagrams, and how protocol data units are used to add control information at each layer to allow reliable data exchange across networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Data Communications &

Computer Networks

Chapter 2

Protocols and Architecture

Fall 2008 1

Agenda

• Protocol architecture
• The Layered network Model
• The OSI reference model
—Layers of OSI
• The TCP/IP model
—Layers of TCP/IP
• Comparison between OSI and TCP/IP
models

1
Protocol Architecture

Need For Protocol Architecture


• Used for communications between entities in a
system
• Must speak the same language
• Entities
—User applications
—e-mail facilities
—terminals
• Systems
—Computer
—Terminal
—Remote sensor
4

2
Key Elements of a Protocol
• Syntax
—Data formats
—Signal levels
• Semantics
—Control information
—Error handling
• Timing
—Speed matching
—Sequencing

What’s a protocol?
human protocols: network protocols:
• “what’s the time?” • machines rather than
• “I have a question” humans
• introductions • all communication activity in
Internet governed by
protocols
… specific messages sent
… specific actions taken when
messages are received, or protocols define format,
other events order of messages sent and
received among network
entities, and actions taken
on message transmission,
receipt

3
What’s a protocol?
a human protocol and a computer network protocol:

Hi TCP connection
req.
Hi
TCP connection
Got the reply.
time?
5:00 Get http://www…./index.htm

time <file>

In Summary, a protocol is ....


• An agreement about communication between two or
more entities

• It specifies
– Format of messages
– Meaning of messages
– Rules for exchange
– Procedures for handling problems

4
Protocol Specification
• As designers, we can specify a protocol using Space-
Time Diagrams

• Internet Protocols are formalized by RFCs (Request For


Comment) which are administered by IETF (Internet
Engineering Task Force)

Space-Time Diagrams

• Defines causal ordering


• Defines indication/request/response actions
10

5
Protocol Architecture
• Task of communication broken up into modules

• For example file transfer could use three


modules
—File transfer application
—Communication service module
—Network access module

11

The layered network model

12

6
Layered Communication

Location A
I like
Message
rabbits

L: Dutch Information
for the
Ik hou
Remote
van Translator
konijnen

Fax #:--- Information


L: Dutch for the
Ik hou Remote
van Secretary
konijnen

Layered Communication

Location A Location B
I like J’aime
Message
rabbits les lapins

L: Dutch Information L: Dutch


for the Ik hou
Ik hou
Remote
van van
Translator
konijnen konijnen

Fax #:---
Fax #:--- Information L: Dutch
L: Dutch for the Ik hou
Ik hou Remote
van
van Secretary
konijnen
konijnen

7
Layered Communication

Location A Layers Location B


I like J’aime
rabbits
Message
3 les lapins

L: Dutch Information L: Dutch


for the
Ik hou
van
remote 2 Ik hou
van
translator
konijnen konijnen

Fax #:---
Fax #:--- Information L: Dutch
L: Dutch for the Ik hou
Ik hou remote
van secretary 1 van
konijnen
konijnen

Why a layered network model?


• Reduces complexity (one big problem to seven smaller
ones)
• Standardizes interfaces
• Facilitates modular engineering
• Assures interoperable technology
• Accelerates evolution
• Simplifies teaching and learning

16

8
A Three Layer Model
• In general, communications involve three
agents:
—Networks
—Computers
—Applications
• In this respect, communication tasks can be
organized in three independent layers:

Application
Transport
Network Access
17

Network Access Layer


• Exchange of data between the computer and
the network
• Sending computer provides address of
destination, so as the network may route the
data to the appropriate destination
• Sending computer may invoke levels of service,
eg. Priority that might be provided by the
network
• Dependent on type of network used (LAN,
packet switched etc.)

18

9
Transport Layer
• Reliable data exchange
• Independent of network being used
• Independent of application

19

Application Layer
• Contains the logic to support different user
applications
• For each type of application, e.g. e-mail, file
transfer, a separate module is needed

20

10
Protocol Architectures and
Networks

21

Addressing Requirements
• Two levels of addressing required
—Each computer needs unique network address
—Each application on a (multi-tasking) computer needs
a unique address within the computer
• The Service Access Point (SAP)
• The port on TCP/IP stacks

22

11
Protocols in Simplified
Architecture

23

Protocol Data Units (PDU)


• At each layer, protocols are used to
communicate
• Control information is added to user data at
each layer
• Transport layer may fragment user data to
make it more manageable
• This gives a transport protocol data unit
• Each fragment has a transport header added
—Destination SAP
—Sequence number for each PDU
—Error-detection code

24

12
Protocol Data Units

25

Network PDU
• Adds network header
—network address for destination computer
• The network must know to which computer in the network
the data are to be delivered
—Facilities requests
• The network access protocol might want the network to
make use of certain facilities, such as priority

26

13
Operation of a Protocol
Architecture

27

Standardized Protocol
Architectures
• Required for devices to communicate
• Vendors have more marketable products
• Customers can insist on standards-based equipment
• As computers dropped in price, joining them together became very
popular – i.e. they were ‘Networked’ to share information.
• But how are they to talk to each other? If company A sold a
computer that cannot talk to company B’s computer, then life
becomes very difficult.
• What is needed is a standard – a set of rules that every company
will obey, so that their machines will know how to communicate.
• Two standards:
— OSI reference model
• Never lived up to early promises
— TCP/IP model
• Most widely used

28

14
Why is it important to have
standards for communicating?

• To enable devices to communicate together


• To allow devices to be guaranteed as reliable
• To allow purchasers to know the device will
work

29

The OSI reference model

30

15
The OSI layered model
• Open Systems Interconnection (OSI) was an effort to standardize
networking that was started in 1982 by the International Organization for
Standardization (ISO), along with the ITU-T.
• Prior to OSI, according to its proponents, networking was largely vendor-
developed and proprietary
• OSI was an industry effort, attempting to get everyone to agree to
common network standards to provide multi-vendor interoperability. It was
common for large networks to support multiple network protocol suites,
with many devices unable to talk to other devices because of a lack of
common protocols between them.
• However while OSI developed its networking standards, TCP/IP came into
widespread use as the de facto standard.
• The OSI reference model (which actually predates the OSI protocol
work, dating to 1977) was a major advance in the teaching of network
concepts. It promoted the idea of a common model of protocol layers,
defining interoperability between network devices and software.

31

OSI - The Model


• A layer model
• Each layer performs a subset of the required
communication functions
• Each layer relies on the next lower layer to
perform more primitive functions
• Each layer provides services to the next higher
layer
• Changes in one layer should not require
changes in other layers

32

16
OSI Layers
• 7 layers
7 Application
• There is no direct 6 Presentation
communication between peer
5 Session
layers except at the physical
layer 4 Transport
3 Network
• Above the physical layer, each
2 Data Link
protocol entity sends data
down to the next lower layer 1 Physical
to get data across to its peer
entity

How can I remember all these and in the right order? 33

OSI mnemonic

“All People Seem To Need Data Processing”

Layer Name Mnemonic

7 Application All
6 Presentation People
5 Session Seem
4 Transport To
3 Network Need
2 Data Link Data
1 Physical Processing
34

17
Other OSI mnemonics
“All Pretty Serious Teenagers Never Do Physics ”
or:
“Please Do Not Tell Sales People Anything ”

Layer Name Mnemonic Mnemonic


(top to bottom) (from bottom up)

7 Application All Anything


6 Presentation Pretty People
5 Session Serious Sales
4 Transport Teenagers Tell
3 Network Never Not
2 Data Link Do Do
1 Physical Physics Please 35

Host and Media layers

}
7 Application
6 Presentation Host layers: Provide
5 Session accurate data delivery between
computers
4 Transport

}
3 Network
2 Data Link Media layers: Control
physical delivery of messages
1 Physical over the network

36

18
Basic Rules in the OSI model
• Each layer can only talk to the one above it and
below it
— e.g. The ‘Network’ layer can only pass information to the
‘Transport’ layer above it and the ‘Data Link’ layer below it.

• Passing information from one layer to another is


done in a standard way
— This means that if company ‘A’ has written some software for
the ‘Transport’ layer – and company ‘B’ has written some
software for the ‘Network’ layer – then they are guaranteed to
be able talk to each other.

• Any layer does not care or need to know how the


layers beneath it work
— It will assume that the information it needs, is going to be
presented in a standard way. This makes it much simpler to
design the layer itself.
37

Description of OSI layers

38

19
Layer 1: Physical layer
• The physical layer defines all the electrical and physical specifications for devices. In
particular, it defines the relationship between a device and a physical medium. This
includes the layout of pins, voltages and cable specifications. Hubs, repeaters,
network adapters and Host Bus Adapters are physical-layer devices.

• The physical layer is concerned primarily with the interaction of a single device with
a medium. The physical layer will tell one device how to transmit to the medium, and
another device how to receive from it, but not, with modern protocols, how to gain
access to the medium. Physical layer standards such as RS-232 use physical wires to
control access to the medium.

• The major functions and services performed by the physical layer are:
— Establishment and termination of a connection to a medium.
— Participation in the process whereby the communication resources are
effectively shared among multiple users. For example, floe control.
— Modulation, or conversion between the representation of digital data in user
equipment and the corresponding signals transmitted over a communications
channel. These are signals operating over the physical cabling (such as copper
and optical fiber) or over a radio link.
39

Layer 2: Data Link layer (1/2)


• The Data Link layer provides the functional and procedural means to
transfer data between network entities and to detect and possibly correct
errors that may occur in the Physical layer.

• Originally, this layer was intended for point-to-point and point-to-multipoint


media, characteristic of wide area media in the telephone system. Local
area network architecture, which included broadcast-capable multiaccess
media, was developed independently of the ISO work, in IEEE Project
802. IEEE work assumed sublayering and management functions not
required for WAN use.

• Both WAN and LAN services arrange bits, from the physical layer, into
logical sequences called frames. Not all physical layer bits necessarily go
into frames, as some of these bits are purely intended for physical layer
functions. For example, every fifth bit of the FDDI bit stream is not used by
the data link layer.

40

20
Layer 2: Data Link layer (2/2)
• WAN Protocol Architecture
— Connection-oriented WAN data link protocols, in addition to framing, detect and
may correct errors. They also are capable of controlling the rate of transmission.
A WAN data link layer might implement a sliding window flow control and
acknowledgment mechanism to provide reliable delivery of frames.
• IEEE 802 LAN Architecture*
— Practical, connectionless LANs began with the pre-IEEE Ethernet specification,
which is the ancestor of the IEEE 802.3. This layer manages the interaction of
devices with a shared medium, which is the function of a Media Access Control
(MAC) sublayer. Above this MAC sublayer is the media-independent IEEE 802.2
Logical Link Control (LLC) sublayer, which deals with addressing and
multiplexing on multiaccess media.

• While IEEE 802.3 is the dominant wired LAN protocol and IEEE 802.11 the
wireless LAN protocol, obsolescent MAC layers include Token Ring and
FDDI. The MAC sublayer detects but does not correct errors.

* this specification is covered thoroughly in the ACOE322 course. 41

Layer 3: Network layer


• The Network layer provides the functional and procedural means of
transferring variable length data sequences from a source to a destination
via one or more networks while maintaining the quality of service
requested by the Transport layer.

• The Network layer performs network routing functions, and might also
perform fragmentation and reassembly, and report delivery errors.

• Routers operate at this layer—sending data throughout the extended


network and making the Internet possible. This is a logical addressing
scheme – values are chosen by the network engineer. The addressing
scheme is hierarchical. The best known example of a layer 3 protocol is the
Internet Protocol (IP).

42

21
Layer 4: Transport layer
• The Transport layer provides transparent transfer of data between end
users, providing reliable data transfer services to the upper layers.

• It controls the reliability of a given link through flow control, segmentation/


desegmentation, and error control. Some protocols are state and
connection oriented. This means that the transport layer can keep track of
the segments and retransmit those that fail.

• It converts messages into TCP segments or User Datagram Protocol (UDP),


Stream Control Transmission Protocol (SCTP).

• Perhaps an easy way to visualize the Transport Layer is to compare it with


a Post Office, which deals with the dispatch and classification of mail and
parcels sent. Do remember, however, that a post office manages the outer
envelope of mail. Higher layers may have the equivalent of double
envelopes, such as cryptographic Presentation services that can be read by
the addressee only.
43

Layer 5: Session layer


• The Session layer controls the dialogues/connections (sessions) between
computers.

• It establishes, manages and terminates the connections between the local


and remote application.

• It provides for either full-duplex or half-duplex operation, and establishes


checkpointing, interruption, termination, and restart procedures. The OSI
model made this layer responsible for "graceful close" of sessions, which is
a property of TCP, and also for session checkpointing and recovery, which
is not usually used in the Internet protocols suite.

44

22
Layer 6: Presentation layer
• The Presentation layer transforms the data to provide a standard interface
for the Application layer.

• MIME* encoding, data encryption and similar manipulation of the


presentation are done at this layer to present the data as a service or
protocol that the developer sees fit.

• Examples of this layer are converting an 8-bit-coded text file to an ASCII-


coded file (character encoding) and other data structures into and out of
XML.

* Multipurpose Internet Mail Extensions (MIME) is an internet standard that extends the
format of email.

45

Layer 7: Application layer


• The Application layer interfaces directly to and performs common application
services for the application processes; it also issues requests to the presentation
layer.

• Note that this layer provides services to user-defined application processes, and not
to the end user. For example, it defines a file transfer protocol, but the end user
must go through an application process to invoke file transfer. The OSI model does
not include human interfaces.

• The common application services sublayer provides functional elements including the
Remote Operations Service Element (comparable to Internet Remote Procedure
Call), Association Control, and Transaction Processing.

• Above the common application service sublayer are functions meaningful to user
application programs, such as messaging (X.400), directory (X.500), file transfer
(FTAM), etc.

46

23
James Bond and OSI analogy
• James Bond meets Number One on the 7th floor (application) of the spy headquarters
building. Number One gives Bond a secret message that must get through to the US
Embassy across town.
• Bond proceeds to the 6th floor (presentation) where the message is translated into an
intermediary language, encrypted and miniaturized.
• Bond takes the elevator to the 5th (session) floor where Security checks the message to
be sure it is all there and puts some checkpoints in the message so his counterpart at the
US end can be sure he’s got the whole message.
• On the 4th floor (transport) the message is analyzed to see if it can be combined with
some other small messages that need to go to the US end. Also if the message was very
large it might be broken into several small packages so other spies can take it and have it
reassembled on the other end.
• The 3rd floor (Network) personnel check the address on the message and determine
who the addressee is and advising Bond of the fastest route to the Embassy.
• On the 2nd floor (Data link) the message is put into a special courier pouch (packet). It
contains the message, the sender and destination ID. It also warns the recipient if other
pieces are still coming.
• Bond proceeds to the 1st floor (Physical) where Q has prepared the Aston Martin for the
trip to the Embassy. Bond departs for the US Embassy with the secret packet in hand.
• On the other end the process is reversed. Bond proceeds from floor to floor where the
message is decoded. The US Ambassador is very grateful the message got through safely.
"Bond, please tell Number One I’ll be glad to meet him for dinner tonight". 47

Peer-to-Peer Communications

Host A Host B

7 Application Application
Data

6 Presentation Presentation
5 Session Session
Segments
4 Transport Transport
Packets
3 Network Network
Frames
2 Data Link Data Link
Bits
1 Physical Physical

24
Data Encapsulation
Host A Host B
Application Application
Presentation
Session
Transport
Network
} Data

{ Presentation
Session
Transport
Network
Data Link Data Link
Physical Physical

• The process of moving data from host A to host B is


known as data encapsulation
• the data is being wrapped in the appropriate protocol
header so it can be properly received.

Data Encapsulation
Host A Host B
Application Application
Presentation
Session
Transport
Network
} Network
Data

Data
{ Presentation
Session
Transport
Network
Header
Data Link Data Link
Physical Physical

At the network layer, a network header is added to the data.


This header contains information required to complete the
transfer, such as source and destination logical addresses.

25
Data Encapsulation
Host A Host B
Application Application
Presentation
Session
Transport
Network
} Network
Data

Data
{ Presentation
Session
Transport
Network
Header
Data Link Frame Network Data Frame Data Link
Header Header Trailer
Physical Physical

The packet from the network layer is then passed to the data
link layer where a frame header and a frame trailer are added
thus creating a data link frame.

Data Encapsulation
Host A Host B
Application Application
Presentation
Session
Transport
Network
} Network
Data

Data
{ Presentation
Session
Transport
Network
Header
Data Link Frame Network Data Frame Data Link
Header Header Trailer
Physical 1011110101001001 Physical

• Finally, the physical layer provides a service to the data link layer.
• This service includes encoding the data link frame into a pattern
of 1s and 0s for transmission on the medium (usually a wire).

26
Peer-to-Peer communication and
data encapsulation

Header Trailer
53

OSI as Framework for


Standardization

54

27
Layer Specific Standards

55

Elements of Standardization
• Protocol specification
— Operates between the same layer on two systems
— May involve different operating system
— Protocol specification must be precise
• Format of data units
• Semantics of all fields
• allowable sequence of PCUs
• Service definition
— Functional description of what is provided
• Addressing
— Each layer provides services to entities at the next higher layer.
These entities are referenced by means of SAPs

56

28
Service Primitives and
Parameters
• Services between adjacent layers expressed in
terms of primitives and parameters
• Primitives specify function to be performed
• Parameters pass data and control info

57

Service Primitive Types


REQUEST A primitive issued by a service user to invoke some
service and to pass the parameters needed to
specify fully the requested service
INDICATION A primitive issued by a service provider either to:
indicate that a procedure has been invoked by the
peer service user on the connection and to provide
the associated parameters, or
notify the service user of a provider-initiated action
RESPONSE A primitive issued by a service user to acknowledge
or complete some procedure previously invoked by
an indication to that user
CONFIRM A primitive issued by a service provider to
acknowledge or complete some procedure
previously invoked by a request by the service user

58

29
Timing Sequence for Service
Primitives

59

Use of a Relay

L3 L3

L2 L2

L1 L1

network node
e.g. router 60

30
Benefits of OSI model
• Any hardware that meets the OSI standard will be able to
communicate with any other hardware that also meets the
standard
• Any software that meets the OSI standard will be able to
communicate with any other hardware or software that also meets
the standard
• Consumers are given a wider choice since hardware/software from
any manufacturer will work together
• OSI is independent of country, it doesn't matter where the
hardware/software is made
• OSI is not dependent on the operating system used
• The protocols for OSI are defined at each stage
• Any errors that occur are handled in each layer
• The different layers can operate automatically

61

The OSI model vs the Real World


• The most major difficulty with the OSI model is that is
does not map well to the real world!
• The OSI was created after many of today’s protocols
were already in production use. These existing
protocols, such as TCP/IP, were designed and built
around the needs of real users with real problems to
solve. The OSI model was created by academicians for
academic purposes.
• The OSI model is a very poor standard, but it's the only
well-recognized standard we have which describes
networked applications.
• The easiest way to deal with the OSI model is to map
the real-world protocols to the model, as well as they
can be mapped.
62

31
OSI modem summary
Data unit Layer Function

Host Data 7. Application Network process to application


layers
6. Presentation Data representation and encryption

5. Session Interhost communication

Segments 4. Transport End-to-end connections and reliability (TCP)

Media Packets 3. Network Path determination and logical addressing (IP)


layers
Frames 2. Data link Physical addressing (MAC & LLC)

Bits 1. Physical Media, signal and binary transmission

63

The TCP/IP model

64

32
The TCP/IP model
• Developed by the US Defense Advanced Research Project Agency
(DARPA) for its packet switched network (ARPANET)
• Used by the global Internet
• No official model but a working one
• The TCP/IP model is a more accurate model of real-world
networking

TCP/IP Model

Application Layer
Transport Layer
Internet or Network Layer
Data Link Layer
Physical Layer 65

What is TCP/IP?
• TCP/IP is shorthand for a suite of protocols that run on top of IP.
— IP is the Internet Protocol, and TCP is the most important protocol that runs on
top of IP. Any application that can communicate over the Internet is using IP,
and these days most internal networks are also based on TCP/IP.
• Protocols that run on top of IP include:
— TCP, UDP and ICMP. Most TCP/IP implementations support all three of these
protocols.
• TCP/IP protocols work together to break data into packets that can be
routed efficiently by the network.
— In addition to the data, packets contain addressing, sequencing, and error
checking information. This allows TCP/IP to accurately reconstruct the data at
the other end.
• Analogy example of what TCP/IP does:
— Say you’re moving across the country: You pack your boxes and put your new
address on them.
— The moving company picks them up, makes a list of the boxes, and ships them
across the country using the most efficient route. That might even mean putting
different boxes on different trucks.
— When the boxes arrive at your new home, you check the list to make sure
everything has arrived (and in good shape), and then you unpack the boxes and
“reassemble” your house.

66

33
TCP/IP Physical Layer
• The Physical layer is responsible for encoding and transmission of
data over network communications media. It operates with data in
the form of bits that are sent from the Physical layer of the sending
(source) device and received at the Physical layer of the destination
device.

• Ethernet, Token Ring, hubs, repeaters, cables and connectors are


standard network devices that function at the Physical layer.

• The Physical layer is also considered the domain of many hardware-


related network design issues, such as LAN and WAN topology and
wireless technology.

67

TCP/IP Data Link Layer


• The link layer, which is the method used to move packets from the network
layer on two different hosts, is not really part of the Internet protocol suite,
because IP can run over a variety of different link layers.

• The processes of transmitting packets on a given link layer and receiving


packets from a given link layer can be controlled both in the software
device driver for the network card, as well as on firmware or specialist
chipsets. These will perform data link functions such as adding a packet
header to prepare it for transmission, then actually transmit the frame over
a physical medium.

• For Internet access over a dial-up modem, IP packets are usually


transmitted using PPP. For broadband Internet access such as ADSL, PPPoE
is often used. On a local wired network, Ethernet is usually used, and on
local wireless networks, IEEE802.11 is usually used. For WANs, either PPP
over E1-carrier lines, Frame Relay, ATM, or Packet Over SONET/SDH (POS)
are often used.

68

34
TCP/IP Internet (or Network) Layer
• This layer is responsible for getting data from the source network to
the destination network. This generally involves routing the packet
across a network of networks, known as an internetwork or (lower-
case) internet.

• In the Internet protocol suite, IP performs the basic task of getting


packets of data from source to destination. IP can carry data for a
number of different upper layer protocols; these protocols are each
identified by a unique protocol number. For example, ICMP (used to
transmit diagnostic information about IP transmission) and IGMP
(used to manage IP multicat data) are protocols 1 and 2,
respectively, which are layered on top of IP.

• All routing protocols, such as OSPF, and RIP are also part of the
network layer. What makes them part of the network layer is that
their payload is totally concerned with management of the network
layer.
69

TCP/IP Transport Layer (1/2)


• The Transport layer's responsibilities include end-to-end message transfer
capabilities independent of the underlying network, along with error control,
fragmentation and flow control. End to end message transmission or connecting
applications at the transport layer can be categorized as either:
— Connection-oriented (reliable)
— Connectionless (unreliable)

• The transport layer can be thought of literally as a transport mechanism e.g. a


vehicle whose responsibility is to make sure that its contents (passengers/goods)
reach its destination safely and soundly, unless a higher or lower layer is responsible
for safe delivery. Some applications, such as Voice over IP (VoIP) can tolerate
dropped packets, but not delay or reordering that would be caused by a reliable
transport.

• The transport layer provides this service of connecting applications together through
the use of ports. Since IP provides only a best effort delivery, the transport layer is
the first layer of the TCP/IP stack to offer reliability.

• For example, Transmission Control Protocol (TCP) is a connection-oriented


protocol that addresses numerous reliability issues to provide a reliable byte stream.

70

35
TCP/IP Transport Layer (2/2)
• The Stream Control Transmission Protocol (SCTP) is also a "reliable", connection-oriented,
transport mechanism. It is stream-oriented — not byte-oriented like TCP — and provides multiple
streams multiplexed over a single connection. It also provides multi-homing support, in which a
connection end can be represented by multiple IP addresses (representing multiple physical
interfaces), such that if one fails, the connection is not interrupted. It was developed initially for
telephony applications (to transport SS7 signalling over IP), but can also be used for other
applications.

• User Datagram Protocol (UDP) is a connectionless datagram protocol. Like IP, it is a best
effort or "unreliable" protocol. Reliability is addressed through error detection using a weak
checksum algorithm. UDP is typically used for applications such as streaming media (audio and
video, etc) where on-time arrival is more important than reliability, or for simple query/response
applications like DNS lookups, where the overhead of setting up a reliable connection is
disproportionately large.

• Both TCP and UDP are used to carry a number of higher-level applications. The applications at
any given network address are distinguished by their TCP or UDP port.

• The Real-time Transport Protocol (RTP) is a datagram protocol that is designed for real-time
data such as streaming audio and video.

71

TCP/IP Application Layer


• The Application layer is used by most programs for network
communication. Data is passed from the program in an application-
specific format, then encapsulated into a transport layer protocol.

• Since the IP stack has no layers between the application and


transport layers, the application layer must include any protocols
that act like the OSI's presentation and session layer protocols. This
is usually done through libraries, that is a collection of subprograms
used to develop software.

• Data sent over the network is passed into the application layer
where it is encapsulated into the application layer protocol. From
there, the data is passed down into the transport layer.

• Routers and switches do not utilize this layer but bandwidth


throttling applications do, as with the Resource Reservation
Protocol (RSVP).
72

36
TCP protocol
• TCP stands for Transmission Control Protocol.
• TCP establishes a reliable connection between two applications over the network
(connection-oriented). This means that TCP guarantees accurate, sequential delivery
of your data. If something goes wrong, TCP reports an error, so you always know
whether your data arrived at the other end.

Here’s how it works:


• Every TCP connection is uniquely identified by four numbers:
— source IP address
— source port
— destination IP address
— destination port
• Typically, a client will use a random port number, but a server will use a “well
known” port number, e.g. 25=SMTP (email), 80=HTTP (Web) and so on. Because
every TCP connection is unique, even though many people may be making requests
to the same Web server, TCP/IP can identify your packets among the crowd.
• In addition to the port information, each TCP packet has a sequence number.
Packets may arrive out of sequence (they may have been routed differently, or one
may have been dropped), so the sequence numbers allow TCP to reassemble the
packets in the correct order and to request retransmission of any missing packets.
• TCP packets also include a checksum to verify the integrity of the data. Packets that
fail checksum get retransmitted.
73

UDP protocol
• Alternative to TCP is the User Datagram Protocol
• UDP is a fast, unreliable, connectionless protocol, that is suitable for
some applications.
• Unreliable means there is no sequencing, no guaranteed delivery
(no automatic retransmission of lost packets) and sometimes no
checksums.
• Fast means there is no connection setup time, unlike TCP. In
reality, once a TCP session is established, packets will go just as
fast over a TCP connection as over UDP.
• UDP is useful for applications such as streaming audio that don’t
care about dropped packets and for applications such as TFTP that
inherently do their own sequencing and checksums. Also,
applications such as NFS that usually run on very reliable physical
networks and which need fast, connectionless transactions use
UDP.

74

37
TCP/IP Concepts

75

Addressing level
• Level in architecture at which entity is named
• Unique address for each end system (computer)
and router
• Network level address
—IP or internet address (TCP/IP)
—Network service access point or NSAP (OSI)
• Process within the system
—Port number (TCP/IP)
—Service access point or SAP (OSI)

76

38
Trace of Simple Operation
• Process associated with port 1 in host A sends
message to port 2 in host B
• Process at A hands down message to TCP to
send to port 2
• TCP hands down to IP to send to host B
• IP hands down to network layer (e.g. Ethernet)
to send to router J
• Generates a set of encapsulated protocol data
units (PDUs)

77

PDUs in TCP/IP

78

39
Example of Header Information
in TCP segment
• Destination port
— When the TCP entity at B receives the segment, it must know to
whom the data are to be delivered
• Sequence number
— TCP numbers the segments that it sends to a particular
destination port sequentially, so if they arrive out of order, the
TCP entity at B can reorder them
• Checksum
— The sending TCP includes a code which is a function of its
contents. The receiving TCP performs the same calculation and
compares the result with the incoming code. If there is a
discrepancy, then it implies that there has been an error in
transmission.

79

Some Protocols in TCP/IP


model

80

40
Mapping examples of Real-World
protocols to OSI model

Layer Name Examples of common protocols


7 Application Telnet, SNMP, SMTP, FTP, DNS, HTTP

6 Presentation HTTP, SMTP, SNMP, JPEG, MPEG

5 Session SQL, SIP, NETBIOS

4 Transport TCP, UDP

3 Network IP, IPSec, RIP, OSPF

2 Data Link Ethernet, ATM, FR, FDDI, Token Ring, PPP

1 Physical Cat-5, RS-232, 10BaseT, DSL


81

Comparison between OSI and


TCP/IP models

82

41
Comparison between OSI and
TCP/IP models (1/3)

83

Comparison between OSI and


TCP/IP models (2/3)
OSI model
• Has been devised before the corresponding protocols
were invented
• Has good definition of service, interface, and protocol
• Fits well with object oriented programming concepts
• Protocols are better hidden

TCP model
• the protocols came first, the model was just a
description of the protocols
• the model isn't good for any other protocols part from
TCP/IP.
84

42
Comparison between OSI and
TCP/IP models (3/3)
A critique of OSI model:
• Bad Timing
- TCP already in use by the time OSI came along.
• Bad Technology
- Layers don't match reality. Chosen because IBM's SNA has
seven layers.
- Dominated by phone company mentality.
• Bad Implementation
- Huge, unwieldy, slow.

A critique of TCP/IP model:


• Doesn't separate specification from implementation.
• Model is only good for describing TCP.
• Doesn't specify physical and data link layers.

85

Required Reading
• W. Stallings, “Data and Computer Communications (7th
edition)”, Prentice Hall, Chapter 2

• F. Halsall, “Data Communications, Computer Networks


and Open Systems (4th edition)”, Addison Wesley,
Chapter 1

• A.S. Tanenbaum, “Computer Networks (4th edition)”,


Pearson Prentice Hall, Chapter 1.4

• www.wikipedia.org

86

43

You might also like