Computer Networks Notes English
Computer Networks Notes English
Notes
2
UNIT 1
NETWORKS & INTERNETWORKS
At the most fundamental level, there are two types of communication systems in existence:
• Networks
• Internetworks
What is a Network?
A network is a collection of computers, printers, routers, switches, and other devices that are able
to communicate with each other over some transmission media.
Types of Networks
Networks are basically classified by the area covered by them. As per this classification, there
exist three types of networks.
3
• Local Area Network (LAN)
• Wide Area Network (WAN)
A Local Area Network (LAN) is a group of computers and network communication devices
within a limited geographic area, such as a small office within a building. They are characterized
by the following:
Data Communication is the active process of transporting the encoded information from one
point to other by means of electrical/ optical transmission systems. Such systems are called Data
Communication Systems. Sometimes, they are also known as Telecommunications &
Teleprocessing. Networks are the communication systems used to convey the information form
a point of origin to the destination.
4
Data Communication is interested in the transfer of data, the method of transfer and the
preservation of the data during the transfer process. The purpose of data communications is to
provide the rules and regulations that allow computers with different disk operating systems,
languages, cabling and locations to share resources. The rules and regulations are called
protocols and standards in data communications.
• Encoder: Once the message is transmitted by PC, it goes to an encoder which is usually
a MODEM. Here the Modem converts the signal from its direct electronic pulses
(Baseband) into a series of varying frequency tones (Broadband).
• Decoder: When the message reaches the distant receiver, it first passes through a
Decoder which is another Modem. It converts the signal from Broadband to Baseband.
• Receiver: Finally, the signal/ message is passed on to the host PC for whatever
processing is required. It is the receiver of the data transmitted. Examples are Printers,
Terminals/ Workstations, Mainframe Computers.
5
• figure below shows the communication between a PC connected to Internet
Advantages of a Network
• Speed - Networks provide a very rapid method for sharing and transferring files. Without
a network, files are shared by copying them to floppy disks, then carrying or sending the
disks from one computer to another. This method of transferring files (referred to as
sneaker-net) is very time-consuming.
• Security - Files and programs on a network can be designated as "copy inhibit," so that
you do not have to worry about illegal copying of programs. Also, passwords can be
established for specific directories to restrict access to authorized users.
• Resource Sharing - Sharing resources is another area in which a network exceeds stand-
alone computers. Most schools cannot afford enough laser printers, fax machines,
modems, scanners, and CD-ROM players for each computer. However, if these or similar
peripherals are added to a network, they can be shared by many users.
• Electronic Mail - The presence of a network provides the hardware necessary to install
an e-mail system. E-mail aids in personal and professional communication for all school
6
personnel, and it facilitates the dissemination of general information to the entire school
staff. Electronic mail on a LAN can enable students to communicate with teachers and
peers at their own school. If the LAN is connected to the Internet, students can
communicate with others throughout the world.
• Flexible Access - School networks allow students to access their files from computers
throughout the school. Students can begin an assignment in their classroom, save part of
it on a public access area of the network, then go to the media center after school to finish
their work. Students can also work cooperatively through the network.
Disadvantages of a Network
• Expensive to Install - Although a network will generally save money over time, the
initial costs of installation can be prohibitive. Cables, network cards, and software are
expensive, and the installation may require the services of a technician.
• File Server May Fail - Although a file server is no more susceptible to failure than any
other computer, when the files server "goes down," the entire network may come to a
halt. When this happens, the entire school may lose access to necessary programs and
files.
• Cables May Break - The Topology chapter presents information about the various
configurations of cables. Some of the configurations are designed to minimize the
inconvenience of a broken cable; with other configurations, one broken cable can stop the
entire network.
Signal Modulation
Modulation is the process of changing the parameters of the carrier signal, in accordance with
the instantaneous values of the modulating signal.
7
A signal has to get transmitted over a distance and for it to establish a reliable communication;
it needs to take the help of a high frequency signal which should not affect the original
characteristics of the message signal. The characteristics of the message signal, if changed, the
message contained in it also alters. Hence it is a must to take care of the message signal. A high
frequency signal can travel up to a longer distance, without getting affected by external
disturbances. We take the help of such high frequency signal which is called as a carrier
signal to transmit our message signal. Such a process is simply called as Modulation.
Need for Modulation
The baseband signals are incompatible for direct transmission. For such a signal, to travel
longer distances, its strength has to be increased by modulating with a high frequency carrier
wave, which doesn’t affect the parameters of the modulating signal.
Types of Modulation
There are many types of modulations. Depending upon the modulation techniques used for
analog signals the following types of modulations are there:-
1. Frequency Modulation (FM) the frequency of the carrier signal is changed according to
the data. The transmitter sends different frequencies for a "1" than for a "0". This
technique is also called FSK - frequency shift keying. Its disadvantages are that the rate
of frequency changes is limited by the bandwidth of the line.
8
The Amplitude Modulation (AM) technique changes the amplitude of the sine wave. In the
earliest modems, digital signals were converted to analogue by transmitting a large amplitude
sine wave for a "1" and zero amplitude for a "0", as shown in the figure. The main advantage of
this technique is that it is easy to produce such signals and also to detect them.
2.Phase Modulation (PM) is a process where two sinusoidal waveforms are compared with
each other. The case where the two waveforms are going in the same direction at the same time
is known as zero phase shift. With a phase shift of 180 degrees, waveform B starts at the mid-
point of waveform A, so that when waveform A is positive waveform B is negative, and vice
versa. Two phase states allow the representation of a single bit of digital data, which can have
the value "0" or "1".
Phase Modulation-
Network Devices
Hardware devices that are used to connect computers, printers, fax machines and other electronic
devices to a network are called network devices. These devices transfer data in a fast, secure and
correct way over same or different networks. Network devices may be inter-network or intra-
9
network. Some devices are installed on the device, like NIC card or RJ45 connector, whereas
some are part of the network, like router, switch, etc. Let us explore some of these devices in
greater detail.
Modem
Modem is a device that enables a computer to send or receive data over telephone or cable lines.
The data stored on the computer is digital whereas a telephone line or cable wire can transmit
only analog data. The main function of the modem is to convert digital signal into analog and
vice versa. Modem is a combination of two devices − modulator and demodulator.
The modulator converts digital data into analog data when the data is being sent by the
computer. The demodulator converts analog data signals into digital data when it is being
received by the computer.
Ethernet Card
Ethernet card, also known as network interface card (NIC), is a hardware component used by
computers to connect to Ethernet LAN and communicate with other devices on the LAN. The
earliest Ethernet cards were external to the system and needed to be installed manually. In
modern computer systems, it is an internal hardware component. The NIC has RJ45
socket where network cable is physically plugged in.
10
Router
A router is a network layer hardware device that transmits data from one LAN to another if both
networks support the same set of protocols. So a router is typically connected to at least two
LANs and the internet service provider (ISP). It receives its data in the form of packets, which
are data frames with their destination address added. Router also strengthens the signals before
transmitting them.
Switch
Switch is a network device that connects other devices to Ethernet networks through twisted
pair cables. It uses packet switching technique to receive, store and forward data packets on the
network. The switch maintains a list of network addresses of all the devices connected to it.
On receiving a packet, it checks the destination address and transmits the packet to the correct
port. Before forwarding, the packets are checked for collision and other network errors. The
data is transmitted in full duplex mode
Gateway
Gateway is a network device used to connect two or more dissimilar networks. In networking
parlance, networks that use different protocols are dissimilar networks. A gateway usually is a
computer with multiple NICs connected to different networks. A gateway can also be
configured completely using software. As networks connect to a different network through
gateways, these gateways are usually hosts or end points of the network.
11
UNIT 2
Network Architecture
In 1983, the International Standards Organization (ISO) created the OSI, model. It is a
architecture for facilitating the transfer of information on a network. The OSI model is made up
of seven layers, with each layer providing a distinct network service. By segmenting the tasks
that each layer performs, it is possible to change one of the layers with little or no impact on the
others. For example, you can now change your network configuration without having to change
your application or your presentation layer.
The OSI model was specifically made for connecting open systems. These systems are designed
to be open for communication with almost any other system. The model was made to break
down each functional layer so that overall design complexity could be lessened. The model was
constructed with several precepts in mind:
12
Layers of OSI Model
The lowest layer of the OSI reference model is the physical layer. It is responsible for the actual
physical connection between the devices. The physical layer contains information in the form of
bits. It is responsible for transmitting individual bits from one node to the next. When receiving
data, this layer will get the signal received and convert it into 0s and 1s and send them to the
Data Link layer, which will put the frame back together.
13
2. Data Link Layer (DLL) (Layer 2):
The data link layer is responsible for the node to node delivery of the message. The main
function of this layer is to make sure data transfer is error-free from one node to another, over the
physical layer. When a packet arrives in a network, it is the responsibility of DLL to transmit it
to the Host using its MAC address.
Network layer works for the transmission of data from one host to the other located in different
networks. It also takes care of packet routing i.e. selection of the shortest path to transmit the
packet, from the number of routes available. The sender & receiver’s IP address are placed in the
header by the network layer.
Transport layer provides services to application layer and takes services from network layer. The
data in the transport layer is referred to as Segments. It is responsible for the End to End Delivery
of the complete message. The transport layer also provides the acknowledgement of the
successful data transmission and re-transmits the data if an error is found.
Presentation layer is also called the Translation layer. The data from the application layer is
extracted here and manipulated as per the required format to transmit over the network.
The functions of the presentation layer are:
14
1. Translation
2. Encryption/ Decryption
At the very top of the OSI Reference Model stack of layers, we find Application layer which is
implemented by the network applications. These applications produce the data, which has to be
transferred over the network. This layer also serves as a window for the application services to
access the network and for displaying the received information to the user.
Switching Techniques
In large networks, there may be more than one path for transmitting data from sender to receiver.
Selecting a path that data must take out of the available options is called switching. There are
two popular switching techniques – circuit switching and packet switching.
1. Circuit Switching
When a dedicated path is established for data transmission between sender and receiver, it is
called circuit switching. When any network node wants to send data, be it audio, video, text or
any other type of information, a call request signal is sent to the receiver and acknowledged
15
back to ensure availability of dedicated path. This dedicated path is then used to send data.
ARPANET used circuit switching for communication over the network.
• Once path is set up, the only delay is in data transmission speed
• No problem of congestion or garbled message
2. Packet Switching
• The packet switching is a switching technique in which the message is sent in one go, but
it is divided into smaller pieces, and they are sent individually.
• The message splits into smaller pieces known as packets and packets are given a unique
number to identify their order at the receiving end.
• Every packet contains some information in its headers such as source address,
destination address and sequence number.
• Packets will travel across the network, taking the shortest path as possible.
• All the packets are reassembled at the receiving end in correct order.
• If any packet is missing or corrupted, then the message will be sent to resend the
message.
• If the correct order of the packets is reached, then the acknowledgment message will be
sent.
16
3. Message switching
Message switching is a connectionless network switching technique where the entire message is
routed from the source node to the destination node, one hop at a time. It was a precursor of
packet switching.
Advantages and Disadvantages of Message Switching
Advantages
• Sharing of communication channels ensures better bandwidth usage.
• It reduces network congestion due to store and forward method. Any switching node can
store the messages till the network is available.
• It does not have to deal with out of order packets or lost packets as in packet switching.
17
IBM Systems Network Architecture (SNA)
The Systems Network Architecture (SNA) from IBM use 7 layer architecture similar to the OSI
model. SNA is designed to provide networking facilities for IBM systems only. Because of this,
it is used by only a limited set of users.
Layers of SNA
The SNA layers are briefly discussed below:-
1. Physical control Layer: - It is Similar to the OSI physical layer, this layer is concerned
with electrical, mechanical, and procedural characteristics of the transmission media and
the methods used for interfacing. No specific protocols are defined for this layer. This
layer can be implemented using anyone of the international standards.
2. Data link control: - This layer is similar to the data link layer of the OSI. SNA defines
SDLC protocol for message transfer across a communication link. It also
supports X.25and Token ring protocols.
3. Path control Layer: - Path control layer of the SNA includes many functions of the OSI
network layer. It performs packet formation, path selection, routing, packet reassembling,
controlling virtual routes and a few functions of OSI data link layer also.
18
4. Transmission control: - The functions of this layer are similar to OSI transport layer.
The main functions are verification of sequence number when the packet is received,
managing the rate at which requests are sent and received between logical units.
5. Data flow control: - The role of this layer is to arrange sessions between the source and
destination stations. It also assigns data flow sequence number, receives chains of
requests and responses from calling and called stations and forms brackets by grouping
related chains. It roughly matches the functions of OSI session layer.
6. Presentation services: - The primary role of this layer is to run data transmission
algorithms in accordance with a well-defined conversation (communication) protocol, by
using conversation verbs. Coordinating the resource sharing and synchronization are the
other functions of this layer. This layer has resemblance with OSI presentation layer.
7. Transaction services: - This layer is on the top of SNA architecture. It performs
distributed processing and management. The following are the functions of this layer.
19
UNIT 3
Signal Encoding Techniques
In order to transport digital bits of data across carrier waves, encoding techniques have been
developed each with their own pros and cons.
A transition in the middle of each bit makes it possible to synchronize the sender and
receiver. At any instant the ether can be in one of three states: transmitting a 0 bit (-0.85v),
transmitting a 1 bit (0.85v) or idle (0 volts). Having a normal clock signal as well as an
inverted clock signal leads to regular transitions which means that synchronization of clocks
is easily achieved even if there are a series of '0's or '1's. This results in highly reliable data
transmission. The master clock speed for Manchester encoding always matches the data
speed and this determines the carrier signal frequency, so for 10Mbps Ethernet the carrier is
10MHz.
20
making the first half of the signal opposite to the last half of the previous bit's signal i.e. a
zero bit is indicated by a transition at the beginning of the bit-time. In the middle of the bit-
time there is always a transition, whether from high to low, or low to high. Each bit
transmitted means a voltage change always occurs in the middle of the bit-time to ensure
clock synchronization. Token Ring uses DME and this is why a preamble is not required in
Token Ring, compared to Ethernet which uses Manchester encoding.
21
Data Flow
Data flow is the flow of data between two points. The direction of the data flow can be described
as:
• Simplex
• Half Duplex
• Full Duplex
Simplex
Data flows in only one direction on the data communication line (medium). Examples are radio
and television broadcasts. They go from the TV station to your home television.
Half-Duplex
Data flows in both directions but only one direction at a time on the data communication line.
For example, a conversation on walkie-talkies is a half-duplex data flow. Each person takes turns
talking. If both talk at once - nothing occurs! (Bi-directional but only 1 direction at a time)
22
Full-Duplex
Data flows in both directions simultaneously. Modems are configured to flow data in both
directions.
Multiplexing
The term multiplex has its roots in the Latin words multi (many) and plex (fold). Multiplexers
(MUXs) act as both concentrators and contention devices to allow multiple, relatively low-speed
terminal devices to share a single, high-capacity circuit (physical path) between two points in a
network. The benefit of multiplexers is that they allow carriers and end users to take advantage
of the economies of scale. Just as a multilane highway can carry increased volumes of traffic in
multiple lanes at higher speeds and at relatively low incremental cost, a high-capacity circuit can
carry multiple conversations in multiple channels at relatively low incremental cost.
Frequency Division Multiplexing (FDM) takes advantage of the fact that a single twisted pair,
copper circuit can carry much more than the 4 kHz guaranteed for individual voice
conversations. Even in the early days of vacuum tube technology, up to 96 kHz could be
supported over a set of 2 copper pairs (a 4-wire circuit, with 2 wires in each direction), thereby
enabling the carrying of up to 24 individual voice channels, separated by frequency bands [2-2].
In terms of a commonly understood analogy, multiple frequencies can be supported over a
23
single, four-wire electrical circuit much as can multiple radio stations, and TV channels be
supported over the airwaves through frequency separation
Time Division Multiplexing (TDM) offers all of the advantages of digital transmission, namely
improved bandwidth utilization, enhanced error performance, improved security and
upgradeability. At the transmitting end of the connection, the TDM scans the ports to which
individual devices are attached, allocating each device port a channel, or time slot, for
transmission of data. At the receiving end, the process is reversed, with the channels being
identified serially and the individual conversations being transmitted by the MUX over
individual ports to the individual, intended receiving terminal devices. Clearly, the MUXs must
be carefully synchronized in time, so as to allow the receiving MUX to determine the proper
separation of frames and channels of data.
24
Wavelength Division Multiplexing (WDM)
Although they are not yet in common usage, Wavelength Division Multiplexers (WDMs), allow
multiple high-speed channels to be supported over a single fiber optic transmission system. This
is accomplished through the transmission of multiple frequencies (wave lengths) of light, much
as multiple electrical frequencies can support multiple, simultaneous conversations in a FDM
transmission system. For instance, multiple 2 Gpbs channels can be accommodated over a 8
Gbps fiber optic system through the use of four different frequencies of light.
Network Protocols
Network Protocols are a set of rules governing exchange of information in an easy, reliable and
secure way.
TCP/IP: TCP/IP stands for Transmission Control Protocol/Internet Protocol. TCP/IP is a set of
layered protocols used for communication over the Internet. The communication model of this
suite is client-server model. A computer that sends a request is the client and a computer to
which the request is sent is the server.
FTP: As we have seen, the need for network came up primarily to facilitate sharing of files
between researchers. And to this day, file transfer remains one of the most used facilities. The
protocol that handles these requests is File Transfer Protocol or FTP.
PPP: Point to Point Protocol or PPP is a data link layer protocol that enables transmission of
TCP/IP traffic over serial connection, like telephone line.
GSM: GSM stands for Global System for Mobile communications. GSM is one of the most
widely used digital wireless telephony system. It was developed in Europe in 1980s and is now
international standard in Europe, Australia, Asia and Africa. Any GSM handset with a SIM
(Subscriber Identity Module) card can be used in any country that uses this standard. Every SIM
card has a unique identification number. It has memory to store applications and data like phone
numbers, processor to carry out its functions and software to send and receive messages.
CDMA: CDMA stands for Code Division Multiple Access. It was first used by the British
military during World War II. After the war its use spread to civilian areas due to high service
quality. As each user gets the entire spectrum all the time, voice quality is very high. Also, it is
25
automatically encrypted and hence provides high security against signal interception and
eavesdropping.
WLL: WLL stands for Wireless in Local Loop. It is a wireless local telephone service that can
be provided in homes or offices. The subscribers connect to their local exchange instead of the
central exchange wirelessly. Using wireless link eliminates last mile or first mile construction of
network connection, thereby reducing cost and set up time. As data is transferred over very short
range, it is more secure than wired networks.
SMTP: SMTP stands for Simple Mail Transfer Protocol. It is connection-oriented application
layer protocol that is widely used to send and receive email messages. It was introduced in 1982
by RFC 821 and last updated in 2008 by RFC 5321. The updated version is most widely used
email protocol.
POP3: POP3 or Post Office Protocol Version 3 is an application layer protocol used by email
clients to retrieve email messages from mail servers over TCP/IP network. POP was designed to
move the messages from server to local disk but version 3 has the option of leaving a copy on the
server
IMAP: IMAP stands for Internet Message Access Protocol. IMAP was defined by RFC 3501 to
enable email clients to retrieve email messages from mail servers over a TCP/IP connection.
IMAP is designed to retrieve messages from multiple mail servers and consolidate them all in the
user’s mailbox. A typical example is a corporate client handling multiple corporate accounts
through a local mailbox located on her system.
26
UNIT-4
Error Detection & Correction
There are many reasons such as noise, cross-talk etc., which may help data to get corrupted
during transmission. The upper layers work on some generalized view of network architecture
and are not aware of actual hardware data processing. Hence, the upper layers expect error-free
transmission between the systems. Most of the applications would not function expectedly if
they receive erroneous data. Applications such as voice and video may not be that affected and
with some errors they may still function well.
Data-link layer uses some error control mechanism to ensure that frames (data bit streams) are
transmitted with certain level of accuracy. But to understand how errors is controlled, it is
essential to know what types of errors may occur.
Types of Errors
There may be three types of errors:
• Single bit error -In a frame, there is only one bit, anywhere though, which is corrupt.
• Multiple bits error- Frame is received with more than one bit in corrupted state.
• Burst error- Frame contains more than1 consecutive bits corrupted.
Error control mechanism may involve two possible ways:
• Error detection
• Error correction
Error Detection
Errors in the received frames are detected by means of Parity Check and Cyclic Redundancy
Check (CRC). In both cases, few extra bits are sent along with actual data to confirm that bits
received at other end are same as they were sent. If the counter-check at receiver’ end fails, the
bits are considered corrupted.
27
Parity Check
One extra bit is sent along with the original bits to make number of 1s either even in case of
even parity, or odd in case of odd parity. The sender while creating a frame counts the number
of 1s in it. For example, if even parity is used and number of 1s is even then one bit with value
0 is added. This way number of 1s remains even. If the number of 1s is odd, to make it even a
bit with value 1 is added. The receiver simply counts the number of 1s in a frame.
If the count of 1s is even and even parity is used, the frame is considered to be not-corrupted
and is accepted. If the count of 1s is odd and odd parity is used, the frame is still not corrupted.
If a single bit flips in transit, the receiver can detect it by counting the number of 1s. But when
more than one bits are erro neous, then it is very hard for the receiver to detect the error.
Cyclic Redundancy Check (CRC)
CRC is a different approach to detect if the received frame contains valid data. This technique
involves binary division of the data bits being sent. The divisor is generated using polynomials.
The sender performs a division operation on the bits being sent and calculates the remainder.
Before sending the actual bits, the sender adds the remainder at the end of the actual bits. Actual
data bits plus the remainder is called a codeword. The sender transmits data bits as code words.
Error Correction
In the digital world, error correction can be done in two ways:
28
• Backward Error Correction -When the receiver detects an error in the data received, it
requests back the sender to retransmit the data unit.
• Forward Error Correction - When the receiver detects some error in the data received,
it executes error-correcting code, which helps it to auto-recover and to correct some
kinds of errors.
Error Correcting Codes
When bits are transmitted over the computer network, they are subject to get corrupted
due to interference and network problems. The corrupted bits leads to spurious data being
received by the receiver and are called errors.
Error-correcting codes (ECC) are a sequence of numbers generated by specific
algorithms for detecting and removing errors in data that has been transmitted over noisy
channels. Error correcting codes ascertain the exact number of bits that has been
corrupted and the location of the corrupted bits, within the limitations in algorithm.
Hamming Code
Hamming code is a block code that is capable of detecting up to two simultaneous bit errors and
correcting single-bit errors. It was developed by R.W. Hamming for error correction.
In this coding method, the source encodes the message by inserting redundant bits within the
message. These redundant bits are extra bits that are generated and inserted at specific positions
in the message itself to enable error detection and correction. When the destination receives this
message, it performs recalculations to detect errors and find the bit position that has error.
Encoding a message by Hamming Code
The procedure used by the sender to encode the message encompasses the following steps −
• Step 1 − Calculation of the number of redundant bits.
• Step 2 − Positioning the redundant bits.
• Step 3 − Calculating the values of each redundant bit.
Once the redundant bits are embedded within the message, this is sent to the user.
Step 1 − Calculation of the number of redundant bits.
If the message contains m𝑚number of data bits, r𝑟number of redundant bits are added to it so
that m𝑟 is able to indicate at least (m + r+ 1) different states. Here, (m + r) indicates location of
an error in each of (𝑚 + 𝑟) bit positions and one additional state indicates no error. Since, r𝑟 bits
can indicate 2r𝑟 states, 2r𝑟 must be at least equal to (m + r + 1). Thus, the following equation
should hold 2r ≥ m+r+1
Step 2 − Positioning the redundant bits.
29
The r redundant bits placed at bit positions of powers of 2, i.e. 1, 2, 4, 8, 16 etc. They are
referred in the rest of this text as r1 (at position 1), r2 (at position 2), r3 (at position 4), r4 (at
position 8) and so on.
Step 3 − Calculating the values of each redundant bit.
The redundant bits are parity bits. A parity bit is an extra bit that makes the number of 1s either
even or odd. The two types of parity are −
• Even Parity − Here the total number of bits in the message is made even.
• Odd Parity − Here the total number of bits in the message is made odd.
Each redundant bit, ri, is calculated as the parity, generally even parity, based upon its bit
position. It covers all bit positions whose binary representation includes a 1 in the ith position
except the position of ri. Thus −
• r1 is the parity bit for all data bits in positions whose binary representation includes a 1 in
the least significant position excluding 1 (3, 5, 7, 9, 11 and so on)
• r2 is the parity bit for all data bits in positions whose binary representation includes a 1 in
the position 2 from right except 2 (3, 6, 7, 10, 11 and so on)
• r3 is the parity bit for all data bits in positions whose binary representation includes a 1 in
the position 3 from right except 4 (5-7, 12-15, 20-23 and so on)
Decoding a message in Hamming Code
Once the receiver gets an incoming message, it performs recalculations to detect errors and
correct them. The steps for recalculation are −
• Step 1 − Calculation of the number of redundant bits.
• Step 2 − Positioning the redundant bits.
• Step 3 − Parity checking.
• Step 4 − Error detection and correction
Step 1 − Calculation of the number of redundant bits
Using the same formula as in encoding, the numbers of redundant bits are ascertained.
2r ≥ m + r + 1 where m is the number of data bits and r is the number of redundant bits.
Step 2 − Positioning the redundant bits
The r redundant bits placed at bit positions of powers of 2, i.e. 1, 2, 4, 8, 16 etc.
Step 3 − Parity checking
Parity bits are calculated based upon the data bits and the redundant bits using the same rule as
during generation of c1,c2 ,c3 ,c4 etc. Thus
30
c1 = parity (1, 3, 5, 7, 9, 11 and so on)
c2 = parity (2, 3, 6, 7, 10, 11 and so on)
c3 = parity (4-7, 12-15, 20-23 and so on)
Step 4 − Error detection and correction
The decimal equivalent of the parity bits binary values is calculated. If it is 0, there is no error.
Otherwise, the decimal value gives the bit position which has error. For example, if c1c2c3c4 =
1001, it implies that the data bit at position 9, decimal equivalent of 1001, has error. The bit is
flipped to get the correct message.
Unguided transmission media consists of a means for the data signals to travel but nothing to
guide them along a specific path. The data signals are not bound to a cabling media and are
therefore often called Unbound media. Unguided transmission media is data signals that flow
through the air. They are not guided or bound to a channel to follow.
Unguided media is classified by the type of wave propagation:
• Radio Frequency (RF) Propagation
• Microwave
• Satellite
31
cable used by cable TV companies between the community antenna and user homes and
businesses. Coaxial cable is sometimes used by telephone companies from their central office to
the telephone poles near users. It is also widely installed for use in business and corporation
Ethernet and other types of local area network (bus topologies), but many LAN products are
dropping support of coaxial cable connectivity.
Coaxial cable is called "coaxial" because it includes one physical channel that carries the signal
surrounded (after a layer of insulation) by another concentric physical channel, both running
along the same axis. The outer channel serves as a ground.
Coaxial cable consists of two conductors. The inner conductor is held inside an insulator with the
other conductor woven around it providing a shield. An insulating protective coating called a
jacket covers the outer conductor.
The outer shield protects the inner conductor from outside electrical signals. The distance
between the outer conductor (shield) and inner conductor plus the type of material used for
insulating the inner conductor determine the cable properties or impedance. The excellent control
of the impedance characteristics of the cable allow higher data rates to be transferred than with
twisted pair cable.
The Ethernet LAN protocol was originally developed to operate over two coaxial cables:
• Thinnet/ 10BASE2
• Thicknet/ 10BASE5
Thinnet - It uses a British Naval Connector (BNC) on each end. Thinnet is part of the RG-58
family of cables. Maximum cable length is 185 meters. Transmission speed is 10Mbps. Thinnet
cable should have 50 ohms impedance and its terminator has 50 ohms impedance. A T or barrel
connector has no impedance.
Thicknet - Half inch rigid cable. Maximum cable length is 500 meters. Transmission speed is
10Mbps. Expensive and is not commonly used. Thicknet is a part of RG-11 or RG-8 family of
cables. A vampire tap or piercing tap is used with a transceiver attached to connect computers to
the cable. 100 connections may be made. The computer has an attachment unit interface (AUI)
32
on its network card which is a 15 pin DB-15 connector. The computer is connected to the
transceiver at the cable from its AUI on its network card using a drop cable.
Although twisted pair is often associated with home use, a higher grade of twisted pair is often
used for horizontal wiring in LAN installations because it is less expensive than coaxial cable.
TP cable comes with each pair uniquely color coded when it is packaged in multiple pairs.
Generally, TP cables are composed of four color-coded pairs of copper conductors twisted
around each other. The wires in TP cabling are twisted together in pairs to minimize crosstalk
interference due to adjacent cables.
In TP cable each pair consists of a wire used for the +ve data signal and a wire used for the -ve
data signal. Any noise that appears on 1 wire of the pair will also occur on the other wire.
Because the wires are opposite polarities, they are 180 degrees out of phase.
When the noise appears on both wires, it cancels or nulls itself out at the receiving end. An outer
jacket provides protection and keeps the pairs in alignment. UTP cable connects to devices via 8
33
pin modular connectors called RJ-45 plugs. All LAN protocols can operate over UTP. Most
modern LAN devices are equipped with RJ-45 jacks. Typical impedance for TP is 100/150 ohm
(Ethernet - 10BASET).
TP cable is available in two versions/ forms:
• Unshielded Twisted Pair (UTP)
• Shielded Twisted Pair (STP)
The glass fiber requires more protection within an outer cable than copper. For these reasons and
because the installation of any new wiring is labor-intensive, few communities yet have optical
fiber wires or cables from the phone company's branch office to local customers (known as local
loops).
34
An important characteristic of fiber optics is
Refraction. Refraction is the characteristic of a
material to either pass or reflect light. When light
passes through a medium, it "bends" as it passes
from one medium to the other. An example of
this is when we look into a pond of water.
If the angle of incidence is small, the light rays
are reflected and do not pass into the water. If the
angle of incident is great, light passes through the media but is bent or refracted.
Optical fibers work on the principle that the core refracts the light and the cladding reflects the
light. The core refracts the light and guides the light along its path. The cladding reflects any
light back into the core and stops light from escaping through it - it bounds the medium!
Advantages of Optical Fiber:
• Noise immunity: RFI and EMI immune (RFI - Radio Frequency Interference, EMI -
Electromagnetic Interference)
• Security: cannot tap into cable.
• Large Capacity due to BW (bandwidth)
• No corrosion
• Longer distances than copper wire
• Smaller and lighter than copper wire
• Faster transmission rate
Disadvantages of optical fiber:
• Physical vibration will show up as signal noise!
• Limited physical arc of cable. Bend it too much and it will break!
• Difficult to splice
35
• The cost of optical fiber is a trade-off between capacity and cost. At higher transmission
capacity, it is cheaper than copper. At lower transmission capacity, it is more expensive.
Media versus Bandwidth
The following table compares the usable bandwidth of the different guided transmission media.
Cable Type Bandwidth
Open Cable 0 - 5 MHz
Twisted Pair 0 - 100 MHz
Coaxial Cable 0 - 600 MHz
Optical Fiber 0 - 1 GHz
RF Propagation
There are three types of RF (radio frequency) propagation:
➢ Ground Wave
➢ Ionospheric
➢ Line of Sight (LOS)
Ground wave propagation follows the curvature of the Earth. Ground waves have carrier
frequencies up to 2 MHz. AM radio is an example of ground wave propagation.
Ionospheric propagation bounces off of the Earth's Ionospheric layer in the upper atmosphere. It
is sometimes called double hop propagation. It operates in the frequency range of 30 - 85 MHz.
36
Because it depends on the Earth's ionosphere, it changes with the weather and time of day. The
signal bounces off of the ionosphere and back to earth. Ham radios operate in this range.
Line of sight propagation transmits exactly in the line of sight. The receive station must be in
the view of the transmit station. It is sometimes called space waves or tropospheric propagation.
It is limited by the curvature of the Earth for ground-based stations (100 km, from horizon to
horizon). Reflected waves can cause problems. Examples of line-of-sight propagation are: FM
radio, microwave and satellite.
Microwave
Microwave radio, a form of radio transmission which uses ultra-high frequencies, developed out
of experiments with radar (radio detecting and ranging) during the period preceding World War
II. It was developed by Harold.
37
UNIT 5
Network Topology
A Network Topology is the arrangement with which computer systems or network devices are
connected to each other. Topologies may define both physical and logical aspect of the network.
Both logical and physical topologies could be same or different in a same network.
Point-to-Point
Point-to-point networks contain exactly two hosts such as computer, switches or routers, servers
connected back-to-back using a single piece of cable. Often, the receiving end of one host is
connected to sending end of the other and vice-versa.
If the hosts are connected point-to-point logically, then may have multiple intermediate devices.
But the end hosts are unaware of underlying network and see each other as if they are connected
directly.
Bus Topology
In case of Bus topology, all devices share single communication line or cable. Bus topology
may have problem while multiple hosts sending data at the same time. Therefore, Bus topology
either uses CSMA/CD technology or recognizes one host as Bus Master to solve the issue. It is
one of the simple forms of networking where a failure of a device does not affect the other
devices. But failure of the shared communication line can make all other devices stop
functioning.
Both ends of the shared channel have line terminator. The data is sent in only one direction and
as soon as it reaches the extreme end, the terminator removes the data from the line.
38
Star Topology
All hosts in Star topology are connected to a central device, known as hub device, using a point-
to-point connection. That is, there exists a point-to-point connection between hosts and hub.
The hub device can be any of the following:
As in Bus topology, hub acts as single point of failure. If hub fails, connectivity of all hosts to all
other hosts fails. Every communication between hosts, takes place through only the hub. Star
topology is not expensive as to connect one more host, only one cable is required and
configuration is simple.
39
Ring Topology
In ring topology, each host machine connects to exactly two other machines, creating a circular
network structure. When one host tries to communicate or send message to a host which is not
adjacent to it, the data travels through all intermediate hosts. To connect one more host in the
existing structure, the administrator may need only one more extra cable.
Failure of any host results in failure of the whole ring. Thus, every connection in the ring is a
point of failure. There are methods which employ one more backup ring. Ring topology is like a
bus topology, but with connected ends. The node that receives the message from the previous
computer will retransmit to the next node. The data flows in one direction, i.e., it is
unidirectional. The data flows in a single loop continuously known as an endless loop. It has no
terminated ends, i.e., each node is connected to other node and having no termination point. The
data in a ring topology flow in a clockwise direction. The most common access method of the
ring topology is token passing. Token passing: It is a network access method in which token is
passed from one node to another node. Token: It is a frame that circulates around the network.
Working of Token passing
40
A token moves around the network, and it is passed from computer to computer until it reaches
the destination. The sender modifies the token by putting the address along with the data. The
data is passed from one device to another device until the destination address matches. Once the
token received by the destination device, then it sends the acknowledgment to the sender. In a
ring topology, a token is used as a carrier.
Mesh Topology
In this type of topology, a host is connected to one or multiple hosts. This topology has hosts in
point-to-point connection with every other host or may also have hosts which are in point-to-
point connection to few hosts only. Mesh technology is an arrangement of the network in which
computers are interconnected with each other through various redundant connections. There are
multiple paths from one computer to another computer. It does not contain the switch, hub or
any central computer which acts as a central point of communication. The Internet is an
example of the mesh topology. Mesh topology is mainly used for WAN implementations where
communication failures are a critical concern. Mesh topology is mainly used for wireless
networks.
Mesh topology can be formed by using the formula:
Number of cables = (n*(n-1))/2;
Where n is the number of nodes that represents the network.
41
Multiple Access Protocols in Computer Network
The Data Link Layer is responsible for transmission of data between two nodes. Its main
functions are-
Data Link Control
Multiple Access Control
42
data link control layer is sufficient, however if there are no dedicated link present then
multiple stations can access the channel simultaneously. Hence multiple access protocols are
required to decrease collision and avoid crosstalk. For example, in a classroom full of students,
when a teacher asks a question and all the students (or stations) start answering simultaneously
(send data at same time) then a lot of chaos is created (data overlap or data lost) then it is the
job of the teacher (multiple access protocols) to manage the students and make them answer
one at a time.
1. Random Access Protocol: In this, all stations have same superiority that is no station has
more priority than another station. Any station can send data depending on medium’s state
(idle or busy). It has two features:
1. There is no fixed time for sending data
2. There is no fixed sequence of stations sending data
The Random-access protocols are further subdivided as:
(a) ALOHA – It was designed for wireless LAN but is also applicable for shared medium. In
this, multiple stations can transmit data at the same time and can hence lead to collision and
data being garbled.
Pure:
When a station sends data it waits for an acknowledgement. If the acknowledgement doesn’t
come within the allotted time, then the station waits for a random amount of time called back-
off time (Tb) and re-sends the data. Since different stations wait for different amount of time,
the probability of further collision decreases.
Slotted
It is similar to pure aloha, except that we divide time into slots and sending of data is allowed
only at the beginning of these slots. If a station misses out the allowed time, it must wait for
the next slot. This reduces the probability of collision.
(b) CSMA – Carrier Sense Multiple Access ensures fewer collisions as the station is required
to first sense the medium (for idle or busy) before transmitting data. If it is idle then it sends
data, otherwise it waits till the channel becomes idle. However, there is still chance of collision
in CSMA due to propagation delay. For example, if station A wants to send data, it will first
sense the medium. If it finds the channel idle, it will start sending data. However, by the time
the first bit of data is transmitted (delayed due to propagation delay) from station A, if station
B requests to send data and senses the medium it will also find it idle and will also send data.
43
This will result in collision of data from station A and B.
Token Ring
Token ring (IEEE 802.5) is a communication protocol in a local area network (LAN) where all
stations are connected in a ring topology and pass one or more tokens for channel acquisition.
A token is a special frame of 3 bytes that circulates along the ring of stations. A station can
send data frames only if it holds a token. The tokens are released on successful receipt of the
data frame.
44
Token Bus (IEEE 802.4) is a standard for implementing token ring over virtual ring in LANs.
The physical media has a bus or a tree topology and uses coaxial cables. A virtual ring is
created with the nodes/stations and the token is passed from one node to the next in a sequence
along this virtual ring. Each node knows the address of its preceding station and its succeeding
station. A station can only transmit data when it has the token. The working principle of token
bus is similar to Token Ring.
1. Computer Virus
We’ve all heard about them, and we all have our fears. For everyday Internet users, computer
viruses are one of the most common threats to cybersecurity. Statistics show that
approximately 33% of household computers are affected with some type of malware, more
than half of which are viruses.
Computer viruses are pieces of software that are designed to be spread from one computer to
another. They’re often sent as email attachments or downloaded from specific websites with
the intent to infect your computer — and other computers on your contact list — by using
systems on your network. Viruses are known to send spam, disable your security settings,
corrupt and steal data from your computer including personal information such as passwords,
even going as far as to delete everything on your hard drive.
45
3. Trojan horse
Metaphorically, a ―Trojan horse‖ refers to tricking someone into inviting an attacker into a
securely protected area. In computing, it holds a very similar meaning — a Trojan horse, or
―Trojan, is a malicious bit of attacking code or software that tricks users into running it
willingly, by hiding behind a legitimate program.
4. Computer worms
Computer worms are pieces of malware programs that replicate quickly and spread from one
computer to another. A worm spreads from an infected computer by sending itself to all of the
computer’s contacts, then immediately to the contacts of the other computers.
5. DoS attack
A DoS attack is performed by one machine and its internet connection, by flooding a website
with packets and making it impossible for legitimate users to access the content of flooded
website. Fortunately, you can’t really overload a server with a single other server or a PC
anymore. In the past years it hasn’t been that common if anything, then by flaws in the
protocol.
6. Phishing
Phishing is a method of a social engineering with the goal of obtaining sensitive data such as
passwords, usernames, credit card numbers.
The attacks often come in the form of instant messages or phishing emails designed to appear
legitimate. The recipient of the email is then tricked into opening a malicious link,
which leads to the installation of malware on the recipient’s computer. It can also obtain
personal information by sending an email that appears to be sent from a bank, asking to verify
your identity by giving away your private information.
46
QUESTIONS
Part A (2 X 20)
47
28. Define GSM.
29. What is IMAP?
30. What is GSM?
31. Define analog signal?
32. What is digital signal?
33. What is multiplexing?
34. What is switching?
35. What is encoder?
36. What is decoder?
37. Define base band signal.
38. Define broad band.
39. What is blue tooth?
40. What is Communication Channel?
41. What is Network?
42. Define BUS.
43. What is Topology?
44. What is CRC?
45. What is Ring in Network?
46. What is Protocol?
47. What is role of Bridge?
48. Define thinnet.
49. What is OSI?
50. What is thicknet?
51. Define Ethernet.
52. What is hamming code?
53. What is WAN?
54. What is Gateway?
55. Define mesh topology?
56. What is burst error?
48
57. Define logical topology.
58. What is parity code?
59. What is RF?
60. What is Communication protocol?
61. What is Network?
62. Define BUS.
63. What is Topology?
64. What is token?
65. What is Ring in Network?
66. What is aloha?
67. What is role of BUS?
68. Define Ethernet.
69. What is OSI?
70. What is pure aloha?
71. Define slotted aloha.
72. What is phishing?
73. What is virus?
74. What is Trojan horse?
75. Define mesh topology?
76. What is burst error?
77. Define logical topology.
78. What is DoS attack?
79. What is malware?
Part B (5 X 7)
49
5. Explain types of signals.
6. Explain various data flow in network.
7. What is switching? Explain.
8. What are signal formats used in LAN?
9. What is TDM?
10. What is CSMA/CD?
11. What is TCP/IP protocol?
12. What is FTP?
13. Explain types of Topologies.
14. Explain working of fiber optic cable.
15. Explain types of errors in network.
16. Define CSMA/CD architecture.
17. What do you mean by microwave frequency? Explain.
18. Explain types of network Topologies.
19. Explain working of DoS attack in network.
20. Explain types of viruses in network.
21. Define CSMA/CA architecture.
22. What do you mean by Aloha? Explain.
Part C (3 X 10)
50
10. Explain types of channel access techniques in detail.
11. Explain various issues related to network security & reliability.
12. Explain token ring & token bus protocol.
51