Escolar Documentos
Profissional Documentos
Cultura Documentos
11.1
Group
Members
MUHAMMAD ALI
REHMAN RAFIQUE
YASIR ZIADI
06/21/15
11.2
Question to be answered ?
Why it is important to have
Datalink Layer?
06/21/15
11.3
errors occasionally.
2) Communication circuits have a
limited date rate.
3) There is a nonzero propagation
delay between the time a bit is
sent and the time it is received.
06/21/15
11.4
06/21/15
11.5
06/21/15
11.6
Framing
The transmitted bit stream by the physical
layer is not guaranteed to be error free.
It is up to the data-link layer to detect, and if
necessary, to correct errors.
The data-link layer breaks the bit stream up
into discrete frames and compute the checksum
for each frame.
When a frame arrives at the destination, the
checksum is recomputed.
06/21/15
11.7
Framing
Fixed-Size Framing
ATM Wide-area-networks
Variable-Size Framing
Local-area-networks
06/21/15
11.8
Sending machine
machine
Packet
Packet
Frame
Header
06/21/15
Header
Payload field
Trailer
11.9
Framing
The easiest way to achieve framing is to
06/21/15
11.10
Framing
Character count
06/21/15
Frame 1
Frame 2
Frame 3
4 Characters
6 Characters
2Characters
11.11
Framing
The second method uses in each frame
FLAG
06/21/15
Header
Payload field
Trailer
FLAG
11.12
06/21/15
11.13
Bit-oriented framing
Bit stuffing
(a) The original data.
(b) The data as they appear on the line.
(c) The data as they are stored in receivers memory after
unstuffing
06/21/15
11.14
Flow Control
&
Error Control
11.15
112FLOWANDERRORCONTROL
06/21/15
11.16
Flow Control
Note
06/21/15
11.17
Flow Control
06/21/15
11.18
Flow Control
11.19
Error Control
Note
06/21/15
11.20
Error Control
a.
b.
c.
06/21/15
PROTOCOLS
Now let us see how the data link layer can combine framing, flow
control, and error control to achieve the delivery of data from one
node to another. The protocols are normally implemented in
software by using one of the common programming languages. To
make our discussions language-free, we have written in pseudo
code a version of each protocol that concentrates mostly on the
procedure instead of delving into the details of language rules.
06/21/15
11.22
06/21/15
11.23
Simplest Mechanism
06/21/15
11.24
11.25
06/21/15
11.26
06/21/15
Simplest Mechanism
06/21/15
11.27
Stop-and-Wait Mechanism
06/21/15
11.28
Stop-and-Wait
Mechanism
06/21/15
11.29
06/21/15
11.30
06/21/15
11.31
06/21/15
11.32
06/21/15
11.33
06/21/15
11.34
Go Back-N Protocol
Note
06/21/15
11.35
06/21/15
11.36
Note
06/21/15
11.37
Note
06/21/15
11.38
06/21/15
11.39
Note
06/21/15
11.40
06/21/15
11.41
06/21/15
11.42
Note
06/21/15
11.43
06/21/15
11.44
06/21/15
11.45
Note
06/21/15
11.46
06/21/15
11.47
06/21/15
11.48
06/21/15
11.49
06/21/15
11.50
Note
06/21/15
11.51
06/21/15
11.52
06/21/15
11.53
06/21/15
11.54
Multiple Access
11.55
Multiple Access
06/21/15
11.56
12.57
06/21/15
RANDOMACCESS
12.58
06/21/15
Random Access
Two features:
> No schedule time for a station to transmit.
(Random access)
>No rule to specify that which station should
transmit first and then further.(contention
method)
Problem:
> The main problem that occurs due this is
collision.
06/21/15
11.59
ALOHA
06/21/15
11.60
ALOHA
There are two versions of ALOHA:
1: Pure ALOHA
2: Slotted ALOHA
06/21/15
11.61
Pure ALOHA
06/21/15
11.62
12.63
06/21/15
12.64
06/21/15
Example 12.1
12.65
06/21/15
12.66
06/21/15
12.67
06/21/15
Example 12.2
A pure ALOHA network transmits 200-bit frames on a
shared channel of 200 kbps. What is the requirement to
make this frame collision-free?
Solution
Average frame transmission time Tfr is 200 bits/200 kbps
or 1 ms. The vulnerable time is 2 1 ms = 2 ms. This
means no station should send later than 1 ms before this
station starts transmission and no station should start
sending during the one 1-ms period that this station is
sending.
12.68
06/21/15
12.69
06/21/15
Example 12.3
A pure ALOHA network transmits 200-bit frames on a
shared channel of 200 kbps. What is the throughput if the
system (all stations together) produces
a. 1000 frames per second b. 500 frames per second
c. 250 frames per second.
Solution
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1
frame per millisecond. The load is 1. In this case
S = G e2 G or S = 0.135 (13.5 percent). This means
that the throughput is 1000 0.135 = 135 frames. Only
135 frames out of 1000 will probably survive.
12.70
06/21/15
Slotted ALOHA
06/21/15
11.72
12.73
06/21/15
Note
The throughput for slotted ALOHA is
S = G eG .
The maximum throughput
Smax = 0.368 when G = 1.
S(%)=36.8
Where G=average No. of frames generated by the system during one
frame transmission time.
12.74
06/21/15
12.75
06/21/15
Example 12.4
A slotted ALOHA network transmits 200-bit frames on a
shared channel of 200 kbps. What is the throughput if the
system (all stations together) produces
a. 1000 frames per second b. 500 frames per second
c. 250 frames per second.
Solution
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1
frame per millisecond. The load is 1. In this case
S = G eG or S = 0.368 (36.8 percent). This means
that the throughput is 1000 0.0368 = 368 frames.
Only 386 frames out of 1000 will probably survive.
12.76
06/21/15
Principle of CSMA
Listen Before Talk
06/21/15
11.78
CSMA
06/21/15
11.79
12.80
06/21/15
06/21/15
11.81
12.82
06/21/15
12.83
06/21/15
CSMA/CD
06/21/15
11.84
12.85
06/21/15
12.86
06/21/15
Example 12.5
A network using CSMA/CD has a bandwidth of 10 Mbps. If
the maximum propagation time (including the delays in
the devices and ignoring the time needed to send a
jamming signal, as we see later) is 25.6 s, what is the
minimum size of the frame?
Solution
The frame transmission time is Tfr = 2 Tp = 51.2 s. This
means, in the worst case, a station needs to transmit for a
period of 51.2 s to detect the collision. The minimum size
of the frame is 10 Mbps 51.2 s = 512 bits or 64 bytes.
This is actually the minimum size of the frame for
Standard Ethernet.
12.87
06/21/15
12.88
06/21/15
12.89
06/21/15
CSMA/CA
06/21/15
11.90
12.91
06/21/15
Note
In CSMA/CA, the IFS can also be used to
define the priority of a station or a
frame.
12.92
06/21/15
Note
In CSMA/CA, if the station finds the
channel busy, it does not restart the
timer of the contention window;
it stops the timer and restarts it when
the channel becomes idle.
12.93
06/21/15
06/21/15
11.94
THANK YOU!!!
06/21/15
11.95
Chapter 27
WWW and HTTP
27.96
ARCHITECTURE
06/21/15
27.97
Architecture of WWW
06/21/15
27.98
Browser
06/21/15
27.99
URL
06/21/15
27.100
WEBDOCUMENTS
The documents in the WWW can be grouped into three broad categories: static,
dynamic, and active. The category is based on the time at which the contents of the
document are determined.
06/21/15
27.101
Static document
06/21/15
27.102
Boldface tags
06/21/15
27.103
06/21/15
27.104
06/21/15
27.105
06/21/15
27.106
06/21/15
27.107
Note
06/21/15
27.108
06/21/15
27.109
06/21/15
27.110
Note
06/21/15
27.111
HTTP
The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data
on the World Wide Web. HTTP functions as a combination of FTP and SMTP.
06/21/15
27.112
Note
06/21/15
27.113
HTTP transaction
06/21/15
27.114
06/21/15
27.115
06/21/15
27.116
Methods
06/21/15
27.117
06/21/15
27.118
06/21/15
27.119
06/21/15
27.120
06/21/15
27.121
06/21/15
27.122
06/21/15
27.123
06/21/15
27.124
Example 27.1
06/21/15
27.125
06/21/15
27.126
Example 27.2
In this example, the client wants to send data to the server. We use the POST method. The request
line shows the method (POST), URL, and HTTP version (1.1). There are four lines of headers. The
request body contains the input information. The response message contains the status line and
four lines of headers. The created document, which is a CGI document, is included as the body (see
Figure 27.17).
06/21/15
27.127
06/21/15
27.128
Example 27.3
HTTP uses ASCII characters. A client can directly connect to a server using TELNET, which logs
into port 80 (see next slide). The next three lines show that the connection is successful. We then
type three lines. The first shows the request line (GET method), the second is the header (defining
the host), the third is a blank, terminating the request. The server response is seven lines starting
with the status line. The blank line at the end terminates the server response. The file of 14,230
lines is received after the blank line (not shown here). The last line is the output by the client.
06/21/15
27.129
06/21/15
27.130
Note
06/21/15
27.131