Week-2 - PCT Research Group

Download Report

Transcript Week-2 - PCT Research Group

Computer Communication & Networks
Week # 02
Semester: Spring 2016
Powerpoint Templates
1
ACKNOWLEDGMENTS
These lecture slides contain material from slides prepared
by Behrouz Forouzan for his book Data Communication
and Networking (4th/5th edition).
These lecture slides updated by Dr. Arshad Ali, Assistant
Professor ,CS Department, The University of Lahore
2
Week 2: Course Plan
 Network Models (System Architecture)
 Concept of protocol layering
 Two scenarios
 Principles of protocol layering
 TCP/IP protocol suit
 OSI model
3
Protocol Layering
 Protocol
defines the rules that both the sender and receiver and
all intermediate devices need to follow to be able to
communicate effectively.
 We
may need only one simple protocol for
simple communication
 Protocol layering: for complex communication,
we may need to divide the task between different
layers; and we need a protocol at each layer
4
Protocol layering scenarios

Scenario of simple communication (only one layer
is enough for communication)
Suppose two office neighbors with common ideas
Communication between them takes place in one
layer (face to face) in the same language
5
Protocol layering scenarios
In Simple Scenario
 Both must follow a set of rules for this simple
communication to occur
Greet each other when they meet
know vocabulary at their friendship level
Only one should speak at a time
Conversation in the form of dialogue instead of
monolog (between teacher-student)
Exchange of some nice words when they leave
6
Protocol layering scenarios

A bit complex scenario (many layers)
Now suppose one moves to other branch of company but still
wants to communicate ideas with other one
They opt for regular mail service through post office for their
conversation without revealing their ideas in case their letters
are intercepted
They agree in encryption/decryption technique
sender encrypts the letter to make it unreadable by an
intruder (interceptor)
receiver decrypts to get the original letter
Communication between them takes place in three layers
7
Tasks involved in sending a letter
8
Principles of Protocol Layering
Protocol layering allows us to divide a complex task into
several smaller and simpler tasks
 A layer (module) is a black box with inputs and outputs
without concerns about the conversion of inputs to outputs
 Protocol layering allows to separate the services from
implementation
 A layer needs to be able to receive a set of services from
the lower layer and to give the services to the upper layer
We do not care about how the layer is implemented
 There are also intermediate systems other than endsystems used by communication with respect to protocol
layering in the Internet

9
Principles of Protocol layering
First principle
 For bidirectional communication: Each layer should be
able to perform two opposite tasks
3rd layer task is to talk (in one direction) and listen (in
other direction)
2nd layer encrypt (on one side) and decrypt (other side)
1st layer, send and receive email
10
Principles of Protocol layering
Second principle
 Two objects under each layer at both sides should be
identical
Objects under layer 3 : plain text
Objects under layer 2: Cipher text
Objects under layer 1: a piece of mail
11
Logical Connection

Logical connections are necessary for layer-to-layer
communication

Both A and B can think that there is a logical (imaginary)
connection at each layer through which they can send the
object created from that layer
12
Logical Connection
Plain/text
Plain/text
Logical connection
Encrypt/decrypt
Encrypt/decrypt
Logical connection
Logical connection
13



Networks are complex with many pieces
Hosts, routers, links, applications, protocols, hardware,
software
Can we organize it, somehow?
Let’s consider a Web page request:
Browser requests Web page from server
Server should determine if access is privileged
Reliable transfer of page from server to client
Physical transfer of “bits” from server to client
14
Reasons to choose for a Layered Architecture
Change: When changes are made to one layer, the impact on the
other layers is minimized. If the model consists of a single, allencompassing layer, any change affects the entire model
Design: A layered model defines each layer separately. As long as
the interconnections between layers remain constant, protocol
designers can specialize in one area (layer) without worrying about
how many new implementations affect other layers.
Learning: The layered approach reduces a very complex set of
topics, activities, and actions into several smaller, interrelated
groupings. This makes learning and understanding the actions of
each layer and the model generally much easier.
15
Reasons to choose for a Layered Architecture
Troubleshooting: The protocols, actions, and data contained in
each layer of the model relate only to the purpose of that layer.
This enables troubleshooting efforts to be pinpointed on the layer
that carries out the suspected cause of the problem.
Standards: Probably the most important reason for using a layered
model is that it establishes a prescribed guideline for
interoperability between the various vendors developing products
that perform different data communications tasks. Remember,
though, that layered models, including the OSI model, provide only
a guideline and framework, not a rigid standard that manufacturers
can use when creating their products.
16
 The
TCP/IP Protocol Suit
Used in all WANs, the ARPANET, worldwide
Internet
 The OSI Reference Model (minus physical
medium)
17
TCP/IP PROTOCOL SUITE
 Transmission Control Protocol/Internet Protocol
(TSP/IP) is a set of protocols organized in different
layers used in the Internet today.
 It is Hierarchical protocol: made up of interactive
modules (each module provides specific functionality)
 Hierarchical means that each upper level protocol is
supported by the services provided by one or more lower
level protocols.
 The layers in the TCP/IP protocol suite do not exactly
match those in the OSI model.
18
TCP/IP PROTOCOL SUITE
 The original TCP/IP protocol suite was defined as
having four layers: host-to-network, internet, transport,
and application.
 However, when TCP/IP is compared to OSI, we can say
that the TCP/IP protocol suite is made of five layers:
physical, data link, network, transport, and application.
19
TCP/IP Layered Architecture
 Consider a small internet of three LANs (each with a link layer
switch).
 Further, assume that links are connected by one router
20
TCP/IP Layered Architecture
 The two hosts are involved in all five layers
 Source host creates a message in the application layer and sends
it down the layer for physical delivery to the destination host
 Destination host receives the communication at physical and
then deliver to the application layer through other layers
 Router is involved three layers
 Involved in only one network layer; but involved in n
(number of links) combinations of link and physical layers
 Each link may use its own data link and physical protocol
 Link layer switch is involved in only two layers
 It is involved only in one data-link and one physical layer
21
LAYERS IN THE TCP/IP Protocol Suit
 Logical connections make easier to think about the duty of
each layer.
 The duty of the application, transport, and network layers is
end-to-end (so domain is internet).
 However, the duty of the data-link and physical layers is hopto-hop, a hop being a host or router (domain is link).
22
LAYERS IN THE TCP/IP Protocol Suit
 Logical connections may be though of as data unit created at
each layer, a hop being a host or router.
 In top three layers
 Data unit (packets) should not be changed by any router or
link-layer switch.
 In the bottom two layers,
 the packet created by the host is changed only by the routers,
not by the link-layer switches.
23
INTERFACE BETWEEN LAYERS
The passing of the data and network information down through the
layers of the sending device and back up through the layers of the
receiving device is made possible by an interface between each pair
of adjacent layers.
Each interface defines the information and services a layer must
provide for the layer above it.
Well-defined interfaces and layer functions provide modularity to
a network.
24
PHYSICAL LAYER IN THE TCP/IP
 responsible for carrying individual bits in a frame across the
link.
 The communication between two devices at the physical layer is a
logical communication because there is another, hidden layer, the
transmission media, under the physical layer.
 Two devices are connected by a transmission medium (cable
or air).
 Transmission medium does not carry bits; it carries electrical or
optical signals.
 So the bits received in a frame from the data-link layer are
transformed and sent through the transmission media,
 but we can think that the logical unit between two physical
layers in two devices is a bit.
 There are several protocols that transform a bit to a signal.
25
DATA-LINK LAYER IN THE TCP/IP (1)
 There may be several overlapping sets of links that a datagram
can travel from the host to the destination. The routers are
responsible for choosing the best links.
 However, when the next link to travel is determined by the router,
the data-link layer is responsible for taking the datagram and
moving it across the link.
 The link can be a wired LAN with a link-layer switch, a wireless
LAN, a wired WAN, or a wireless WAN.
 We can also have different protocols used with any link type.
 In each case, the data-link layer is responsible for moving the
packet through the link.
26
DATA-LINK LAYER IN THE TCP/IP (2)
 TCP/IP does not define any specific protocol for the data-link
layer.
 It supports all the standards and proprietary protocols.
 Any protocol that can take the datagram and carry it through the
link is sufficient for the network layer.
 The data-link layer takes a datagram and encapsulates it in a
packet called a frame.
 Each link-layer protocol may provide a different service.
 Some link-layer protocols provide complete error detection
and correction,
 some provide only error correction.
27
NETWORK LAYER IN THE TCP/IP (1)
 It is responsible for creating a connection between the source
computer and the destination computer.
 The communication at the network layer is host-to-host.
 Routers in the path are responsible for choosing the best route for
each packet.
 So, network layer is responsible for host-to-host communication
and routing the packet through possible routes.
 In the Internet, it includes the main protocol, Internet Protocol
(IP), that defines
 the format of the packet, called a datagram at the network
layer.
 the format and the structure of addresses used in this layer.
28
NETWORK LAYER IN THE TCP/IP (3)
 IP is also responsible for routing a packet from its source to its
destination,
 achieved by each router forwarding the datagram to the next
router in its path.
 It includes unicast and multicast routing protocols
 A routing protocol does not take part in routing (it is duty of IP);
 But it creates forwarding tables for routers in order to help
them in routing process
29
NETWORK LAYER IN THE TCP/IP (3)
 Some other protocols at network layer
 Internet Control Message Protocol (ICMP) helps IP to
report some problems when routing a packet.
 The Internet Group Management Protocol (IGMP) helps
IP in multitasking.
 The Dynamic Host Configuration Protocol (DHCP) helps
IP to get the network-layer address for a host.
 The Address Resolution Protocol (ARP) is a protocol that
helps IP to find the link-layer address of a host or a router
when its network layer address is given
30
TRANSPORT LAYER IN THE TCP/IP (1)
 The logical connection at the transport layer is also end-to-end.
 The transport layer at the source host gets the message from the
application layer, encapsulates it in a transport layer packet (called
a segment or a user datagram in different protocols) and sends it,
through the logical connection, to the transport layer at the
destination host.
 So transport layer is responsible for giving services to the
application layer: to get a message from an application program
running on the source host and deliver it to the corresponding
application program on the destination host.
 There are more than one protocol in the transport layer,
 Thus, each application program can use the protocol that best
matches its requirement.
31
TRANSPORT LAYER IN THE TCP/IP (2)
 Transmission Control Protocol (TCP), is a connection-oriented
protocol that first establishes a logical connection between transport
layers at two hosts before transferring data.
Connection-oriented means a connection must be established
between both ends of a transmission before either can transmit data.
Provides flow control, error control, congestion control
 User Datagram Protocol (UDP), is a connectionless protocol that
transmits user datagrams without first creating a logical connection.
 Connectionless means each user datagram is independent
without being related to previous or next one
 Stream Control Transmission Protocol (SCTP) is designed to
respond to new applications that are emerging in the multimedia.
32
APPLICATION LAYER IN THE TCP/IP (1)
 The two application layers exchange messages between each other
as though there were a bridge between the two layers.
 However, the communication is done through all the layers.
 The Hypertext Transfer Protocol (HTTP): a vehicle for
accessing the World Wide Web (WWW).
 The Simple Mail Transfer Protocol (SMTP): the main protocol
used in electronic mail (e-mail) service.
 The File Transfer Protocol (FTP): used for transferring files from
one host to another.
33
APPLICATION LAYER IN THE TCP/IP (2)
 The Terminal Network (TELNET) and Secure Shell (SSH) are
used for accessing a site remotely.
 The Simple Network Management Protocol (SNMP) is used by
an administrator to manage the Internet at global and local levels.
 The Domain Name System (DNS) is used by other protocols to
find the network-layer address of a computer.
 The Internet Group Management Protocol (IGMP) is used to
collect membership in a group.
34
Encapsulation and Decapsulation




Encapsulation at the Source Host
Decapsulation and Encapsulation at the router
Decapsulation at the Destination Host
Message -----segment/user datagram --- datagram --- frame
35
ADDRESSING
 Any communication that involves two parties needs two
addresses: source address and destination address
 Four levels of addresses are used in an internet employing the
TCP/IP protocols: physical, logical, port, and specific.
 No address required at physical layer as the unit of data
exchange is a bit which definitely cannot have any address
 There is a relationship between the layer, the address used in
that layer, and the packet name at that layer.
36
ADDRESSING
 There is a relationship between the layer, the address used in
that layer, and the packet name at that layer.
37
SPECIFIC ADDRESSING
Specific Address:
Some applications have user-friendly addresses that are designed
for that specific address.
 At the application layer, we normally use names (Specific
address) to define the site that provides services, such as
someorg.com, or the e-mail address, such as
[email protected].
These addresses, however, get changed to the corresponding
port and logical addresses by the sending computer.
38
TRANSPORT LAYER ADDRESSING
 Transport layers addresses are called port numbers, and these
define the application-layer programs at the source and
destination.
 Port numbers are local addresses that distinguish between
several programs running at the same time.
 Each application runs with a port no.(logically) on the
computer.
 This port no. for application is decided by the Kernel
of the OS.
 This port no. is called port address (address at
transport layer).
A port address is a 16-bit address represented by
one single decimal number like 753
39
LOGICAL ADDRESSING
At the network-layer, the addresses are global, with the whole
Internet as the scope.
 A network-layer address uniquely defines the connection of a
device to the Internet
 Logical addresses are necessary for universal communications that
are independent of underlying physical networks
 Physical addresses are not adequate in an internetwork environment
where different networks can have different address formats.
 A universal addressing system is needed in which each host can be
identified uniquely, regardless of the underlying physical network.
 The logical addresses are designed for this purpose.
 A logical address in the Internet is currently a 32-bit address (IPv4)
that can uniquely define a host connected to the Internet.
40
PHYSICAL ADDRESSING
Physical Address (also known as the link address /MAC address)
 is the address of a node as defined by its LAN or WAN
 is included in the frame used by the data link layer
 is the lowest-level address
 The size and format of these addresses vary depending on the
network. For example, Ethernet uses a 6-byte (48-bit) physical
address that is imprinted on the network interface card (NIC)
 written as 12 hexadecimal digits;
 every byte (2 hexadecimal digits) is separated by a colon:
07:01:02:01:2C:4B
41
Example 1
a node with physical address 10 sends a frame to a node with
physical address 87. The two nodes are connected by a link (bus
topology LAN). As the figure shows, the computer with physical
address 10 is the sender, and the computer with physical
address 87 is the receiver.
42
Multiplexing and Demultiplexing
 Multiplexing means that a protocol at a layer can encapsulate a
packet from several next-higher layer protocols (one at a time);
 Demultiplexing means that a protocol can decapsulate and
deliver a packet to several next-higher layer protocols
43
•
•
•
International Standard Organization (ISO) established in
1947 is a multinational body dedicated to worldwide
agreement on international standards
An ISO standard that covers all aspects of network
communication is the Open Systems Interconnection
(OSI) model (first introduced in 1970)
A hierar
ISO is the organization and OSI is the model
44

Principals
Create a layer where a different abstraction is needed
Each layer should perform a well-defined function
The function of each layer should be chosen
With target for standardization
Minimize information flow across layer boundaries
Number of layers
Large: distinct functions are not in the same layer
Small : architecture does not become complex
45
•
•
Consists of 7 separate but related layers, each of which
defines a part of the process of moving information across a
network
Seven layers of the OSI model
46



The OSI model provides a conceptual understanding of LAN/WAN
internetworking
Lower four layers are concerned with providing reliable end-to-end
communication
Upper three layers provide user-oriented services
47
48
Header: An information structure that precedes/leads and
identifies the information that follows, such as a block of
bytes in communication
Trailer: An information typically occupying several bytes,
at the tail end of a block of transmitted data and often
containing a checksum or other error-checking data useful
for confirming the accuracy and status of the transmission
49
PHYSICAL LAYER IN THE OSI MODEL
The physical layer is responsible for movements of
individual bits from one hop (node) to the next.
Concerned with Physical characteristics of interfaces and
medium; Representation of bits; data rate; physical
topology
50
DATA LINK LAYER IN THE OSI MODEL
The data link layer is responsible for moving
frames from one hop (node) to the next.
Error control (masking the real errors from the network
layer);How to keep a fast transmitter from drowning a slow
receiver in data (flow control); how to control access to the
shared channel (MAC)
51
Hop-to-hop delivery
52
NETWORK LAYER IN THE OSI MODEL
The network layer is responsible for the delivery of individual
packets from the source host to the destination host. It controls
the operations of the subnet
How packets are routed from source to destination; congestion
control (too many packets at subnet at the same time can form
bottlenecks); QoS issues(delay, transit time, jitter); how to allow
heterogeneous networks to be interconnected (due to different
addressing used in networks)
53
Source-to-destination delivery
54
TRANSPORT LAYER IN THE OSI MODEL
The transport layer is responsible for the delivery
of a message from one process to another; true end-toend layer
What type of services to be provided to sessions layer and
network users; error free point to point channel for
delivering the messages in the sent order; message
broadcast to multiple destinations;
55
Reliable process-to-process
delivery of a message
56
SESSION LAYER IN THE OSI MODEL
The session layer is responsible for
dialog (connection) control: keeping track of whose turn it is to
transmit; responsible for graceful close of sessions
Synchronization: checkpointing long transmissions to allow them to
pick up from where they left off in the event of a crash and subsequent
recovery
57
PRESENTATION LAYER IN THE OSI MODEL
The presentation layer is concerned with syntax and semantics
of information transmitted (how information is formatted);
responsible for translation, compression, and encryption
58
APPLICATION LAYER IN THE OSI MODEL
The application layer is responsible to allow access to network
resources
59
Summary of layers
60