Download Lecture 14

Document related concepts

Net bias wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Distributed firewall wikipedia , lookup

CAN bus wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Zigbee wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

AppleTalk wikipedia , lookup

TCP congestion control wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Network tap wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Computer network wikipedia , lookup

Airborne Networking wikipedia , lookup

Deep packet inspection wikipedia , lookup

IEEE 1355 wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Communication protocol wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Internet protocol suite wikipedia , lookup

Transcript
Protocols and Protocol Suit
Review
Lecture 14
Overview








Network Access Layer
Transport Layer
Protocols
Protocol Data Unit
Protocol Architecture
TCP/IP Stack
Layered Approach and its Advantages
Router
2
What is a Protocol ?
Q:- What is a protocol?
3
Communication Protocols
Definition
-
-
-
-
Protocol is a set of rules that govern all aspect of data
communication between computers on a network.
These rules include guidelines that regulate the following
characteristics of a network: access method, allowed physical
topologies, types of cabling, and speed of data transfer.
A protocol defines what, how, when it communicated.
The key elements of a protocol are syntax, semantics and timing.
Protocols are to computers what language is to humans. Since this
article is in English, to understand it you must be able to read
English. Similarly, for two devices on a network to successfully
communicate, they must both understand the same protocols.
4
Key Elements of protocol
Syntax
The structure or format of the data.
Eg. A simple protocol;
i)
5
Elements of protocol
ii) Semantics
- Refers to the meaning of each section of bits.
- how is a particular pattern to be interpreted, and what
action is to be taken based on that interpretation.
Eg. Does an address identify the route to be taken or
the final of the message?
6
Elements of protocol
iii) Timing
Refers to two characteristics:
a.
When data to be sent
b.
How fast it can be sent
Eg. If a sender produces data at 100 Mbps but the receiver
can process data at only 1 Mbps, the transmission will
overload the receiver and data will be largely lost.
7
Characteristics of protocol
a)
-
Direct / indirect
communication between two entities maybe direct or
indirect.
i) point-to-point link
- connection provides a dedicated link between two devices
- the entities in these systems may
communicate directly that is data and
control information pass directly
between entities with no intervening
active agent.
8
Characteristics of protocol
ii) multipoint link
- connection more than two devices can share a single link
- The entities must be concerned with the issue of access
control and making the protocol more complex.
9
Common protocol used
Protocol
Acronym
Remarks
Point To Point
PPP
Used to manage network
communication over a modem
Transfer/Transmission Control Protocol
TCP / IP
Backbone protocol. The most
widely used protocol.
Internetwork package exchange
IPX
Standard protocol for Novell NOS
NetBIOS extended user interface
NetBEUI
Microsoft protocol that doesn’t
support routing to other network.
Running only Windows-based
clients.
File transfer Protocol
FTP
used to send and received file
from a remote host
Simple mail Transfer protocol
SMTP
Used to send Email over a
network
Hyper text transfer protocol
HTTP
Used for Internet to send
document that encoded in HTML
Apple Talk
Apple Talk
Protocol suite to network
Macintosh computer and a peerto-peer network protocol
OSI Model
OSI Layers
A way of illustrating how
information functions travels
10
through network of its 7 layers.
What is a Protocol ?
Q:- What is a protocol?
Protocols are a set of rules and conventions. By enforcing
that communicating parties adhere to a common protocol,
communication is made possible. Protocol Architecture The
“Common Language”
Ans:- A protocol is the set of rules or conventions governing the
way in which two entities cooperate to exchange data.
11
12
PDU

What is a protocol data unit (PDU)?
13
Protocol Data Units (PDU)




At each layer, protocols are used to communicate
Control information is added to user data at each layer (PDU =
Control + Data)
Transport layer may fragment user data
Each fragment has a transport header added




Destination SAP (port)
Sequence number
Error detection code
This gives a transport protocol data unit
14
Network PDU Adds network header,
network address for destination computer
and Facilities requests
Protocol Data Units
15
PDU

What is a protocol data unit (PDU)?
Ans:- A PDU is the combination of data from the next higher
communications layer and control information.
16
17
Protocol Architecture
Q:- What is a protocol architecture?
18
Need For Protocol Architecture


There are lots of network applications
Building each application from scratch is very time-consuming
and challenging



What commands should be supported?
How to respond to each command?
How to identify the two peer applications?





How
How
How
How


Each computer may run multiple applications!
to
to
to
to
identify the two computers?
convert the data into bit stream?
convert the bit stream into signals?
detect and handle data loss and data error?
The network is not perfect!
Etc.
19
Need For Protocol Architecture



Data exchange can involve complex procedures, cf. file transfer
example
Better if task broken into subtasks
Implemented separately in layers in stack



each layer provides functions needed to perform communication for
layers above
using functions provided by layers below
Peer layers communicate with a protocol
20
Key Elements of a Protocol



Syntax – data block format
Semantics - control info. & error handling
Timing - speed matching & sequencing
21
(Cont.)

Most of the network apps share some common modules
Application A
Application B
Application C
Module A
Module B
Module C
Module T
Module T
Module T
Module I
Module I
Module I
Module N
Module N
Module N
Module P
Module P
Module P
Common
modules
22
(Cont.)

A complex task is broken into subtasks: modular design


Each layer performs a related subset of the functions required
to communicate with another system.




Each subtask is implemented separately as a layer, arranged in a vertical
stack
It relies on the next lower layer to perform more primitive functions and
to conceal the details of those functions.
It provides services to the next higher layer.
Layers should be defined so that changes in one layer do not require
changes in other layers.
So, instead of using a single complex protocol, it’s more flexible
to implement a stack of protocols!

Reduce the design and development workload significantly!
23
Vertical Stack
Application A
Module A
Application B
Module B
Application C
Application developers
Module C
Module T
Operating System
Module I
Module N
Module P
can be replaced by
other modules
Hardware
Module W
24
Example

E.g., A can only speak Chinese, B can only speak Spanish, how
can A communicate with B?



A finds a translator C, who can speak Chinese and English
B finds a translator D, who can speak Spanish and English
Two layers:


Higher layer: A and B
Lower layer: C and D
25
A Two-layer example
Higher A
Layer
Lower
Layer
How to communicate?
messages
in
Chinese
C
B
messages
in Spanish
messages in
English
Lower layer provides services to the next higher layer.
D
26
Protocol Architecture

Tasks of communications are broken up into modules



In very general terms, communications can be said to involve
three components: applications, computers, and networks.
For example, file transfer could use three modules (or layers)




Each module (or layer) can have its own protocol
File transfer application
Communications service module
Network access module
The stack of protocols is called “Protocol Stack”

Or Protocol Architecture
27
TCP/IP Protocol Architecture





Developed by the US Defense Advanced Research Project Agency (DARPA)
for its packet switched network (ARPANET)
Used by the global Internet
It consists of a large collection of protocols that have been issued as
Internet standard by the Internet Architecture Board (IAB).
 Check http://www.ietf.org/rfc/rfc2026.txt
The TCP/IP protocol architecture organizes the communication task into five
relatively independent layers:
 Layer 5: Application layer
 Layer 4: Transport layer, or Host to host (TCP belongs to this layer)
 Layer 3: Internet layer, or Network layer (IP belongs to this layer)
 Layer 2: Network access layer, or Link layer
 Layer 1: Physical layer
28
Remark: Each layer can have lots of different protocols!
Example

Web browser
World Wide Web

Replies on the HTTP protocol
Web server
Layer 5
HTTP
HTTP
Layer 4
TCP
TCP
Layer 3
IP
IP
Layer 2
IEEE 802.11
IEEE 802.3
Layer 1
IEEE
802.11g
IEEE 802.3
1000BASE-SX
29
Standardized Protocol Architectures




Required for devices to communicate
Vendors have more marketable products
Customers can insist on standards based equipment
Two standards:

OSI Reference model


Never lived up to early promises
TCP/IP protocol suite

Most widely used
30
Protocol Architecture
Q:- What is a protocol architecture?
Ans:- The software structure that implements the communications
function. Typically, the protocol architecture consists of a layered
set of protocols, with one or more protocols at each layer.
31
32
TCP/IP
Q:- What is TCP/IP?
OSI layers
TCP/IP layers
Application
DNS
Presentation
Application
Session
Transport
Network
Data link
Physical
FTP,
Telnet,
SMTP
TCP
IP
OSPF
DHCP
UDP
ICMP
IGMP
Lower level vendor implementations
33
Postal System
To: Mr. Jacky Chan
No. 123, XX Road,
XXX, USA
34
Inside Postal System
Central Post Office (New York)
The delivery of
your package
depends on the
postal address.
Central Post Office (Beijing)
Central Post Office (Hong Kong)
Local Post Office (Kowloon Tong)
Local Post Office (Tseung Kwan O)
35
TCP/IP Protocol Architecture




Developed by US Defense Advanced Research Project Agency
(DARPA)
ARPANET packet switched network reuired
Now popular all over the world used by the global Internet
Protocol suite comprises a large collection of standardized
protocols
36
TCP/IP
Q:- What is TCP/IP?
Ans:- Transmission Control Protocol/Internet Protocol (TCP/IP)
are two protocols originally designed to provide low level support
for internetworking. The term is also used generically to refer to a
more comprehensive collection of protocols developed by the U.S.
Department of Defense and the Internet community.
37
38
Layers
Q:- What are some advantages to layering as seen in the TCP/IP
architecture?
39
TCP/IP Layers
• Because TCP/IP was developed earlier than the OSI 7layer mode, it does not have 7 layers but only 4 layers
TCP/IP Protocol Suite
OSI 7-layer
FTP, SMTP, Telnet,
HTTP,…
TCP, UDP
IP, ARP, ICMP
Network Interface
40
Benefit of layering

The most challenging problem: how to provide a reliable data
transfer service on top of an unreliable data network?


This problem is so important that today’s Operating Systems all provide
such reliable service.
The burden of network application developers has been
reduced significantly!


Hence the application developers can simply focus on the application
layer issues.
We can easily develop thousands of network applications.
41
TCP/IP Layers
Q:- What are some advantages to layering as seen in the TCP/IP
architecture?
TCP/IP Protocol Suite
OSI 7-layer
FTP, SMTP, Telnet,
HTTP,…
TCP, UDP
IP, ARP, ICMP
Network Interface
Ans:- Layering decomposes the overall communications problem
into a number of more manageable subproblems
42
43
Router
Q:- What is a router?
Router Functions
 Linking WANs and LANs
 Interconnecting communication lines
 Path determination and packet switching
 Application of security rules (ACLs)
 Protocol conversion (encapsulation)

E.g. HDLC, PPP etc.
44
Routers




Internetworking among dissimilar subnetworks is achieved by
using routers to interconnect the subnetworks. Essential
functions that the router must perform include the following:
Provide a link between networks.
Provide for the routing and delivery of data between processes
on end systems attached to different networks.
Provide these functions in such a way as not to require
modifications of the networking architecture of any of the
attached subnetworks.
45
Routers


Addressing schemes: The networks may use different schemes for assigning
addresses to devices. For example, an IEEE 802 LAN uses 48-bit binary addresses
for each attached device; an ATM network typically uses 15-digit decimal addresses
(encoded as 4 bits per digit for a 60-bit address). Some form of global network
addressing must be provided, as well as a directory service.
Maximum packet sizes: Packets from one network may have to be broken into
smaller pieces to be transmitted on another network, a process known as
segmentation or fragmentation. For example, Ethernet imposes a maximum
packet size of 1500 bytes; a maximum packet size of 1000 bytes is common on X.25
packet-switching networks. A packet that is transmitted on an Ethernet system and
picked up by a router for retransmission on an X.25 network may have to be
fragmented into two smaller ones.
46
Router
47
TCP/IP (Sender)




Preparing the data. The application protocol prepares
a block of data for transmission. For example, an email
message (SMTP), a file (FTP), or a block of user input
(TELNET)
Using a common syntax. If necessary, the data are
converted to a form expected by the destination. This
may include a different character code, the use of
encryption, and/or compression.
Segmenting the data. TCP may break the data block
into a number of segments, keeping track of their
sequence. Each TCP segment includes a header
containing a sequence number and a frame check
sequence to detect errors.
Duplicating segments. A copy is made of each TCP
segment, in case the loss or damage of a segment
necessitates retransmission. When an acknowledgment
is received from the other TCP entity, a segment is
erased.
48
Operation of TCP/IP(Action at Router)






Arriving at router. The incoming signal is received
over the transmission medium and interpreted as a cell
of bits.
Processing the cell. The ATM layer removes the cell
header and processes it. The header error control is
used for error detection. The connection number
identifies the source.
Routing the packet. IP examines the IP header and
makes a routing decision. It determines which
outgoing link is to be used and then passes the
datagram back to the link layer for transmission on
that link
Forming LLC PDU. An LLC header is added to each
IP datagram to form an LLC PDU. The header contains
sequence number and address information.
Framing. A MAC header and trailer is added to each
LLC PDU, forming a MAC frame. The header contains
address information and the trailer contains a frame
check sequence.
Transmission. Each frame is transmitted over the
medium as a sequence of bits.
49
Router Components



Hardware components of a router:

Network interfaces

Interconnection network

Processor with a memory and CPU
PC router:

interconnection network is the (PCI) bus
and interface cards are NICs

All forwarding and routing is done on
central processor
Commercial routers:

Interconnection network and interface
cards are sophisticated

Processor is only responsible for control
functions (route processor)

Almost all forwarding is done on interface
cards
Processor
Memory
CPU
Interconnection Network
Interface Card
Interface Card
Interface Card
50
Functional Components
routing
protocol
Routing
functions
routing
protocol
routing table
updates
routing
table
Datapath:
routing table
lookup
incoming IP
datagrams
IP
Forwarding
Control
per-packet
processing
outgoing IP
datagrams
51
Routing and Forwarding

Routing functions include:







route calculation
maintenance of the routing table
execution of routing protocols
On commercial routers handled by a single general purpose
processor, called route processor
IP forwarding is per-packet processing
On high-end commercial routers, IP forwarding is distributed
Most work is done on the interface cards
52
Basic Architectural Components
Per-packet processing
Output
Routing
Table
Switch Fabric
Scheduling
Routing
Decision
Routing
Table
Forwarding
Decision
Routing
Table
Forwarding
Decision
53
Router Components

Processor
On a PC router:

interconnection network is the
(PCI) bus

Interface cards are NICs (e.g.,
Ethernet cards)

All forwarding and routing is done
on central processor
Memory
CPU
Interconnection Network

On Commercial routers:

Interconnection network and
interface cards can be
sophisticated

Central processor is the route
processor (only responsible for
control functions)
Interface Card
Interface Card
Interface Card
54
Router
Q:- What is a router?
Router Operations
 Layer 3 device
 Accepts PDUs on incoming network
 Examines PDU data
 Makes decision(s) for next stage of PDU journey
 May modify PDU contents (not payload)
 Passes PDU on to outgoing network
55
Router
Q:- What is a router?
Ans:-A router is a device that operates at the Network
layer of the OSI model to connect dissimilar networks.
56
Summary








Network Layer Functionality
Task performed @ Transport Layer
Protocol and Protocol Stack
Protocol Data Unit
Protocol Architecture
TCP/IP Stack
Layering Advantages in TCP/IP
Router Architecture and Functionality
57
58
Question
Q:- A broadcast network is one in
which a transmission from any one
attached station is received by all
other attached stations over a
shared medium. Examples are a
bustopology local area network,
such as Ethernet, and a wireless
radio network. Discuss the need or
lack of need for a network layer
(OSI layer 3) in a broadcast
network.
59
Routing in Case of Broadcast
A case could be made either way. First, look at the functions performed at the network
layer to deal with the communications network (hiding the details from the upper
layers). The network layer is responsible for routing data through the network, but
with a broadcast network, routing is not needed. Other functions, such as
sequencing, flow control, error control between end systems, can be
accomplished at layer 2, because the link layer will be a protocol directly between
the two end systems, with no intervening switches. So it would seem that a network
layer is not needed. Second, consider the network layer from the point of view of the
upper layer using it. The upper layer sees itself attached to an access point into a
network supporting communication with multiple devices. The layer for assuring that
data sent across a network is delivered to one of a number of other end systems is the
network layer. This argues for inclusion of a network layer. In fact, the OSI layer 2 is
split into two sublayers. The lower sublayer is concerned with medium access
control (MAC), assuring that only one end system at a time transmits; the
MAC sublayer is also responsible for addressing other end systems across the
LAN. The upper sublayer is called Logical Link Control (LLC). LLC performs
traditional link control functions. With the MAC/LLC combination, no network
60
layer is needed (but an internet layer may be needed).
61
Question:
Q:- A TCP segment consisting of 1500 bits of data and 160 bits of
header is sent to the IP layer, which appends another 160 bits of
header. This is then transmitted through two networks, each of
which uses a 24-bit packet header. The destination network has a
maximum packet size of 800 bits. How many bits, including
headers, are delivered to the network layer protocol at the
destination?
Sol:- Data plus transport header plus internet header equals 1820
bits. This data is delivered in a sequence of packets, each of
which contains 24 bits of network header and up to 776 bits of
higher-layer headers and/or data. Three network packets are
needed. Total bits delivered = 1820 + (3 x 24) = 1892 bits.
62
63
UDP Requirement
Q:- Why is UDP needed? Why can't a user program directly access
IP?
Ans:- UDP provides the source and destination port addresses and
a checksum that covers the data field. These functions would not
normally be performed by protocols above the transport layer.
Thus UDP provides a useful, though limited, service.
64
65
IP, TCP and UDP Error Checksum

Q:- IP, TCP, and UDP all discard a packet that arrives with a
checksum error and do not attempt to notify the source. Why?
Ans:- In the case of IP and UDP, these are unreliable protocols
that do not guarantee delivery, so they do not notify the
source. TCP does guarantee delivery. However, the technique
that is used is a timeout. If the source does not receive an
acknowledgment to data within a given period of time, the
source retransmits.
66
67
TCP UDP Header Length
Q:- Why does the TCP header have a header length field while the
UDP header does not?
Ans:- UDP has a fixed-sized header. The header in TCP is of
variable length.
68
Summary








Network Layer Functionality
Task performed @ Transport Layer
Protocol and Protocol Stack
Protocol Data Unit
Protocol Architecture
TCP/IP Stack
Layering Advantages in TCP/IP
Router Architecture and Functionality
69