Lecture Notes on COMPUTER NETWORKS | download free pdf
ROEVER ENGINEERING COLLEGE
DEPARTMENT OF ECE
K.BALAJI, ME., AP/ECE
1. Define data communication.
It is the exchange of data between two devices via some form of Transmission
medium ( such as copper cable,twisted pair cable etc).
2. What are the elements of data communication?
The elements of data communication are
3. How we can check the effectiveness of data communication?
The effectiveness of data communication can be checked by
4. What are the classes of transmission media?
The classes of transmission media are
Guided transmission media
Unguided transmission media
5. Define Optical fiber
It is a method of transmitting information from one place to another by
sending light through an optical fiber.
6. Define distributed processing
A task is divided among multiple computers. Instead of single large machine
handling all the process, each separate computer handles the subset
7. What do you mean by OSI?
Open system interconnection model is a model for understanding and
designing a network architecture. It is not a protocol. 8. Define Network.
A network is a set of devices connected by physical media links. A network is
recursively is a connection of two or more nodes by a physical link or two or more networks
connected by one or more nodes
9. What is a Link?
At the lowest level, a network can consist of two or more computers directly
connected by some physical medium such as coaxial cable or optical fiber. Such a physical
medium is called as Link.
10 What is point-point link?
If the physical links are limited to a pair of nodes it is said to be point-point link.
11. What is Multiple Access?
If the physical links are shared by more than two nodes, it is said to be Multiple
12. Define Switch
Switches are hardware or software devices capable of creating temporary Connections
between two or more devices
13. What are the types of switching?
The types of switching are
14. What do you mean by Crossbar switches?
It connects m inputs to n outputs in a grid using electronic micro switches at
each cross points.
15. Define Blocking
The reduction in the number of cross points result in a phenomenon called
Blocking 16. Define packet switching
In packet switching data are transmitted in discrete units of potentially
variable length blocks called Packets
17. What are the approaches of packet switching?
The approaches of packet switching are
18. What do you mean by Permanent Virtual circuit?
The same Virtual circuit is provided between two users on a continuous
basis. The circuit is dedicated to the specific user
19. What do you mean by DSL?
It is a new technology that uses the existing telecommunication network to
accomplish high speed delivery of data, voice & video etc.
20. What is the purpose of Physical layer?
The physical layer coordinates the functions required to transmit a bit stream
over a physical medium.
DEFINE ISO-OSI LAYER?
ISO-OSI 7-Layer Network Architecture
This lecture introduces the ISO-OSI layered architecture of Networks. According to the ISO
standards, networks have been divided into 7 layers depending on the complexity of the
functionality each of these layers provide. The detailed description of each of these layers is given
in the notes below. We will first list the layers as defined by the standard in the increasing order of
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
This layer is the lowest layer in the OSI model. It helps in the transmission of data between two
machines that are communicating through a physical medium, which can be optical fibres,copper
wire or wireless etc. The following are the main functions of the physical layer:
1. Hardware Specification: The details of the physical cables, network interface cards, wireless
radios, etc are a part of this layer.
Its basic functions are routing and congestion control. Routing: This deals with determining how
packets will be routed (transferred) from source to destination. It can be of three types:
15. Static: Routes are based on static tables that are "wired into" the network and are rarely
16. Dynamic: All packets of one application can follow different routes depending upon the
topology of the network, the shortest path and the current network load.
17. Semi-Dynamic: A route is chosen at the start of each conversation and then all the packets
of the application follow the same route.
Its functions are:
1. Multiplexing / Demultiplexing : Normally the transport layer will create distinct network
connection for each transport connection required by the session layer. The transport layer may
either create multiple network connections (to improve throughput) or it may multiplex several
transport connections onto the same network connection (because creating and maintaining
networks may be expensive). In the latter case, demultiplexing will be required at the receiving end.
A point to note here is that communication is always carried out between two processes and not
between two machines. This is also known as process-to-process communication.
2. Fragmentation and Re-assembly: The data accepted by the transport layer from the session
layer is split up into smaller units (fragmentation) if needed and then passed to
the network layer. Correspondingly, the data provided by the network layer to the transport layer on
the receiving side is re-assembled.
This layer is concerned with the syntax and semantics of the information transmitted. In order to
make it possible for computers with different data representations to communicate data structures to
be exchanged can be defined in abstract way along with standard encoding. It also manages these
abstract data structures and allows higher level of data structures to be defined an exchange. It
encodes the data in standard agreed way (network format). Suppose there are two machines A and B
one follows 'Big Endian' and other 'Little Endian' for data representation. This layer ensures that the
data transmitted by one gets converted in the form compatible to other machine. This layer is
concerned with the syntax and semantics of the information transmitted. In order to make it possible
for computers with different data representations to communicate data structures to be exchanged
can be defined in abstract way along with standard encoding. It also manages these abstract data
structures and allows higher level of data structures to be defined an exchange. Other functions
include compression, encryption etc.
The seventh layer contains the application protocols with which the user gains access to the
network. The choice of which specific protocols and their associated functions are to be used at the
application level is up to the individual user. Thus the boundary between the presentation layer and
the application layer represents a separation of the protocols imposed by the network designers from
those being selected and implemented by the network users. For example commonly used protocols
are HTTP(for web browsing), FTP(for file transfer) etc.
DEFINE TCP/IP BRIEFLY?
In most of the networks today, we do not follow the OSI model of seven layers. What is actually
implemented is as follows. The functionality of Application layer and Presentation layer is merged
into one and is called as the Application Layer. Functionalities of Session Layer is not implemented
in most networks today. Also, the Data Link layer is split theoretically into MAC (Medium Access
Control) Layer and LLC (Link Layer Control). But again in practice, the LLC layer is not
implemented by most networks. So as of today, the network architecture is of 5 layers only.
DEFINE GUIDED AND UNGUIDED TRANSMISSION MEDIA?
GUIDED AND UNGUIDED TRANSMISSION MEDIA:
Physical layer is concerned with transmitting raw bits over a communication channel. The design
issues have to do with making sure that when one side sends a 1 bit, it is received by the other side
as 1 bit and not as 0 bit. In physical layer we deal with the communication medium used for
Types of Medium
Medium can be classified into 2 categories.
1. Guided Media: Guided media means that signals is guided by the prescence of physical media
i.e. signals are under control and remains in the physical wire. For eg. copper wire
2. Unguided Media: Unguided Media means that there is no physical path for the signal to
propagate. Unguided media are essentially electro-magnetic waves. There is no control on flow of
signal. For eg. radio waves.
In a network nodes are connected through links. The communication through links can be classified
1. Simplex: Communication can take place only in one direction. eg. T.V broadcasting.
2. Half-duplex: Communication can take place in one direction at a time. Suppose node A and B
are connected then half-duplex communication means that at a time data can flow from A to B or
from B to A but not simultaneously. eg. two persons talking to each other such that when speaks the
other listens and vice versa.
3. Full-duplex: Communication can take place simultaneously in both directions. eg. A discussion
in a group without discipline.
Links can be further classified as
1. Point to Point: In this communication only two nodes are connected to each other. When a node
sends a packet then it can be received only by the node on the other side and none else.
2. Multipoint: It is a kind of sharing communication, in which signal can be recieved by all nodes.
This is also called broadcast.
Generally two kind of problems are associated in transmission of signals.
1. Attenuation: When a signal transmits in a network then the quality of signal degrades as the
signal travels longer distances in the wire. This is called attenuation. To improve quality of signal
amplifiers are used at regular distances.
2. Noise: In a communication channel many signals transmit simultaneously, certain random signals
are also present in the medium. Due to interference of these signals our signal gets disrupted a bit.
Bandwidth simply means how many bits can be transmitted per second in the communication channel. In technical terms it indicates the width of frequency spectrum.
Guided Transmission Media In Guided transmission media generally two kind of materials are
o Coaxial Cable
o Twisted Pair
2. Optical Fiber
1. Coaxial Cable: Coaxial cable consists of an inner conductor and an outer conductor which are
seperated by an insulator. The inner conductor is usually copper. The outer conductor is covered by
a plastic jacket. It is named coaxial because the two conductors are coaxial. Typical diameter of
coaxial cable lies between 0.4 inch to 1 inch. The most application of coaxial cable is cable T.V.
The coaxial cable has high bandwidth, attenuation is less.
Twisted Pair: A Twisted pair consists of two insulated copper wires, typically 1mm thick. The
wires are twisted togather in a helical form the purpose of twisting is to reduce cross talk
interference between several pairs. Twisted Pair is much cheaper then coaxial cable but it is
susceptible to noise and electromagnetic interference and attenuation is large.
Twisted Pair can be further classified in two categories: Unshielded twisted pair: In this no
insulation is provided, hence they are susceptible to interference. Shielded twisted pair: In this a
protective thick insulation is provided but shielded twisted pair is expensive and not commonly
used. The most common application of twisted pair is the telephone system. Nearly all telephones
are connected to the telephone company office by a twisted pair. Twisted pair can run several
kilometers without amplification, but for longer distances repeaters are needed. Twisted pairs can be
used for both analog and digital transmission. The bandwidth depends on the thickness of wire and
the distance travelled. Twisted pairs are generally limited in distance, bandwidth and data rate.
3. Optical Fiber: In optical fiber light is used to send data. In general terms presence of light is
taken as bit 1 and its absence as bit 0. Optical fiber consists of inner core of either glass or plastic.
Core is surrounded by cladding of the same material but of different refractive index. This cladding
is surrounded by a plastic jacket which prevents optical fiber from electromagnetic interference and
harshly environments. It uses the principle of total internal reflection to transfer data over optical
fibers. Optical fiber is much better in bandwidth as compared to copper wire, since there is hardly
any attenuation or electromagnetic interference in optical wires. Hence there is fewer requirements
to improve quality of signal, in long distance transmission. Disadvantage of optical fiber is that end
points are fairly expensive. (eg. switches)
Differences between different kinds of optical
fibers: 1. Depending on material
Made of glass
Made of plastic.
2. Depending on radius
Thin optical fiber
Thick optical fiber
3. Depending on light source
LED (for low bandwidth)
Injection lased diode (for high bandwidth)
1. Radio: Radio is a general term that is used for any kind of frequency. But higher frequencies are
usually termed as microwave and the lower frequency band comes under radio frequency. There are
many application of radio. For eg. cordless keyboard, wireless LAN, wireless ethernet but it is
limited in range to only a few hundred meters. Depending on frequency radio offers different
2. Terrestrial microwave: In terrestrial microwave two antennas are used for communication. A
focused beam emerges from an antenna and is received by the other antenna, provided that antennas
4. should be facing each other with no obstacle in between. For this reason antennas are situated on
high towers. Due to curvature of earth terrestrial microwave can be used for long distance
communication with high bandwidth. Telecom department is also using this for long distance
communication. An advantage of wireless communication is that it is not required to lay down
wires in the city hence no permissions are required.
3. Satellite communication: Satellite acts as a switch in sky. On earth VSAT(Very Small Aperture
Terminal) are used to transmit and receive data from satellite. Generally one station on earth
transmits signal to satellite and it is received by many stations on earth. Satellite communication is
generally used in those places where it is very difficult to obtain line of sight i.e. in highly irregular
terrestrial regions. In terms of noise wireless media is not as good as the wired media. There are
frequency band in wireless communication and two stations should not be allowed to transmit
simultaneously in a frequency band. The most promising advantage of satellite is broadcasting. If
satellites are used for point to point communication then they are expensive as compared to wired
A network topology is the basic design of a computer network. It is very much like a map of a road.
It details how key network components such as nodes and links are interconnected. A network's
topology is comparable to the blueprints of a new home in which components such as the electrical
system, heating and air conditioning system, and plumbing are integrated into the overall design.
Taken from the Greek work "Topos" meaning "Place," Topology, in relation to networking,
describes the configuration of the network; including the location of the workstations and wiring
connections. Basically it provides a definition of the components of a Local Area Network (LAN).
A topology, which is a pattern of interconnections among nodes, influences a network's cost and
performance. There are three primary types of network topologies which refer to the physical and
logical layout of the Network cabling. They are:
1. Star Topology: All devices connected with a Star setup communicate through a central
Hub by cable segments. Signals are transmitted and received through the Hub. It is the
simplest and the oldest and all the telephone switches are based on this. In a star topology,
each network device has a home run of cabling back to a network hub, giving each device a
separate connection to the network. So, there can be multiple connections in parallel.
o Network administration and error detection is easier because problem is isolated to central node
o Networks runs even if one host fails
o Expansion becomes easier and scalability of the network increases
o More suited for larger networks
o Broadcasting and multicasting is not easy because some extra functionality needs to be provided
to the central hub
o If the central node fails, the whole network goes down; thus making the switch some kind of a
o Installation costs are high because each node needs to be connected to the central switch
Bus Topology: The simplest and one of the most common of all topologies, Bus consists of
a single cable, called a Backbone, that connects all workstations on the network using a
single line. All transmissions must pass through each of the connected devices to complete
the desired request. Each workstation has its own individual signal that identifies it and
allows for the requested data to be returned to the correct originator. In the Bus Network,
messages are sent in both directions from a single point and are read by the node (computer
or peripheral on the network) identified by the code with the message. Most Local Area
Networks (LANs) are Bus Networks because the network will continue to function even if
one computer is down. This topology works equally well for either peer to peer or client
server. The purpose of the terminators at either end of the network is to stop the signal
being reflected back.
o Broadcasting and multicasting is much simpler
o Network is redundant in the sense that failure of one node doesn't effect the network. The other
part may still function properly
o Least expensive since less amount of cabling is required and no network switches are
required o Good for smaller networks not requiring higher speeds
o Trouble shooting and error detection becomes a problem because, logically, all nodes are
equal o Less secure because sniffing is easier
o Limited in size and speed
Ring Topology: All the nodes in a Ring Network are connected in a closed circle of cable.
Messages that are transmitted travel around the ring until they reach the computer that they
are addressed to, the signal being refreshed by each node. In a ring topology, the network
signal is passed through each network card of each device and passed on to the next device.
Each device processes and retransmits the signal, so it is capable of supporting many
devices in a somewhat slow but very orderly fashion. There is a very nice feature that
everybody gets a chance to send a packet and it is guaranteed that every node gets to send a
packet in a finite amount of time.
o Broadcasting and multicasting is simple since you just need to send out one message
o Less expensive since less cable footage is required
o It is guaranteed that each host will be able to transmit within a finite time interval
o Very orderly network where every device has access to the token and the opportunity to transmit
o Performs better than a star network under heavy network load
o Failure of one node brings the whole network down
o Error detection and network administration becomes difficult
o Moves, adds and changes of devices can effect the network o
It is slower than star topology under normal load
Generally, a BUS architecture is preferred over the other topologies - ofcourse, this is a very
subjective opinion and the final design depends on the requirements of the network more than
anything else. Lately, most networks are shifting towards the STAR topology. Ideally we would
like to design networks, which physically resemble the STAR topology, but behave like BUS or
DEFINE TOKEN RING?
IEEE 802.4: Token Bus Network
In this system, the nodes are physically connected as a bus, but logically form a ring
with tokens passed around to determine the turns for sending. It has the robustness of
the 802.3 broadcast cable and the known worst case behavior of a ring. The structure of
a token bus network is as follows:
A 802.4 frame has the following fields:
Preamble: The Preamble is used to synchronize the receiver's clock.
Starting Delimiter (SD) and End Delimiter (ED): The Starting Delimiter and Ending
Delimiter fields are used to mark frame boundaries. Both of them contain analog encoding of
symbols other than 1 or 0 so that they cannot occur accidentally in the user data. Hence no
length field is needed.
Frame Control (FC): This field is used to distinguish data frames from control frames. For
data frames, it carries the frame's priority as well as a bit which the destination can set as an
acknowledgement. For control frames, the Frame Control field is used to specify the frame
type. The allowed types include token passing and various ring maintenance frames.
Destination and Source Address: The Destination and Source address fields may be 2 bytes
(for a local address) or 6 bytes (for a global address).
Data: The Data field carries the actual data and it may be 8182 bytes when 2 byte addresses
are used and 8174 bytes for 6 byte addresses.
Checksum: A 4-byte checksum calculated for the data. Used in error detection.
When the first node on the token bus comes up, it sends a Claim_token packet to
initialize the ring. If more than one station sends this packet at the same time, there is a
collision. Collision is resolved by a contention mechanism, in which the contending
nodes send random data for 1, 2, 3 and 4 units of time depending on the first two bits of
their address. The node sending data for the longest time wins. If two nodes have the
same first two bits in their addresses, then contention is done again based on the next
two bits of their address and so on. After the ring is set up, new nodes which are
powered up may wish to join the ring. For this a node sends Solicit_successor_1
packets from time to time, inviting bids from new nodes to join the ring. This packet
contains the address of the current node and its current successor, and asks for nodes in
between these two addresses to reply. If more than one nodes respond, there will be
collision. The node then sends a Resolve_contention packet, and the contention is
resolved using a similar mechanism as described previously. Thus at a time only one
node gets to enter the ring. The last node in the ring will send a Solicit_successor_2
packet containing the addresses of it and its successor. This packet asks nodes not
having addresses in between these two addresses to respond. A question arises that how
frequently should a node send a Solicit_successor packet? If it is sent too frequently,
then overhead will be too high. Again if it is sent too rarely, nodes will have to wait for
a long time before joining the ring. If the channel is not busy, a node will send a
Solicit_successor packet after a fixed number of token rotations. This number can be
configured by the network administrator. However if there is heavy traffic in the
network, then a node would defer the sending of bids for successors to join in. There
may be problems in the logical ring due to sudden failure of a node. What happens
when a node goes down along with the token? After passing the token, a node, say node
A, listens to the channel to see if its successor either transmits the token or passes a
frame. If neither happens, it resends a token. Still if nothing happens, A sends a
Who_follows packet, containing the address of the down node. The successor of the
down node, say node C, will now respond with a Set_successor packet, containing its
own address. This causes A to set its successor node to C, and the logical ring is
restored. However, if two successive nodes go down suddenly, the ring will be dead and
will have to be built afresh, starting from a Claim_token packet. When a node wants to
shutdown normally, it sends a Set_successor packet to its predecessor, naming its own
The third method allows data frames to contain an arbitrary number of bits and allows
character codes with an arbitrary number of bits per character. At the start and end of
each frame is a flag byte consisting of the special bit pattern 01111110. Whenever the
sender's data link layer encounters five consecutive 1s in the data, it automatically stuffs
a zero bit into the outgoing bit stream. This technique is called bit stuffing. When the
receiver sees five consecutive 1s in the incoming data stream, followed by a zero bit, it
automatically destuffs the 0 bit. The boundary between two frames can be determined
by locating the flag pattern.
DATA LINK LAYER
1. What do you mean by Automatic Repeat Request (ARQ)?
ARQ means retransmission of data in three cases:
2. What are the responsibilities of Data Link Layer?
The Data Link Layer transforms the physical layer, a raw transmission facility, to a
reliable link and is responsible for node-node delivery.
3. What are the three protocols used for noisy channels?
The three protocols used for noisy channels
Stop – and – Wait ARQ
Go – back – N ARQ
Selective Repeat ARQ
4. What is CSMA/CD?
Carrier Sense Multiple Access with Collision Detection is a protocol used to sense
whether a medium is busy before transmission and it also has the ability to detect whether
the packets has collided with another
5. What are the various types of connecting devices?
There are five types of connecting devices
6. Define Flow control
It refers to a set of procedures used to restrict the amount of data the sender
can sent before waiting for an acknowledgement
7. What are the categories of Flow control?
The categories of Flow control are
8. Mention the disadvantages of stop& wait.
9. What are the functions of data link layer?
The functions of data link layer are
10. Define Link Discipline
It coordinates the link system. It determines which device can send and when it can
11. What do you mean by polling?
When the primary device is ready to receive data, it asks the secondary to send data.
This is called polling.
12.What are the various controlled access methods?
The various controlled access methods are
13 What are the various Random access methods?\
The various Random access methods are
14. Define Piconet
A Bluetooth network is called Piconet .It can have up to eight stations one of which