Module 1 - Introduction To Computer Networks - Lecturer Notes
Module 1 - Introduction To Computer Networks - Lecturer Notes
Module I: Introduction
1.0 Introduction
The merging of computers and communications has had a profound influence on the way
computer systems are organized. The once-dominant concept of the ‘‘computer center’’ as a
room with a large computer to which users bring their work for processing is now totally
obsolete. The old model of a single computer serving all the organization’s computational
needs has been replaced by one in which many separate but interconnected computers do
the job. These systems are called computer networks.
A computer network is an interconnected collection of autonomous computers. Two
computers are said to be interconnected if they can exchange information. The connection
need not be via a copper wire; fiber optics, microwaves, infrared, and communication
satellites can also be used. The below Figure 1.1 illustrates the basic concept of computer
networks.
Figure 1.1: Computer Networks with three clients and one server
1 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
2 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
3 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
Ubiquitous computing: in which computing is embedded into everyday life. Many homes
are already wired with security systems that include door and window sensors, and there
are many more sensors that can be folded in to a smart home monitor, such as energy
consumption. Your electricity, gas and water meters could also report usage over the
network. And your smoke detectors could call the fire department instead of making a big
noise. Increasingly, consumer electronic devices are networked. For example, some high-
end cameras already have a wireless network capability and use it to send photos to a
nearby display for viewing. Professional sports photographers can also send their photos to
their editors in real-time. Devices such as televisions that plug into the wall can use power-
line networks to send information throughout the house over the wires that carry electricity.
A technology called RFID (Radio Frequency IDentification) tags are passive (i.e., have no
battery) chips the size of stamps and they can already be affixed to books, passports, pets,
credit cards, and other items in the home and out. This lets RFID readers locate and
communicate with the items over up to several meters, depending on the kind of RFID.
4 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
5 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
6 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
7 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
In most WANs, the subnet consists of two distinct components: transmission lines
and switching elements. Transmission lines move bits between machines. They can be made
of copper wire, optical fiber, or even radio links. Most companies do not have transmission
lines lying about, so instead they lease the lines from a telecommunications company.
Switching elements or just switches, are specialized computers that connect two or more
transmission lines. When data arrive on an incoming line, the switching element must
choose an outgoing line on which to forward them. These switching computers have been
called by various names in the past; the name router is now most used.
Usually in a WAN, the hosts and subnet are owned and operated by different people.
In this example, the employees might be responsible for their own computers, while the
company’s IT department oversees the rest of the network. The routers will usually connect
different kinds of networking technology. The networks inside the offices may be switched
Ethernet, for example, while the long-distance transmission lines may be SONET links. This
means that many WANs will in fact be internetworks, or composite networks that are made
up of more than one network.
Rather than lease dedicated transmission lines, a company might connect its offices
to the Internet. This allows connections to be made between the offices as virtual links. This
arrangement is called a VPN (Virtual Private Network). Compared to the dedicated
arrangement, a VPN has the usual advantage of virtualization, which is that it provides
flexible reuse of a resource (Internet connectivity). A VPN also has the usual disadvantage
of virtualization, which is a lack of control over the underlying resources. Figure 1.6
illustrates WAN using a virtual private network.
The subnet may be run by a different company. The subnet operator is known as a
network service provider and the offices are its customers. The subnet operator will connect
to other customers too, if they can pay and it can provide service.
Since it would be a disappointing network service if the customers could only send
packets to each other, the subnet operator will also connect to other networks that are part
of the Internet. Such a subnet operator is called an ISP (Internet Service Provider) and the
subnet is an ISP network. Its customers who connect to the ISP receive Internet service.
Figure 1.7 illustrates WAN using an ISP network.
8 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
In most WANs, the network contains many transmission lines, each connecting a pair
of routers. If two routers that do not share a transmission line wish to communicate, they
must do this indirectly, via other routers. There may be many paths in the network that
connect these two routers. How the network makes the decision as to which path to use is
called the routing algorithm. Many such algorithms exist. How each router makes the
decision as to where to send a packet next is called the forwarding algorithm.
1.2.5. Internetworks
Many networks exist in the world, often with different hardware and software. People
connected to one network often want to communicate with people attached to a different
one. The fulfillment of this desire requires that different, and frequently incompatible,
networks be connected. A collection of interconnected networks is called an internetwork
or internet. A collection of interconnected networks of networks is called an Internetwork
or Internet.
The general name for a machine that makes a connection between two or more
networks and provides the necessary translation, both in terms of hardware and software,
is a gateway.
9 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
10 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
11 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
Another reliability issue is finding a working path through a network. Often there are
multiple paths between a source and destination, and in a large network, there may be some
links or routers that are broken. Suppose that the network is down in Germany. Packets sent
from London to Rome via Germany will not get through, but we could instead send packets
from London to Rome via Paris. The network should automatically make this decision. This
topic is called routing.
Evolution of the network: Over time, networks grow larger and new designs emerge that
need to be connected to the existing network. We have recently seen the key structuring
mechanism used to support change by dividing the overall problem and hiding
implementation details: protocol layering.
Since there are many computers on the network, every layer needs a mechanism for
identifying the senders and receivers that are involved in a particular message. This
mechanism is called addressing or naming, in the low and high layers, respectively.
An aspect of growth is that different network technologies often have different
limitations. For example, not all communication channels preserve the order of messages
sent on them, leading to solutions that number messages. Another example is differences in
the maximum size of a message that the networks can transmit. This leads to mechanisms
for disassembling, transmitting, and then reassembling messages. This overall topic is called
internetworking.
When networks get large, new problems arise. Cities can have traffic jams, a shortage
of telephone numbers, and it is easy to get lost. Not many people have these problems in
their own neighborhood, but citywide they may be a big issue. Designs that continue to work
well when the network gets large are said to be scalable.
Resource allocation: Networks provide a service to hosts from their underlying resources,
such as the capacity of transmission lines. Many designs share network bandwidth
dynamically, according to the short-term needs of hosts, rather than by giving each host a
fixed fraction of the bandwidth that it may or may not use. This design is called statistical
multiplexing, meaning sharing based on the statistics of demand.
An allocation problem that occurs at every level is how to keep a fast sender from
swamping a slow receiver with data. Feedback from the receiver to the sender is often used.
This subject is called flow control. Sometimes the problem is that the network is
oversubscribed because too many computers want to send too much traffic, and the network
cannot deliver it all. This overloading of the network is called congestion. Most networks
must provide service to applications that want this real-time delivery while they provide
service to applications that want high throughput. Quality of service is the name given to
mechanisms that reconcile these competing demands.
Secure the network: defending it against different kinds of threats. One of the threats we
have mentioned previously is that of eavesdropping on communications. Mechanisms that
provide confidentiality defend against this threat, and they are used in multiple layers.
Mechanisms for authentication prevent someone from impersonating someone else. They
might be used to tell fake banking Web sites from the real one, or to let the cellular network
12 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
check that a call is really coming from your phone so that you will pay the bill. Other
mechanisms for integrity prevent surreptitious changes to messages, such as altering ‘‘debit
my account $10’’ to ‘‘debit my account $1000.’’
13 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
Service Example
Reliable message stream Sequence of pages
Connection-oriented
Reliable byte stream Movie download
Unreliable connection Voice over IP
Unreliable datagram Electronic junk mail
Connection-less Acknowledged datagram Text messaging
Request-reply Database query
Primitive Meaning
14 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
15 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
3. The function of each layer should be chosen with an eye toward defining
internationally standardized protocols.
4. The layer boundaries should be chosen to minimize the information flow across the
interfaces.
5. The number of layers should be large enough that distinct functions need not be
thrown together in the same layer out of necessity and small enough that the
architecture does not become unwieldy.
Physical Layer: the physical layer is concerned with transmitting raw bits over a
communication channel.
Design Issues
When one side sends a 1 bit it is received by the other side as a 1 bit, not as a 0 bit,
What electrical signals should be used to represent a 1 and a 0,
How many nanoseconds a bit last,
Whether transmission may proceed simultaneously in both directions,
How the initial connection is established, how it is torn down when both sides are
finished.
Data Link Layer: The main task of the data link layer is to transform a raw transmission
facility into a line that appears free of undetected transmission errors
Design Issues
Masking the real errors (It accomplishes this task by having the sender break up the
input data into data frames and transmit the frames sequentially)
How to keep a fast transmitter from drowning a slow receiver in data (traffic
regulation mechanism)
16 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
In the case of Broadcast networks, how to control access to the shared channel
(medium access control sublayer)
Network Layer: The network layer controls the operation of the subnet.
Design Issues
Determining how packets are routed from source to destination (static tables).
Handling congestion (inform higher layers to reduce the load).
The quality of service provided (delay, transit time, jitter, etc.) is also a network layer
issue.
Heterogeneous networks to be interconnected.
In broadcast networks, the routing problem is simple, so the network layer is often
thin or even nonexistent.
Transport Layer: The basic function of the transport layer is to accept data from above it,
split it up into smaller units, if need be, pass these to the network layer, and ensure that the
pieces all arrive correctly at the other end.
Design Issues
Determining what type of service to provide to the session layer, and, ultimately, to
the users of the network.
Providing true end-to-end layer service; it carries data all the way from the source to
the destination. In the lower layers, each protocol is between a machine and its
immediate neighbors, and not between the ultimate source and destination
machines, which may be separated by many routers.
Session Layer: The session layer allows users on different machines to establish sessions
between them.
Design Issues
Dialog control (keeping track of whose turn it is to transmit),
Token management (preventing two parties from attempting the same critical
operation simultaneously),
Synchronization (checkpointing long transmissions to allow them to pick up from
where they left off in the event of a crash and subsequent recovery).
Presentation Layer: Unlike the lower layers, which are mostly concerned with moving bits
around, the presentation layer is concerned with the syntax and semantics of the
information transmitted.
Design Issue
To make it possible for computers with different internal data representations to
communicate, the data structures to be exchanged can be defined in an abstract way,
along with a standard encoding to be used ‘‘on the wire.’’ The presentation layer
manages these abstract data structures and allows higher-level data structures (e.g.,
banking records) to be defined and exchanged.
17 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
Application Layer: The application layer contains a variety of protocols that are commonly
needed by users. One widely used application protocol is HTTP (HyperText Transfer
Protocol), which is the basis for the World Wide Web. When a browser wants a Web page, it
sends the name of the page it wants to the server hosting the page using HTTP. The server
then sends the page back. Other application protocols are used for file transfer, electronic
mail, and network news.
Link Layer: The lowest layer in the model, the link layer describes what links such as serial
lines and classic Ethernet must do to meet the needs of this connectionless internet layer. It
is not really a layer at all, in the normal sense of the term, but rather an interface between
hosts and transmission links.
Internet layer: it is the linchpin that holds the whole architecture together. Its job is to
permit hosts to inject packets into any network and have them travel independently to the
destination (potentially on a different network). They may even arrive in a completely
different order than they were sent, in which case it is the job of higher layers to rearrange
them, if in-order delivery is desired.
The internet layer defines an official packet format and protocol called IP (Internet
Protocol), plus a companion protocol called ICMP (Internet Control Message Protocol) that
18 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
helps it function. The job of the internet layer is to deliver IP packets where they are
supposed to go.
Internet Layer: The layer above the internet layer in the TCP/IP model is now usually called
the transport layer. It is designed to allow peer entities on the source and destination hosts
to carry on a conversation. Two end-to-end transport protocols have been defined here. The
first one, TCP (Transmission Control Protocol). Few unique features of TCP are listed below.
Is a reliable connection-oriented protocol.
It segments the incoming byte stream into discrete messages and passes each one on
to the internet layer (Segmentation).
At the destination, the receiving TCP process reassembles the received messages into
the output stream (Reassembling).
TCP also handles flow control.
The second protocol in this layer, UDP (User Datagram Protocol). It is an unreliable,
connectionless protocol. It is also widely used for one-shot, client-server-type request-
reply queries and applications in which prompt delivery is more important than accurate
delivery, such as transmitting speech or video.
The TCP/IP model does not have session or presentation layers. No need for them was
perceived. Instead, applications simply include any session and presentation functions that
they require.
Application Layer: On top of the transport layer is the application layer. It contains all the
higher-level protocols. The early ones included virtual terminal (TELNET), file transfer
(FTP), and electronic mail (SMTP). Many other protocols have been added to these over the
years. Figure 1.13 shows the protocols used in TCP/IP model.
19 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
20 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
21 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
signal is superimposed on the low-frequency power signal as both signals use the wiring at
the same time. Figure 1.16 shows the power lines.
Drawbacks
It was designed to distribute power signals.
Electrical signals are sent at 50–60 Hz and the wiring attenuates the much higher
frequency (MHz) signals needed for high-rate data communication.
The electrical properties of the wiring vary from one house to the next and change as
appliances are turned on and off, which causes data signals to bounce around the
wiring.
Transient currents when appliances switch on and off create electrical noise over a
wide range of frequencies.
Figure 1.17: (a) Side view of a single fiber. (b) End view of a sheath with three fibers
22 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
Advantages
Disadvantages
Fiber is a less familiar technology requiring skills not all engineers have.
Fibers can be damaged easily by being bent too much.
Since optical transmission is inherently unidirectional, two-way communication
requires either two fibers or two frequency bands on one fiber.
Finally, fiber interfaces cost more than electrical interfaces.
However, in some cases, a wider band is used, with three variations. In frequency
hopping spread spectrum, the transmitter hops from frequency-to-frequency hundreds of
times per second. It is popular for military communication because it makes transmissions
hard to detect and next to impossible to jam. It also offers good resistance to multipath
fading and narrowband interference because the receiver will not be stuck on an impaired
frequency for long enough to shut down communication. This technique is used
commercially, for example, in Bluetooth and older versions of 802.11.
A second form of spread spectrum, direct sequence spread spectrum, uses a code
sequence to spread the data signal over a wider frequency band. It is widely used
commercially as a spectrally efficient way to let multiple signals share the same frequency
band. These signals can be given different codes, a method called CDMA (Code Division
Multiple Access). It forms the basis of 3G mobile phone networks and is also used in GPS
(Global Positioning System). It is used in older 802.11b wireless LANs.
23 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
At low frequencies, radio waves pass through obstacles well, but the power falls off
sharply with distance from the source—at least as fast as 1/r2 in air—as the signal energy is
spread more thinly over a larger surface. This attenuation is called path loss.
At high frequencies, radio waves tend to travel in straight lines and bounce off obstacles.
Path loss still reduces power, though the received signal can depend strongly on reflections
as well.
24 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology
COMPUTER NETWORKS 21CS52
25 Dr. Lokanna Kadakolmath, Assistant Professor, Dept. of ISE, Acharya Institute of Technology