Data Link Layer
Download
Report
Transcript Data Link Layer
Network Architectures
• A reference model that describes the layers of
hardware and software necessary to transmit data
between two points or for multiple devices /
applications to interoperate
• Reference models are necessary to increase likelihood
that different components from different
manufacturers will converse
• Two models to learn: OSI model and TCP/IP protocol
1
suite
Network Architectures
• A network architecture, or communications model,
places the appropriate network pieces in layers.
• The layers define a model for the functions or services
that need to be performed.
• Each layer defines what services either the hardware or
software (or both) provides.
• the layers work together to allow an application to send
its data over a network of computers.
• The TCP/IP protocol suite is currently used on the
Internet, while the OSI model is a theoretical model.
2
Network Architectures
• The OSI model’s seven layers:
3
Network Architectures - OSI
• Application layer – where the application using the
network resides. Common network applications include
web browsing, e-mail, file transfers, and remote logins
• Presentation layer – performs a series of miscellaneous
متنوعةfunctions necessary for presenting the data
package properly to the sender or receiver
• Session layer – responsible for establishing sessions
between users. manages a session by initiating the
opening and closing of sessions between end-user
application processes.
4
Network Architectures - OSI
• Transport layer – provides an end-to-end error-free network
connection. Makes sure the data arrives at the destination exactly
as it left the source.
– includes error control information in case one packet from a sequence of
packets does not arrive at the final destination, and packet sequencing
information so that all the packets stay in the proper order.
– We say that the transport layer performs end-to-end error control and end-toend flow control. This means the transport layer is not in use while the data
packet is hopping from point to point within the network—it is used only at
the two endpoints of the connection
• Network layer – responsible for creating, maintaining and ending
network connections. Transfers a data packet from node to node
within and between networks.
5
Network Architectures - OSI
– As Network layer sends the packet from node to node, it generates the
network addressing necessary for the system to recognize the next intended
receiver.
• Data link layer – responsible for taking the data and transforming it
into a frame with header, control and address information, and error
detection code
– The Data link layer might also perform flow control. In a large network where
the data hops from node to node as it makes its way across the network, flow
control ensures that one node does not overwhelm the next node with too
much data.
– operations are quite similar to some of the transport layer operations. The
primary difference is that the transport layer might perform its operations only
at the endpoints, while the network access layer performs its operations at
every stop (node) along the path.
• Physical layer – handles the transmission of bits over a
communications channel. Includes voltage levels, connectors,
media choice, modulation techniques (digital or analog data is encoded
6 or
modulated onto a digital or analog signal ).
THE SEVEN OSI REFERENCE MODEL LAYERS
Each layer defines a family of function distinct from those of
the other layers.
7
An Exchange Using the OSI Model
8
Physical Layer
• Coordinates the function required to
transmit a bit stream over a physical
medium.
• Defines the procedures and function that
physical devices and interfaces have to
perform for transmission to occur.
9
Physical Layer
10
Physical layer concerns
• Physical characteristics of interface and media. The physical
layer defines the characteristics of the interface between
devices and the transmission medium. It also defines the type
of the transmission media such as copper wires or fiber optic
cables.
• Representation of bit.
The physical layer defines the type of encoding (how 0s and 1s
are changed to signals)
• Data rate: The number of bits send per second.
• Synchronization of bits: The sender and the receiver clocks must be
synchronized.
• Transmission mode.
The physical layer also defines the direction of transmission
between two devices (the direction of signal flow). Simplex, Half
11
duplex or Full duplex
Physical layer concerns
• Line configuration.
The physical layer is concerned with the connection of devices to the
medium. In a point-to-point configuration, two devices are connected
through a dedicated link. In a multipoint configuration, a link is
shared among several devices.
• Physical topology.
The physical topology defines how devices are connected to make a
network. Devices can be connected by using:
–
–
–
–
–
a mesh topology (every device is connected to every other device),
a star topology (devices are connected through a central device),
a ring topology (each device is connected to the next, forming a ring),
a bus topology (every device is on a common link),
or a hybrid topology (this is a combination of two or more topologies).
12
Mesh topology
13
Data Link Layer
Transforms the physical layer, a raw
transmission facility, to a reliable link
and it responsible for node-to-node
delivery.
14
Data Link Layer
15
Data Link layer responsibilities
• Framing: The data link layer divides the stream of
bits received from the network layer into manageable
data units called frames.
• Physical addressing: The data link layer adds a header to
the frame to define the physical address of the sender (source
address) and/or receiver (destination address) of the frame.
– Ex: A media access control address (MAC address) is a unique
identifier assigned to network interfaces for communications on the
physical network segment.
– MAC addresses are most often assigned by the manufacturer of
a network interface controller (NIC) and are stored in its hardware
– The standard format for MAC addresses is six groups of
two hexadecimal digits. e.g. 01-23-45-67-89-ab or 01:23:45:67:89:ab
16
Data Link layer responsibilities
• Flow control: If the rate at which the data are absorbed
by the receiver is less than the rate produced in the
sender, the data link layer impose a flow control
mechanism to prevent overwhelming the receiver.
• Error control: The data link layer adds reliability to the
physical layer by adding mechanism to detect and
retransmit damage or lost frames and prevent
duplication of frames.
• Access control: When two or more devices are
connected to the same link, data link layer protocols are
necessary to determine which device has control over
the link at any given time.
17
Data Link layer
18
Network layer
• Responsible for the source-to-destination
delivery of a packet possibly across
multiple networks (links).
• The network layer ensures that each
packet gets from its point of origin to its
final destination.
19
Network Layer
Original source
Final destination
20
Network layer responsibilities
• Logical addressing:
– The network layer adds a header to the packet
coming from the upper layer, includes the logical
addresses of the sender and receiver.
• Routing:
– When independent networks or link are connected
together to create an internetwork ( a network of
networks) the connecting devices (router or
gateways) route the packet to their final
destination Using network layer logical addresses
in each packet
21
Network Layer Example
22
Network Layer Example
23
Transport layer
• Responsible for source-to-destination
(end-to-end) delivery of the entire
message.
• Ensure that the whole message arrives
intact and in order.
• Transport layer, may create a
connection between the two end port.
24
Transport layer responsibilities
• Service-point addressing: gets the entire message to the
correct process on that computer, not only from one computer
to the next but also from specific process on the other.
• Segmentation and reassembly: divides the message into
segments, each segment containing a sequence number, these
numbers enable the T.L to reassemble the message when it
arrived correctly.
• Connection control:
– Connectionless : each segment is an independent
packet. data is sent from one end point to another
without prior connection. No guarantees that data will
arrive in the proper sequence
– Connection-oriented: make a connection with the
transport layer on the receiving machine before
delivering the packets. it guarantees that data will arrive
25
in the proper sequence.
Transport layer responsibilities
• Flow control: end-to-end flow control
• Error control: the sending transport layer
makes sure that the entire message
arrives at the receiving transport layer
without error (damage, loss,…)
26
Transport Layer
27
28
Transport Layer Example
29
Session layer
Is the next dialog controller, it establishes,
maintain, and synchronizes the interaction
between communicating systems.
30
Session layer responsibilities
• Dialog control:
The Session layer allows two systems to enter into
dialog. Allows the communication between two
processes to take place either in half-duplex (one
way at a time) or full-duplex ( two ways at a time)
• Synchronization:
Session layer allows a process to add checkpoints
(synchronization points) into a stream of data.
31
Session Layer
32
Presentation layer
Is concerned with the syntax and
semantics of the information exchanged
between two systems.
33
Presentation layer responsibilities
• Translation:
• before being transmitted, information in the form of characters
and numbers should be changed to bit streams.
Presentation layer is responsible for interoperability التوافقية
between different encoding methods. As different computers
use different encoded methods it translate
• Encryption:
– A system must be able to assure privacy.
– Encryption means, that the sender transforms the original
information to another form and sends the resulting
message out over the network.
• Compression:
Data compression reduce the number of bits to be transmitted.
34
Presentation Layer
35
Application layer
The application layer enables the user,
wither human or software, to access the
network. It provides user interfaces and
support for services, such as electronic
mail, remote file access and transfer….
36
Application layer services
• Network Virtual Terminal.
– Network virtual terminal is a software version of a physical
terminal and allows a user to log on a remote host.
• File transfer, Access, and management (FTAM)
– This application allows a user to access files in a remote
computer, to retrieve file files from a remote computers.
• Mail Services.
– This application provides the basis for e-mail forwarding and
storage.
• Directory services
– This application provides distributed database sources and
access for global information about various objects and
services.
37
Application Layer
38
Summary of Layer Functions
39
40
Chapter One - Introduction to Computer
Networks And Data Communications
Network Architectures
• The TCP/IP protocol suite (Internet model):
41
Chapter One - Introduction to Computer
Networks And Data Communications
Network Architectures – TCP/IP
• Application layer – equivalent to OSI’s application
and presentation layers
• Transport layer – equivalent to OSI’s transport layer
• Network (Internet or internetwork) layer – equivalent
to OSI’s network layer
• Network access (data link/physical) layer –
equivalent to OSI’s data link and physical layers
42
Chapter One - Introduction to Computer
Networks And Data Communications
Network Architectures
• Logical and physical connections – A logical
connection is one that exists only in the software,
while a physical connection is one that exists in the
hardware
• Note that in a network architecture, only the lowest
layer contains the physical connection, while are
higher layers contain logical connections
43
Logical and physical connections
44
The TCP/IP protocol suite in action
• Note the flow of data from user to web browser and
back
• At each layer, information is either added or
removed, depending on whether the data is leaving or
arriving at a workstation
• The adding of information over pre-existing
information is termed encapsulation
45
TCP/IP model in summary
HTTP
SNMP
Network layer
Network access layer
46
frequently used applications in
application layer
• The TCP/IP application layer includes several
frequently used applications:
– Hypertext Transfer Protocol (HTTP) to allow Web browsers
and servers to send and receive World Wide Web pages
– Simple Mail Transfer Protocol (SMTP) to allow users to send
and receive electronic mail
– File Transfer Protocol (FTP) to transfer files from one
computer system to another
– Telnet to allow a remote user to log in to another computer
system
– Simple Network Management Protocol (SNMP) to allow the
numerous elements within a computer network to be
managed from a single point
47
Protocol Layering:
The Internet is build this way
• Internet Protocol (IP) provides a way to
deliver packets to a destination
SSH, FTP, HTTP, SMTP
DNS, VoIP
TCP
UDP
Internet Protocol
48
Internet (IP) addresses
[email protected] (email)
http://www.apoptygma.eu.org (www)
ftp://ftp.uk.debian.org (file transfer)
telnet://towel.blinkenlights.nl (telnet)
144.32.100.24
These are the IP addresses
148.122.211.110 of the above sites. IP addresses
195.224.53.39 are 32 bits grouped into 4 octets.
(Octet = 8 bits – a number from
62.250.7.101
0-255)
49
Three different kinds of addresses
– Host names (e.g., www.cnn.com)
– IP addresses (e.g., 64.236.16.20)
– MAC addresses (e.g., 00-15-C5-49-04-A9)
– Ports: Each process that wants to communicate
with another process identifies itself to the TCP/IP
protocol suite by one or more ports. A port is a 16bit number, used by the host-to-host protocol to
identify to which higher level protocol or application
program (process) it must deliver incoming
messages
50
MAC Address vs. IP Address
• MAC addresses
– Hard-coded in read-only memory when adaptor is
built
– Like a social security number
– Flat name space of 48 bits (e.g., 00-0E-9B-6E-49-76)
– Portable, and can stay the same as the host moves
– Used to get packet between interfaces on same
network
• IP addresses
51
–
–
–
–
Configured, or learned dynamically
Like a postal mailing address
Hierarchical name space of 32 bits (e.g., 12.178.66.9)
51
Not portable, and depends on where the host is
attached
Protocol Layering:
The Internet is build this way
• TCP—Transmission Control Protocol, reliable
connect-oriented transfer of a byte stream.
• TCP uses packets to maintain connections”
across a network, and thus is layered above IP.
SSH, FTP, HTTP, SMTP
DNS, VoIP
TCP
UDP
Internet Protocol
52
Transmission Control Protocol
• TCP is connection-oriented.
• HTTP is an application layer protocol which uses TCP as its
transport.
• Each host has a very formal way of ensuring the accuracy of
the message it receives in a connection-oriented transport.
• Being connection-oriented introduces a guarantee of reliability
in the connection.
• Reliability – every byte of data is guaranteed to be received at
the other end.
• Data can be lost in the intermediate network. TCP adds support
to detect errors or lost data and to trigger retransmission until
the data is correctly and completely received.
53
Protocol Layering:
The Internet is build this way
• UDP—User Datagram Protocol, best-effort connectionless transfer of
individual messages.
• UDP just sends or receives raw packets with a best-effort approach, also
layered above IP
• It adds no reliability, flow-control, or error recovery to IP. It simply serves
as a multiplexer/demultiplexer for sending and receiving datagrams, using
ports to direct the datagrams
SSH, FTP, HTTP, SMTP
DNS, VoIP
TCP
UDP
Internet Protocol
54
55
Protocol Layering:
The Internet is build this way
• SSH, FTP, HTTP, SMTP and many more
applications use TCP connections to
communicate data back and forth
SSH, FTP, HTTP, SMTP
DNS, VoIP
TCP
UDP
Internet Protocol
56
Protocol Layering:
The Internet is build this way
• DNS, VoIP, and many more applications use
UDP packets to communicate data
– DNS : A domain name system server translates a
human readable domain name (such as
example.com) into a numerical IP address
SSH, FTP, HTTP, SMTP
DNS, VoIP
TCP
UDP
Internet Protocol
57
Layers in the Example
HTTP
HTTP protocol
HTTP
TCP
TCP protocol
TCP
IP
Ethernet
Ethernet
argon.tcpiplab.edu
128.143.137.144
58
IP
IP protocol
Ethernet
IP protocol
Ethernet
Ethernet
router71.tcpip- router137.tcpiplab.edu
lab.edu
128.143.137.1
128.143.71.1
00:e0:f9:23:a8:20
IP
Ethernet
neon.tcpip-lab.edu
128.143.71.21
58
Layers in the Example
HTTP
TCP
IP
Frame is an IP
datagram
Ethernet
Send HTTP Request
to neon
Establish a connection to 128.143.71.21 at
port 80Open TCP connection to
128.143.71.21 port 80
IP datagram is a TCP
segment for port 80
Send
IP data-gram
to
Send a datagram (which
contains
a connection
Send IP datagram
to
IP
128.143.71.21
request) to 128.143.71.21
128.143.71.21
Frame is an IP
datagram
Send the datagram to 128.143.137.1
Ethernet
Ethernet
HTTP
TCP
IP
Send the datagram
Ethernet
to 128.143.7.21
argon.tcpipneon.tcpip-lab.edu
router71.tcpip- router137.tcpipSend Ethernet frame
Send Ethernet frame
lab.edu
128.143.71.21
lab.edu
to 00:20:af:03:98:28
to 00:e0:f9:23:a8:20 lab.edu
128.143.137.144
128.143.137.1
128.143.71.1
00:e0:f9:23:a8:20
59
59
Layers and Services
• Service provided by TCP to HTTP:
– reliable transmission of data over a logical
connection
• Service provided by IP to TCP:
– unreliable transmission of IP datagrams across
an IP network
• Service provided by Ethernet to IP:
– transmission of a frame across an Ethernet
segment
• Other services:
60
– DNS: translation between domain names and IP addresses
– ARP: Translation between IP addresses and MAC addresses
60
Sending a packet from Argon to Neon
argon.tcpip-lab.edu
"Argon"
128.143.137.144
neon.tcpip-lab.edu
"Neon"
128.143.71.21
router137.tcpip-lab.edu
"Router137"
128.143.137.1
router71.tcpip-lab.edu
"Router71"
128.143.71.1
Router
Ethernet Network
61
Ethernet Network
61
is notArgon
on my local
Sending128.143.71.21
a packet from
to network.
Neon
Therefore, I need to send the packet to my
128.143.71.21
on my local
network.
default
gateway withisaddress
128.143.137.1
DNS:
DNS:
The is
IPisthe
address
address
of
Therefore, I can send the packet directly.
ARP:What
What
theIPMAC
of“neon.tcpip-lab.edu”
“neon.tcpip-lab.edu”?
is of
address
128.143.137.1?
ARP:
TheofMAC
address
128.143.71.21
128.143.137.1 is 00:e0:f9:23:a8:20
argon.tcpip-lab.edu
"Argon"
128.143.137.144
ARP: What is the MAC
ARP:
TheofMAC
address of
address
128.143.71.21?
128.143.137.1 is neon.tcpip-lab.edu
00:20:af:03:98:28
"Neon"
128.143.71.21
router137.tcpip-lab.edu
"Router137"
128.143.137.1
router71.tcpip-lab.edu
"Router71"
128.143.71.1
Router
frame
Ethernet Network
62
frame
Ethernet Network
62
• DNS – Domain Name System
• DNS is the application that turns our web
site addresses into Internet Protocol
addresses.
• Like an operator, given a name it will
return a phone number.
63
Chapter One - Introduction to Computer
Networks And Data Communications
64