Unit 1 and 2
Unit 1 and 2
NETWORKS
OBJECTIVES
• To and
basic
understand
• To and
understand require for
components d dat
• communication
To analyze the function and a
.
NETWORK FUNDAMENTALS
OVERVIEW
• Introduction to Networks
• Categories of Networks
• Communication Model
• Data Transmission Concepts and Terminology
• Protocol Architecture
• Protocols
• OSI
• TCP/IP
• LAN Topology
• Transmission Media
Introduction to Networks
• A Network: A group of devices that
can communicate with each other over links.
• Each device is called a host. Each host has
a unique address.
• Network is a connection between two or
more devices.
• Which is connected by a communication
links.
• A node can be computer, printer or any
other devices which is capable of sending
and receiving information at each other.
Example:
INTERNET
• An internet:
i) Business Application
ii) Home Application
iii) Mobile Users
iv) E-Mail
Categories or Types of Network
• There are Three Types:
1. LAN - Local Area Network
2. MAN - Metropolitan Area Network
3. WAN – Wide Area Network
1. LAN - Local Area Network
A LAN is Designed by Local Area Connections such
as:
i) within Building
ii) within office
iii) within Campus
iv) within Specific Place
Advantages :
1) Sharing of Files.
2) Sharing of Programs.
3) Communication Exchange.
Disadvantages :
4) Reliability.
5) Capacity.
6) High Cost.
2. MAN - Metropolitan Area Network
A Metropolitan Area Network (MAN) is a
network that interconnects users with
computer resources in a geographic area or
region larger than that covered by even a
large local area network (LAN) but smaller
than the area covered by a wide area
network (WAN).
• MAN supports up to 150 Kilometers Distance.
• Example:
Telephone Network
Cable TV
Advantages :
1) High Bandwidth.
2) It support Large number of Clients.
3) Reduce the Errors.
Disadvantages :
4) Large Space Requirements.
5) Slower Data Access.
6) High Cost.
3. WAN – Wide Area Network
• WAN Provide a Long Distance Transmission of Data.
• By Using WAN Exchange the Information from
one country to another country.
Components of Network
- Which gives the Request.
- Which gives the Response.
- It Indicates Modulator / Demodulator.
- Which identifies the Path between Client
& Server.
- Which
overcomes the Traffic
problems.
Communication Model
• Data communications are exchange of
data between two devices via some
transmission medium.
• It should be done in two ways
i) Local - It takes LAN Connection.
ii)Remote - It takes Long distance like
MAN & WAN.
• Data should be Transferred in the form of
0’s and 1’s
Transmissio
Source Destination
n Medium
i) Sender
ii) Receiver iv) Message
iii) Medium v) Protocol
5. 5.
Protocol 4.
Protocol
Step : 1 Message
Step : 1
Step : 2 Step : 2
1. Sender 3. Medium 2.
Receiver
: It is a device , that Sends
the information to the Receiver.
: It is a device , that Receives the
information from the Sender.
: It is the physical path
between Sender to Receiver.
: This is the passing
Informations.
: It is a set of rules and regulations
that “ Governed “ from data communication.
• Data Transmission occurs between sender and
receiver over some Transmission Medium or
Transmission Media.
• Transmission Media may be classified into Two
Types :
i) Guided Media [Wired Technology]
ii) Unguided Media [Wireless Technology]
i) Guided Media (Wired Network)
• In Guided Media Signals are Passed in a “
same physical path”
• Example:
i) Twisted pair Cable
ii) Coaxial Cable
iii) Fiber Optic Cable
ii) Unguided Media (Wireless Network)
• In Unguided Media Signals are Passed in
the form of “ Electromagnetic Waves”
• Example :
i) Mobile phones
ii) Satellite microwave
iii) Infrared
It Provides
a dedicated links between two devices.
• For example, a wired system that connects two
computers together can be thought of a point-
to-point link.
It is a link between
two or more devices. It is also known as Multi-
Point configuration. The networks having
multipoint configuration are called
Transmission Mode
It refers to the direction of information flow
between two devices.
Data flow is the flow of data between
2 points.
The direction of the data flow can
be described as
Simplex Mode
Half-Duplex Mode
Full-Duplex Mode
Simplex: Data flows in only one direction on
the data communication line (medium).
TIMING
Standard Organizations:
• International Standard Organization
• ANSI: American National Standards
Institute
• IEEE
• It defines the Physical (or)
Logical arrangement of Links in a
Network.
• Topology refers to the layout of connected
devices in a network.
• The Topology of the Network is
Geometric Representation of the
relationship between all Communication
links.
Physical Topology
The term physical topology refers to the way in which a network is laid out physically.: two or more devices connect to a link;
two or more links form a topology. The topologyof a network is the geometric representation of the relationship of all the links
and linking devices (usually called nodes) to one another. There are four basic topologies possible: mesh, star, bus, and ring.
Mesh:
In a mesh topology, every device has a dedicated point-to-point link to every other device. The term dedicated means that the
link carries traffic only between the two devices it connects.
Advantages Of Mesh Topology :
The use of dedicated links guarantees that each connection can carry
its own data load, thus Eliminates the traffic problems that can occur
when links must be shared by multiple devices.
Second, a mesh topology is robust. If one link becomes unusable, it
does not incapacitate the entire system.
Third, there is the advantage of privacy or security. When every
message travels along a dedicated line, only the intended recipient sees
it.
Disadvantages Of Mesh Topology : One practical example of a mesh topology is the
The amount of cabling and the number of I/O ports required. connection of telephone regional
The sheer bulk of the wiring can be greater than the available space. offices in which each regional office needs to be
The hardware required to connect each link (I/O ports and cable) can connected to every other regional office.
be prohibitively expensive.
Physical Topology
Star Topology:
In a star topology, each device has a dedicated point-to-point link only to a central controller, usually called a hub. The devices
are not directly linked to one another.
A star topology does not allow direct traffic between devices. The controller acts as an exchange: If one device wants to send
data to another, it sends the data to the controller, which then relays the data to the other connected device.
Advantages Of Star Topology :
Less Expensive
Low cabling required
robustness. If one link fails, only that link is affected.
Disadvantages Of StarTopology :
One big disadvantage of a star topology is the dependency of the
whole topology on one single point, the hub. If the hub goes down,
the whole system is dead.
Advantages Of Bus
Topology :
Ease of installation
Low cabling required
The network layer is responsible for the delivery of packets from the
original
source to the final destination.
4. Transport
Layer
• The transport layer is responsible for process-to-process
or end-end delivery of the entire message.
• The network layer oversees host-to-destination delivery of
individual packets, it does not recognize any relationship
between those packets.
• The transport layer ensures that the whole message arrives
intact and in order, overseeing both error control and flow
control at the process-to-process level.
Transport
layer
Logical Addresses
logical address in the Internet is currently a 32-bit address that can uniquely define a host
connected to the Internet. No two publicly addressed and visible hosts on the Internet can have
the same IP address
Port Addresses
The label assigned to a process is called a port address. A port address in TCPIIP is 16 bits in
length. Today, computers are devices that can run multiple processes at the same time. The end
objective of Internet communication is a process communicating with another process. For
example, computer A can communicate with computer C by using TELNET. At the same time,
computer A communicates with computer B by using the File Transfer Protocol (FTP). For these
processes to receive data simultaneously, we need a method to label the different processes
Specific Addresses
Some applications have user-friendly addresses that are designed for that specific address.
Examples include the e-mail address (for example, [email protected]) and the Universal
Resource Locator (URL) (for example, www.mhhe.com). The first defines the recipient of
an e-mail the second is used to find a document on the World Wide Web.
Line coding review
Line coding is the process of converting digital data to digital signals
At the sender, digital data are encoded into a digital signal; at the receiver, the digital data are
recreated by decoding the digital signal.
A data element is the smallest entity that can represent a piece of information: this is the
bit. In digital data communications, a signal element carries data elements. A signal
element is the shortest unit (timewise) of a digital signal.
The data rate defines the number of data elements (bits) sent in Is. The unit is bits per second
(bps). The signal rate is the number of signal elements sent in Is. The unit is the baud.
where N is the data rate (bps); c is the case factor, which varies for each case; S is the
number of signal elements; and r is the previously defined factor
Line coding review
Unipolar Scheme
In a unipolar scheme, all the signal levels are on one side of the time axis, either above or below.
NRZ (Non-Return-to-Zero):
positive voltage defines bit I and the zero voltage defines bit O.
Polar Schemes
In polar schemes, the voltages are on the both sides of the time axis
NRZ-L (NRZ-Level), the level of the voltage determines the value of the bit. In the second variation, NRZ-I
(NRZ-Invert), the change or lack of change in the level of the voltage determines the value of the bit. If
there is no change, the bit is 0; if there is a change, the bit is 1.
Return to Zero (RZ)
In RZ, the signal changes not between bits but during the bit
Can detect all single-bit errors. Can detect burst errors only if the total
number of errors in each data unit is odd.
• Increases the likelihood of detecting burst errors.
• n bits LRC can detect a burst error of n bits.
• Errors may be undetected if:
• Have even number of errors in that position.
Polynomials
A better way to understand cyclic codes and how they can be analyzed is to
represent
them as polynomials
A pattern of Os and 1s can be represented as a polynomial with
coefficients of 0 and
1. The power of each term shows the position of the bit; the
coefficient shows the value
of the bit.
Error Correction
Redundancy
Bits
Hamming Codes
• Hamming codes can be applied to the data units of any length
and uses the relationship between data and redundancy bits
• Parity Bits are always paced at 2r values.
20 21 22
1 2 3 4 5 6 7
P1 P2 d1 P3 d2 d3 d4
Calculation of Parity bit (Assume even Parity)
Example :
Let a data word is 1001101 (1,3,5,7,9,11) = (P1,1,0,1,1,1) p1=0
m=7 (2,3,6,7,10,11) = (p2,0,1,0,1) p2=1
Let us suppose if we take redundancy bits be 3
2r>= r+m+1 (4,5,6,18) = (P3,,0,0,1) p3=1
then 8 not >= 3+7+1 (8,9,10, 11) = (P4,1,0,1) p4=0
Let us suppose if we take redundancy bits be 4
2r>= r+m+1
then 16 >= 4+7+1
Means 4 parity bits are required so that the total
length of code word is
n=r+m
n=1
10 2 3 4 5 6 7 8 9 10 11
20 21 22 23
p1 p2 1 p3 0 0 1 p4 1 0 1
0 1 1 1 0 0 1 0 1 0 1
e.g The Hamming distance d(OOO, 011) is 2 because 000 XOR 011 is 011 (two Is).
Minimum Hamming Distance
The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words.
Minimum Distance for Error Detection
If our code is to detect up to s errors, the minimum distance between the valid
codes must be s + 1, so that the received codeword does not match a valid
codeword. In other words, if the minimum distance between all valid codewords
is s + 1, the received codeword cannot be erroneously mistaken for another
Codeword.
To guarantee correction of up to t errors in all cases, the minimum Hamming distance in a block
code must be dmin == 2t +1
FRAMING
• Data transmission in the physical layer means moving bits in the form of a signal from the source to the destination.
• The physical layer provides bit synchronization to ensure that the sender and receiver use the same bit durations and
timing.
• The data link layer, on the other hand, needs to pack bits into frames, so that each frame is distinguishable from another.
Types of Framing
Framing can be of two types, fixed sized framing and variable sized framing.
Fixed-sized Framing
Here the size of the frame is fixed and so the frame length acts as delimiter of the
frame. Consequently, it does not require additional boundary bits to identify the
start and end of the frame.
Example − ATM cells.
Problem may be same that flag may merge with the data specially
photographs or songs
3. Flags bits with bit stuffing :
Each frame begins and end with a special bit pattern 01111110 or 0*7E in hexadecimal . This
pattern ins a flag byte. Whenever the sender’s data link layer encounters five consecutive 1s
in the data it automatically stuff a 0 bit in the outgoing bit stream.
Flow Control
Flow control coordinates the amount of data that can be sent before receiving acknowledgement
It is one of the most important functions of data link layer.
Flow control is a set of procedures that tells the sender how much data it can transmit before it
must wait for an acknowledgement from the receiver.
Receiver has a limited speed at which it can process incoming data and a limited amount of
memory in which to store incoming data.
Receiver must inform the sender before the limits are reached and request that the transmitter to
send fewer frames or stop temporarily.
Since the rate of processing is often slower than the rate of transmission, receiver has a block of
memory (buffer) for storing incoming data until they are processed.
Error Control
Error control includes both error detection and error correction.
It allows the receiver to inform the sender if a frame is lost or damaged during transmission and
coordinates the retransmission of those frames by the sender.
Error control in the data link layer is based on automatic repeat request (ARQ). Whenever an error
is detected, specified frames are retransmitted.
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 protocols use the above concepts-
Go-back-N ARQ
Selective Repeat ARQ
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.
Go-Back-N ARQ
• The most popular ARQ protocol is the go-back-N ARQ, where the sender sends
the frames continuously without waiting for acknowledgement.
• As the receiver receives the frames, it keeps on sending ACKs or a NACK, in case
a frame is incorrectly received. When the sender receives a NACK, it retransmits
the frame in error plus all the succeeding frames. Receiver sends positive ACK if
a frame arrived safe and in order.
• If the frames are damaged/out of order, receiver is silent and discard all
subsequent frames until it receives the one it is expecting.
Go-Back-N ARQ
• The silence of the receiver causes the timer of the unacknowledged frame to
expire.
• Then the sender resends all frames, beginning with the one with the expired
timer.
• For example, suppose the sender has sent frame 6, but the timer for frame 3
expires (i.e. frame 3 has not been acknowledged), then the sender goes back
and sends frames 3, 4, 5, 6 again. Thus it is called Go-Back-N-ARQ
• The receiver does not have to acknowledge each frame received, it can send one
cumulative ACK for several frames.
Sequence Numbers
Frames from a sender are numbered sequentially.
We need to set a limit since we need to include the sequence
number of each frame in the header.
If the header of the frame allows m bits for sequence number, the
sequence numbers range from 0 to 2 m – 1. for m = 3, sequence
numbers are:0, 1, 2, 3, 4, 5, 6, 7.
We can repeat the sequence number.
Sequence numbers are:
0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, …
SlidingWindow
Sender can send several frames
before
needing an
◦acknowledgement.
The link can carry several frames at
◦Advantages:
Its capacity can be used
once.
efficiently.
Sliding window
ARQ
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. It 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.
HDLC
• Flag field: The flag field of an HDLC frame is an 8-bit sequence with the bit pattern
01111110 that identifies both the beginning and the end of a frame and serves as a
synchronization pattern for the receiver.
• Address field: The second field of an HDLC frame contains the address of the secondary
station. If a primary station created the frame, it contains to address. If a secondary
creates the frame, it contains from address.
Control field:
• The control field determines the type of frame and defines its functionality.
• The control field is a 1- or 2-byte segment of the frame used for flow and error
control.
• The interpretation of bits in this field depends on the frame type.
Control Field for I-Frames
I-frames are designed to carry user data from the network used piggybacking too.
The first bit defines the type. If the first bit of the control field is 0, this means the
frame is an I-frame. The next 3 bits, called N(S) (no of frame to be sent), define the
sequence number of the frame. The last 3 bits, called N(R)(sequence no of next frame
to be send), correspond to the acknowledgment number when piggybacking is used.
The single bit between N(S) and N(R) is called the P/F bit. The P/F field is a single bit
with a dual purpose. It has meaning only when it is set (bit = 1) and can mean poll or
final. It means poll when the frame is sent by a primary station to a secondary . It
means final when the frame is sent by a secondary to a primary .
Control field for Supervisory frames
• If the first 2 bits of the control field is 10, this means the frame is an S-frame. The
last 3 bits, called N(R), corresponds to the acknowledgment number (ACK) or
negative acknowledgment number (NAK) depending on the type of S-frame.
• The 2 bits called code is used to define the type of S-frame itself. With 2 bits, we
can have four types of S-frames, as described below:
a) Receive ready (RR): If the value of the code subfield is 00, it is an RR S-frame. RR
frame acknowledges the receipt of a safe and sound frame or group of frames.
b) Receive not ready (RNR): If the value of the code subfield is 10, it is an RNR S-
frame. It acknowledges the receipt of a frame or group of frames, and it announces
that the receiver is busy and cannot receive more frames.
c) Reject (REJ): If the value of the code subfield is 01, it is a REJ S-frame. It is a NAK
that can be used in Go-Back-N ARQ to improve the efficiency of the process by
informing the sender, before the sender time expires, that the last frame is lost or
damaged.
d) Selective reject (SREJ): If the value of the code subfield is 11, it is an SREJ S-
frame. This is a NAK frame used in Selective Repeat ARQ. The value of N(R) is the
negative acknowledgment number.
Control field for U -frame :
codes are divided into two sections: a 2-bit prefix before the P/F bit and a 3-bit
suffix after the P/F bit. Together, these two segments (5 bits) can be used to create
up to 32 different types ofU-frames
Point - to - Point Protocol (PPP)
Encapsulation Component − It encapsulates the datagram so that it can be transmitted over the specified
physical layer.
Link Control Protocol (LCP) − It is responsible for establishing, configuring, testing, maintaining and
terminating links for transmission. It also imparts negotiation for set up of options and use of features by the
two endpoints of the links.
Authentication Protocols (AP) − These protocols authenticate endpoints for use of services. The two
authentication protocols of PPP are −
Flag − 1 byte that marks the beginning and the end of the frame. The bit pattern of the flag is
01111110.
Protocol − 1 or 2 bytes that define the type of data contained in the payload field.
Payload − This carries the data from the network layer. The maximum length of the payload
field is 1500 bytes. However, this may be negotiated between the endpoints of communication.
FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard code
used is CRC (cyclic redundancy code)
Byte Stuffing in PPP Frame − Byte stuffing is used is PPP payload field
whenever the flag sequence appears in the message, so that the receiver does not
consider it as the end of the frame. The escape byte, 01111101, is stuffed before
every byte that contains the same byte as the flag byte or the escape byte. The
receiver on receiving the message removes the escape byte before passing it onto
the network layer.
Differences Between High-level Data Link Control (HDLC)
and Point-to-Point Protocol (PPP)
S.NO HDLC PPP
1. HDLC stands for High-level Data Link Control. PPP stands for Point-to-Point Protocol.
4. Dynamic addressing is not offered by HDLC. While in this Dynamic addressing is offered.
5. HDLC is used in synchronous media. PPP is used in synchronous media as well as asynchronous media.
6. HDLC is not compatible with non-Cisco devices. PPP is compatible with non-Cisco devices.
7. HDLC does not provide link authentication. While PPP provide link authentication using various protocols.