Module 1 Notes 21CS52 COMPUTER NETWORKS
Module 1 Notes 21CS52 COMPUTER NETWORKS
PHYSICAL LAYER
NETWORK HARDWARE
There is no generally accepted taxonomy into which all computer networks fit, but
two dimensions stand out as important: transmission technology and scale. There are
two types of transmission technology that are in widespread use: broadcast links and
point-to-point links.
Point-to-point links connect individual pairs of machines. To go from the source to
the destination on a network made up of point-to-point links, short messages, called
packets have to first visit one or more intermediate machines. Multiple routes, of
different lengths, are possible, so finding good ones is important in point-to-point
networks. Point-to-point transmission with exactly one sender and exactly one
receiver is sometimes called unicasting.
In broadcast network, the communication channel is shared by all the machines on
the network; packets sent by any machine are received by all the others. An address
field within each packet specifies the intended recipient. Upon receiving a packet, a
machine checks the address field. If the packet is intended for the receiving machine,
that machine processes the packet; if the packet is intended for some other machine,
it is just ignored. A wireless network is a common example of a broadcast link.
Broadcast systems usually also allow the possibility of addressing a packet to all
destinations by using a special code in the address field. When a packet with this code
is transmitted, it is received and processed by every machine on the network. This
mode of operation is called broadcasting.
Some broadcast systems also support transmission to a subset of the machines, which
known as multicasting.
An alternative criterion for classifying networks is by scale. Distance is classification
metric because different technologies are used at different scales. Networks These can
be divided into local, metropolitan, and wide area networks, each with increasing
scale. Finally, the connection of two or more networks is called an internetwork.
Internetworks
Collection of interconnected networks is called an internetwork or internet. A
network is formed by the combination of a subnet and its hosts.
An internet is formed when distinct networks are interconnected. In our view,
connecting a LAN and a WAN or connecting two LANs is the usual way to form an
internetwork, 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. A router is a gateway that switches packets at the network
layer.
NETWORK SOFTWARE
Network software is now highly structured.
Protocol Hierarchies
To reduce their design complexity, most networks are organized as a stack of layers
or levels, each one built upon the one below it. The number of layers, the name of
each layer, the contents of each layer, and the function of each layer differ from
network to network.
The purpose of each layer is to offer certain services to the higher layers while
shielding those layers from the details of how the offered services are actually
implemented.
When layer n on one machine carries on a conversation with layer n on another
machine, the rules and conventions used in this conversation are collectively known
as the layer n protocol. Basically, a protocol is an agreement between the
communicating parties on how communication is to proceed.
Service Primitives
A service is formally specified by a set of primitives (operations) available to user
processes to access the service. These primitives tell the service to perform some
action or report on an action taken by a peer entity. If the protocol stack is located in
the operating system, as it often is, the primitives are normally system calls. These
calls cause a trap to kernel mode, which then turns control of the machine over to the
operating system to send the necessary packets.
The set of primitives available depends on the nature of the service being provided.
The primitives for connection-oriented service are different from those of
connectionless service.
When the packet arrives at the server, the operating system sees that the packet is
requesting a connection. It checks to see if there is a listener, and if so it unblocks the
listener. The server process can then establish the connection with the ACCEPT call.
This sends a response (2) back to the client process to accept the connection. The
arrival of this response then releases the client. At this point the client and server are
both running and they have a connection established.
The next step is for the server to execute RECEIVE to prepare to accept the first
request. The server does this immediately upon being released from the LISTEN,
before the acknowledgement can get back to the client. The RECEIVE call blocks the
server. Then the client executes SEND to transmit its request (3) followed by the
execution of RECEIVE to get the reply. The arrival of the request packet at the server
machine unblocks the server so it can handle the request. After it has done the work,
the server uses SEND to return the answer to the client (4). The arrival of this packet
unblocks the client, which can now inspect the answer. If the client has additional
requests, it can make them now.
Bad Technology
The second reason that OSI never caught on is that both the model and the protocols
are flawed.
Out of the seven layers two of the layers (session and presentation) are nearly
empty, whereas two other ones (data link and network) are overfull.
Reshma, Dept of CSE, Acharya Institute of Technology
Bangalore
The OSI model, along with its associated service definitions and protocols, is
extraordinarily complex.
Another problem with OSI is that some functions, such as addressing, flow control,
and error control, reappear again and again in each layer. Error control must be
done in the highest layer, so that repeating it over and over in each of the lower
layers is often unnecessary and inefficient.
Bad Implementations
Given the enormous complexity of the model and the protocols, the initial
implementations were huge, unwieldy, and slow. People associated OSI with Poor
Quality.
In contrast, one of the first implementations of TCP/IP was part of Berkeley UNIX
and was quite good (not to mention, free).
Bad Politics
On account of the initial implementation, many people, especially in academia,
thought of TCP/IP as part of UNIX, and UNIX in the 1980s in academia was not
unlike parenthood (then incorrectly called motherhood) and apple pie.
OSI, on the other hand, was widely thought to be the creature of the European
telecommunication ministries, the European Community, and later the U.S.
Government.
Magnetic Media
One of the most common ways to transport data from one computer to another is
to write them onto magnetic tape or removable media, physically transport the tape
or disks to the destination machine, and read them back in again. Although this
method is not as sophisticated as using a geosynchronous communication satellite,
it is often more cost effective, especially for applications in which high bandwidth
or cost per bit transported is the key factor.
It also provides adequate performance.
Twisted Pairs
For many applications an online connection is needed. One of the oldest and still
most common transmission media is twisted pair.
A twisted pair consists of two insulated copper wires, typically about 1 mm thick.
The wires are twisted together in a helical form. Twisting is done because two
parallel wires constitute a fine antenna. When the wires are twisted, the waves from
different twists cancel out, so the wire radiates less effectively.
A signal is usually carried as the difference in voltage between the two wires in the
pair. This provides better immunity to external noise because the noise tends to
affect both wires the same, leaving the differential unchanged.
Twisted pairs can run several kilometers without amplification, but for longer
distances the signal becomes too attenuated and repeaters are needed.
Twisted pairs can be used for transmitting either analog or digital information.
The bandwidth depends on the thickness of the wire and the distance traveled, but
several megabits/sec can be achieved for a few kilometers in many cases.
Due to the adequate performance and low cost, twisted pairs are widely used and are
likely to remain so for years to come.
Reshma, Dept of CSE, Acharya Institute of Technology
Bangalore
A category 5 twisted pair consists of two insulated wires gently twisted together.
Four such pairs are typically grouped in a plastic sheath to protect the wires and keep
them together.
Cat 5 replaced earlier Category 3 cables with a similar cable that uses the same
connector, but has more twists per meter. More twists result in less crosstalk and a
better-quality signal over longer distances, making the cables more suitable for high-
speed computer communication, especially 100-Mbps and 1-Gbps Ethernet LANs.
New wiring is more likely to be Category 6 or even Category 7. These categories
handle signals with greater bandwidths. Some cables in Category 6 and above are
rated for signals of 500 MHz and can support the 10-Gbps links that will soon be
deployed.
Through Category 6, these wiring types are referred to as UTP (Unshielded Twisted
Pair) as they consist simply of wires and insulators.
Category 7 cables have shielding on the individual twisted pairs, as well as around
the entire cable. Shielding reduces the external interference and crosstalk with other
nearby cables to meet demanding performance specifications. The cables are
reminiscent of the high-quality, but bulky and expensive.
Coaxial Cable
Another common transmission medium is the coaxial cable. It has better shielding
and greater bandwidth than unshielded twisted pairs, so it can span longer distances
at higher speeds.
Two kinds of coaxial cable are widely used. One kind, 50-ohm cable, is commonly
used when it is intended for digital transmission from the start. The other kind, 75-
ohm cable, is used for analog transmission and cable television.
A coaxial cable consists of a stiff copper wire as the core, surrounded by an
insulating material. The insulator is encased by a cylindrical conductor, like a
closely woven braided mesh. The outer conductor is covered in a protective plastic
sheath. A cutaway view of a coaxial cable is shown in Fig.
The construction and shielding of the coaxial cable give it a good combination of
high bandwidth and excellent noise immunity.
Power Lines
More common kind of wiring is: electrical power lines.
Power lines deliver electrical power to houses, and electrical wiring within houses
distributes the power to electrical outlets.
Power lines have been used by electricity companies for low-rate communication.
In recent years there has been renewed interest in high-rate communication over
these lines, both inside the home as a LAN and outside the home for broadband
Internet access.
The difficulty with using household electrical wiring for a network is that it was
designed to distribute power signals.
Fiber Optics
Fiber optics are used for long-haul transmission in network backbones, highspeed
LANs and high-speed Internet access such as FttH (Fiber to the Home).
An optical transmission system has three key components: the light source, the
transmission medium, and the detector. A pulse of light indicates a 1 bit and the
absence of light indicates a 0 bit. The transmission medium is an ultra-thin fiber of
glass. The detector generates an electrical pulse when light falls on it.
By attaching a light source to one end of an optical fiber and a detector to the other,
we have a unidirectional data transmission system that accepts an electrical signal,
converts and transmits it by light pulses, and then reconverts the output to an
electrical signal at the receiving end.
This transmission system would leak light and be useless in practice were it not for
an interesting principle of physics.
For angles of incidence above a certain critical value, the light is refracted back into
the transmission medium; none of it escapes into the air. Thus, a light ray incident
at or above the critical angle is trapped inside the fiber, as shown in Fig, and can
propagate for many kilometers with virtually no loss.
Fiber Cables
Fiber optic cables are similar to coax, except without the braid. Figure 2-8(a) shows
a single fiber viewed from the side. At the center is the glass core through which
the light propagates. In multimode fibers, the core is typically 50 microns in
diameter, about the thickness of a human hair. In single-mode fibers, the core is 8
to 10 microns.
The core is surrounded by a glass cladding with a lower index of refraction than
the core, to keep all the light in the core. Next a thin plastic jacket to protect the
cladding. Fibers are typically grouped in bundles, protected by an outer sheath.
Reshma, Dept of CSE, Acharya Institute of Technology
Bangalore
Figure 2-8(b) shows a sheath with three fibers.
Fibers can be connected in three different ways.
First, they can terminate in connectors and be plugged into fiber sockets.
Connectors lose about 10 to 20% of the light, but they make it easy to reconfigure
systems.
Second, they can be spliced mechanically. Mechanical splices just lay the two
carefully cut ends next to each other in a special sleeve and clamp them in place.
Alignment can be improved by passing light through the junction and then making
small adjustments to maximize the signal. Mechanical splices take trained
personnel about 5 minutes and result in a 10% light loss.
Third, two pieces of fiber can be fused (melted) to form a solid connection. A fusion
splice is almost as good as a single drawn fiber, but a small amount of attenuation
occurs.
For all three kinds of splices, reflections can occur at the point of the splice, and
the reflected energy can interfere with the signal.
Two kinds of light sources are typically used to do the signaling. These are LEDs
(Light Emitting Diodes) and semiconductor lasers.
The receiving end of an optical fiber consists of a photodiode, which gives off an
electrical pulse when struck by light. The response time of photodiodes, which
convert the signal from the optical to the electrical domain, limits data rates to
about 100 Gbps.