Professional Documents
Culture Documents
Chapter Two (Data)
Chapter Two (Data)
Chapter two
Categories of Networks
Size: LAN, MAN, WAN
LAN is confined to limited geographical area , one type of transmission medium,
speeds between 100-1000Mbs , coverage few kilometers
WAN : large geographical area coverage eg. Internet
MAN: size b/n LAN and WAN, usually inside town or city .
Advantages Disadvantages
Use less expensive computer hardware Not very secure
Easy to administer, setup and low cost No central point of storage or file archiving
No NOS required Additional load on PC b/c of resource sharing
More built in redundancy Hard to maintain version control
Client –Server
Certain computers act as server and other act as clients
Server is a computer which provides service to other computers
Client is a computer which requests a service .
Advantages Disadvantages
Very secure requires professional administration
Better performance More hardware-intensive
Centralized backup More software intensive
very reliable Expensive dedicated software
Network Model:
Alice Bob
The
Intern
An exchange using the OSI model:
Physical Layer:
The data link layer is responsible for moving frames from one
node to the next.
Functions of Data Link Layer:
Framing:- divides the data from N/W layer into frames.
Feedback:- after transmitting the frames, the system waits for the
feedback.
Network Layer:
Functions of Network layer:
It is responsible for the source to destination delivery of a
packets across multiple networks.
Creation of data
Segmentation and encapsulation
Generation of the data onto the media at the network access layer of
the stack.
Transportation of the data through the internetwork.
Reception of the data at the network access layer of the destination
end device.
Decapsulation and reassembly of the data as it passes up the stack in
the destination device.
Passing this data to the destination application layer .
TCP/IP (cont)
All the above process have been shown in figure
TCP/IP (cont’)
Protocol Data Unit (PDU). The form that a piece of data takes at
any layer. At each stage of the process, a PDU has a different name
to reflect its new appearance.
Data: The general term for the PDU used at the Application layer
Segment: Transport Layer PDU
Packet: Internetwork Layer PDU
Frame: Network Access Layer PDU
Bits: A PDU used when physically transmitting data over the
medium
Application Layer:
This layer is the combination of Application, Presentation and
Session layer of the OSI model.
This layer provides various services to different user
applications.
Application layer includes several high-level protocols that are
used for wide variety of applications like:
TELNET(Terminal Network): Used for remote login.
FTP(File Transfer Protocol): For transfer of file from one
system to another.
HTTP(Hyper Text Transfer Protocol): For fetching web
pages on world wide web(www).
Transport Layer:
Useful in real time data transfer and quick transfer of large data.
In OSI Data Link layer and Physical layer are separate layers.
In TCP Data Link layer and Physical layer are combined as one
in Host-to-Network layer.
Stop-and-Wait
Go-Back-N ARQ
Selective-Repeat ARQ
Sender keeps a copy of the last frame
Stop-and-Wait
When a receiver
receives a damaged
frame, it discards it
and keeps its value
of R.
After the timer at the
sender expires,
another copy of
frame 1 is sent.
Stop-and-Wait, lost ACK frame
• If the sender
receives a damaged
ACK, it discards it.
• When the timer of
the sender expires,
the sender
retransmits frame 1.
• Receiver has
already received
frame 1 and
expecting to receive
frame 0 (R=0).
Therefore it
discards the second
copy of frame 1.
Stop-and-Wait, delayed ACK frame
• The ACK can be
delayed at the
receiver or due to
some problem
• It is received after the
timer for frame 0 has
expired.
• Sender retransmitted
a copy of frame 0.
However, R =1 means
receiver expects to
see frame 1. Receiver
discards the duplicate
frame 0.
• Sender receives 2
ACKs, it discards the
second ACK.
Piggybacking
• A method to
combine a data
frame with ACK.
• Station A and B
both have data to
send.
• Instead of sending
separately, station A
sends a data frame
that includes an
ACK.
• Station B does the
same thing.
• Piggybacking saves
bandwidth.
Disadvantage of Stop-and-Wait
• In stop-and-wait, at any point in time, there
is only one frame that is sent and waiting to
be acknowledged.
• This is not a good use of transmission
medium.
• To improve efficiency, multiple frames should
be in transition while waiting for ACK.
• Two protocol use the above concept,
– Go-Back-N ARQ
– Selective Repeat ARQ
Go-Back-N ARQ
Accepts
as the 1st
frame in
the next
cycle-an
error
Selective Repeat ARQ, sender and receiver
windows
• Go-Back-N ARQ simplifies the process at the receiver site. Receiver only
keeps track of only one variable, and there is no need to buffer out-of-order
frames, they are simply discarded.
• However, Go-Back-N ARQ protocol is inefficient for noisy link. Its bandwidth
inefficient and slows down the transmission.
• In Selective Repeat ARQ, only the damaged frame is resent. More
bandwidth efficient but more complex processing at receiver.
• It defines a negative ACK (NAK) to report the sequence number of a
damaged frame before the timer expires.
Selective Repeat ARQ, lost frame• Frames 0 and 1
are accepted
when received
because they
are in the range
specified by the
receiver
window. Same
for frame 3.
• Receiver sends
a NAK2 to show
that frame 2
has not been
received and
then sender
resends only
frame 2 and it
is accepted as it
is in the range
of the window.
Selective Repeat ARQ, sender window size
• Size of the sender and receiver windows must be at most one-half of 2 m.
• If m = 2, window size should be 2 m /2 = 2. Fig compares a window size of 2
with a window size of 3. Window size is 3 and all ACKs are lost, sender sends
duplicate of frame 0, window of the receiver expect to receive frame 0 (part
of the window), so accepts frame 0, as the 1st frame of the next cycle – an
error.