CN Unit - 1
CN Unit - 1
Unit-1
Introduction
Introduction
• The old model of a single computer serving all of the organization’s
computational needs has been replaced by one in which a large
number of separate but interconnected computers do the job. These
systems are called computer networks.
• Two computers are said to be interconnected if they are able to
exchange information. The connection need not be via a copper wire;
fiber optics, microwaves, infrared, and communication satellites can
also be used.
• They are usually connected together to make larger networks, with
the Internet being the most well-known example of a network of
networks.
USES OF COMPUTER NETWORKS
• Business Applications : • Mobile Users :
1. resource sharing 1. Text messaging or texting
2. client-server model 2. Smart phones,
3. communication medium 3. GPS (Global Positioning System)
4. Desktop sharing 4. NFC (Near Field Communication)
2. Telnet – Remote terminal protocol (For Reassembly segments into the original chunk
remote login on any other computer on the Provide further the functions such as reordering
network) and data resend
3. SMTP – Simple Mail Transfer Protocol (For • Offering a reliable byte-stream delivery service
mail transfer) • Functions the same as the Transport layer in OSI
4. HTTP – Hypertext Transfer Protocol (For Web • Synchronize source and destination computers to
browsing) set up the session between the respective
5. Encompasses same functions as these OSI computers
Model layers Application Presentation
Session
3. Internet Layer 4. Data link Layer and Physical
• The network layer, also called Layer
the internet layer, deals with • The Host-to-network layer is the
packets and connects lowest layer of the TCP/IP
independent networks to reference model.
transport the packets across • It combines the link layer and
network boundaries. the physical layer of the ISO/OSI
• The network layer protocols are model.
the IP and the Internet Control • At this layer, data is transferred
Message Protocol (ICMP), which between adjacent network
is used for error reporting. nodes in a WAN or between
nodes on the same LAN.
A Comparison of the OSI and TCP/IP Reference Models
• OSI(Open System Interconnection) • TCP/IP(Transmission Control Protocol / Internet
Protocol)
1. OSI is a generic, protocol-independent
1. TCP/IP model is based on standard protocols
standard, acting as a communication around which the Internet has developed. It is a
gateway between the network and end-user. communication protocol, which allows the
2. It has 7 layers connection of hosts over a network.
2. It has 4 layers
3. Follows vertical approach.
3. Follows horizontal approach.
4. OSI model has a separate Presentation layer
and Session layer. 4. TCP/IP does not have a separate Presentation
layer or Session layer.
5. Transport Layer is Connection Oriented. 5. Transport Layer is both Connection-Oriented and
6. Network Layer is both Connection-Oriented Connectionless.
and Connectionless. 6. Network Layer is Connectionless.
7. Protocols are hidden in the OSI model and 7. In TCP/IP replacing protocol is not easy.
are easily replaced as the technology
changes.
EXAMPLE NETWORKS : The Internet
• The Internet has revolutionized many aspects of our daily lives.
• It has affected the way we do business as well as the way we spend
our leisure time.
• Perhaps you've sent electronic mail (e-mail) to a business associate,
paid a utility bill, read a newspaper from a distant city, or looked up a
local movie schedule-all by using the Internet. Or
• Maybe you researched a medical topic, booked a hotel reservation,
chatted with a fellow Trekkie, or comparison-shopped for a car.
• The Internet is a communication system that has brought a wealth of
information to our fingertips and organized it for our use.
A Brief History : The ARPANET
• In the mid-1960s, mainframe computers in research organizations were standalone
devices.
• Computers from different manufacturers were unable to communicate with one
another.
• The Advanced Research Projects Agency (ARPA) in the Department of Defense
(DoD) was interested in finding a way to connect computers so that the
researchers they funded could share their findings, thereby reducing costs and
eliminating duplication of effort.
• In 1967, at an Association for Computing Machinery (ACM) meeting, ARPA
presented its ideas for ARPANET, a small network of connected computers.
• The idea was that each host computer would be attached to a specialized
computer, called an interface message processor (IMP). The IMPs, in tum, would
be connected to one another. Each IMP had to be able to communicate with other
IMPs as well as with its own attached host. By 1969, ARPANET was a reality.
Physical Layer
• The physical layer is the
foundation on which the
network is built.
• The properties of different
kinds of physical channels
determine the performance
(e.g., throughput, latency, and
error rate)
GUIDED TRANSMISSION MEDIA
• The purpose of the physical layer is to
transport bits from one machine to
another.
• Various physical media can be used for the
actual transmission.
• Each one has its own niche in terms of
bandwidth, delay, cost, and ease of
installation and maintenance.
• Media are roughly grouped into guided
media, such as copper wire and fiber
optics, and
• unguided media, such as terrestrial
wireless, satellite, and lasers through the
air.
Twisted Pairs
• A twisted pair consists of two conductors
(normally copper), each with its own
plastic insulation, twisted together.
• One of the wires is used to carry signals to
the receiver, and the other is used only as
a ground reference.
• Unshielded Versus Shielded Twisted-Pair
Cable
1. The most common twisted-pair cable
used in communications is referred to as
unshielded twisted-pair (UTP). Applications
2. STP cable has a metal foil or braided mesh • Twisted-pair cables are used in
covering that encases each pair of insulated telephone lines to provide voice and
conductors. data channels.
Coaxial Cable
• Coaxial cable (or coax) carries signals of
higher frequency ranges than those in
twisted pair cable.
• coax has a central core conductor of solid
or stranded wire (usuallycopper) enclosed
in an insulating sheath, which is, in turn,
encased in an outer conductor of metal
foil, braid, or a combination of the two.
• The most common type of connector used today is the
• The outer metallic wrapping serves both Bayone-Neill-Concelman (BNe), connector.
as a shield against noise and as the Applications
second conductor, which completes the • Coaxial cable was widely used in analog telephone
circuit. networks,digital telephone networks
• This outer conductor is also enclosed in • Cable TV networks also use coaxial cables.
an insulating sheath, and the whole cable • Another common application of coaxial cable is in traditional
is protected by a plastic cover. Ethernet LANs
Fiber-Optic Cable
• A fiber-optic cable is made of glass or plastic and transmits signals in the form of
light.
• Light travels in a straight line as long as it is moving through a single uniform
substance.
• Optical fibers use reflection to guide light through a channel.
• A glass or plastic core is surrounded by a cladding of less dense glass or plastic.
Applications
• Fiber-optic cable is often found in backbone networks because its widebandwidth is
cost-effective..
• Some cable TV companies use a combination of optical fiber and coaxialcable,thus
creating a hybrid network.
Propagation Modes
• Multimode is so named because multiple
beams from a light source move through
the core in different paths.
(In multimode step-index fiber, the density
of the core remains constant from the
center to the edges, multimode graded-
index fiber, decreases this distortion of the
signal through the cable)
2. Framing: Frames are the streams of bits received from the network layer into
manageable data units. This division of stream of bits is done by Data Link Layer.
3. Physical Addressing: The Data Link layer adds a header to the frame in order
to define physical address of the sender or receiver of the frame, if the frames
are to be distributed to different systems on the network.
DATA LINK LAYER DESIGN ISSUES cont......
4. Flow Control: A receiving node can receive the frames at a faster rate than it
can process the frame. Without flow control, the receiver's buffer can overflow,
and frames can get lost. To overcome this problem, the data link layer uses the
flow control to prevent the sending node on one side of the link from
overwhelming the receiving node on another side of the link. This prevents
traffic jam at the receiver side.
5. Error Control: Error control is achieved by adding a trailer at the end of the
frame. Duplication of frames are also prevented by using this mechanism. Data
Link Layers adds mechanism to prevent duplication of frames.
Error detection: Errors can be introduced by signal attenuation and noise. Data Link
Layer protocol provides a mechanism to detect one or more errors.
Error correction: Error correction is similar to the Error detection, except that receiving
node not only detects the errors but also determine where the errors have occurred in
the frame.
DATA LINK LAYER DESIGN ISSUES cont......
6. Access Control: Protocols of this layer determine which of the
devices has control over the link at any given time, when two or more
devices are connected to the same link.
of the parity bits determines the Suppose the original data is 1010 which is to be sent.
position of an error. 1. Total number of data bits 'd' = 4
2. Number of redundant bits r : 2r>= d+r+1
2r>= 4+r+1
3. Therefore, the value of r is 3 that satisfies the above
relation.
4. Total number of bits = d+r = 4+3 = 7;
Let's understand the concept of Hamming code through an Example Cont.......
• Determining the position of the
redundant bits.
• The number of redundant bits is
3. The three bits are represented
by r1, r2, r4. The position of the
redundant bits is calculated with Representation of Data on the addition of parity bits:
corresponds to the raised power
of 2.
• Therefore, their corresponding
positions are 1, 21, 22.
• The position of r1 = 1, The
position of r2 = 2 , The position
of r4 = 4
Let's understand the concept of Hamming code through an Example Cont.......
• Determining the Parity bits
• Determining the r1 bit: The r1 bit is calculated by performing a parity check
on the bit positions whose binary representation includes 1 in the first
position.
• We observe from the above figure that the bit position that includes 1 in the
first position are 1, 3, 5, 7. Now, we perform the even-parity check at these bit
positions. The total number of 1 at these bit positions corresponding to r1 is
even, therefore, the value of the r1 bit is 0.
• Determining r2 bit: The r2 bit is calculated by performing a parity check on
the bit positions whose binary representation includes 1 in the second
position.
• We observe from the above figure that the bit positions that includes 1 in the
second position are 2, 3, 6, 7. Now, we perform the even-parity check at these
bit positions. The total number of 1 at these bit positions corresponding to r2
is odd, therefore, the value of the r2 bit is 1.
• Determining r4 bit: The r4 bit is calculated by performing a parity check on
the bit positions whose binary representation includes 1 in the third position.
• We observe from the above figure that the bit positions that includes 1 in the
third position are 4, 5, 6, 7. Now, we perform the even-parity check at these
bit positions. The total number of 1 at these bit positions corresponding to r4
is even, therefore, the value of the r4 bit is 0.
Let's understand the concept of Hamming code through an Example Cont.......
• Data transferred is given below: Suppose the 4th bit is changed from
0 to 1 at the receiving end, then parity bits are recalculated.
• R1 bit : The bit positions of the r1 bit are 1,3,5,7. We observe from
the above figure that the binary representation of r1 is 1100. Now, we
perform the even-parity check, the total number of 1s appearing in
the r1 bit is an even number. Therefore, the value of r1 is 0.
• R2 bit : The bit positions of r2 bit are 2,3,6,7. We observe from the
above figure that the binary representation of r2 is 1001. Now, we
perform the even-parity check, the total number of 1s appearing in
the r2 bit is an even number. Therefore, the value of r2 is 0.
• R4 bit : The bit positions of r4 bit are 4,5,6,7. We observe from the
above figure that the binary representation of r4 is 1011. Now, we
perform the even-parity check, the total number of 1s appearing in
the r4 bit is an odd number. Therefore, the value of r4 is 1
• The binary representation of redundant bits, i.e., r4r2r1 is 100, and
its corresponding decimal value is 4. Therefore, the error occurs in a
4th bit position. The bit value must be changed from 1 to 0 to
correct the error.
2. Binary convolutional codes
• In a convolutional code, an encoder processes a sequence of input bits
and generates a sequence of output bits.
• The output depends on the current and previous input bits. That is, the
encoder has memory. The number of previous bits on which the output
depends is called the constraint length of the code. Convolutional codes
are specified in terms of their rate and constraint length.
• Convolutional codes are widely used in deployed networks, for example,
as part of the GSM mobile phone system, in satellite communications,
and in 802.11. For example, if 111 is input and the
initial state is all zeros, the internal
• This code is known as the NASA convolutional code of r = 1/2 and k = 7, state, written left to right, will
since it was first used for the Voyager space missions starting in 1977. become 100000, 110000, and
Since then it has been liberally reused, for example, as part of 802.11. 111000 after the first, second, and
third bits have been input.
• each input bit on the left-hand side produces two output bits on the
The output bits will be 11, followed
right-hand side that are XOR sums of the input and internal state. Since it by 10, and then 01. It takes seven
deals with bits and performs linear operations, this is a binary, linear shifts toflush an input completely so
convolutional code. Since 1 input bit produces 2 output bits, the code that it does not affect the output.
rate is 1/2. It is not systematic since none of the output bits is simply the The constraint length of this code is
input bit. thus k = 7.
3. Reed-Solomon codes
• Like Hamming codes, Reed-Solomon codes are linear block codes, and they are often systematic too.
• Unlike Hamming codes, which operate on individual bits, Reed-Solomon codes operate on m bit
symbols.
• Reed-Solomon codes are based on the fact that every n degree polynomial is uniquely determined by n
+ 1 points.
• For example, a line having the form ax + b is determined by two points. Extra points on the same line
are redundant, which is helpful for error correction. Imagine that we have two data points that
represent a line and we send those two data points plus two check points chosen to lie on the same
line. If one of the points is received in error, we can still recover the data points by fitting a line to the
received points. Three of the points will lie on the line, and one point, the one in error, will not. By
finding the line we have corrected the error.
• Reed-Solomon codes are actually defined as polynomials that operate over finite fields, but they work
in a similar manner.
• Reed-Solomon codes are widely used in practice because of their strong error-correction properties,
particularly for burst errors.
• They are used for DSL, data over cable, satellite communications, and perhaps most ubiquitously on
CDs, DVDs, and Blu-ray discs.
4. Low-Density Parity Check codes
• LDPC codes are linear block codes that were invented by Robert Gallagher.
• In an LDPC code, each output bit is formed from only a fraction of the input
bits.
• This leads to a matrix representation of the code that has a low density of 1s,
hence the name for the code.
• The received codewords are decoded with an approximation algorithm that
iteratively improves on a best fit of the received data to a legal codeword. This
corrects errors.
• LDPC codes are practical for large block sizes and have excellent error-
correction abilities that outperform many other codes (including the ones we
have looked at) in practice.
• For this reason they are rapidly being included in new protocols. They are part
of the standard for digital video broadcasting, 10 Gbps Ethernet, power-line
networks, and the latest version of 802.11