0% found this document useful (0 votes)
3 views

Network

The document discusses various applications and types of computer networks, including business, home, and mobile applications, as well as social issues related to network usage. It categorizes networks based on transmission technology (broadcast vs. point-to-point) and scale (PANs, LANs, MANs, WANs, and internetworks), detailing their characteristics and functions. Additionally, it covers network software, protocol hierarchies, and the importance of gateways and routers in facilitating communication across different networks.

Uploaded by

K.K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Network

The document discusses various applications and types of computer networks, including business, home, and mobile applications, as well as social issues related to network usage. It categorizes networks based on transmission technology (broadcast vs. point-to-point) and scale (PANs, LANs, MANs, WANs, and internetworks), detailing their characteristics and functions. Additionally, it covers network software, protocol hierarchies, and the importance of gateways and routers in facilitating communication across different networks.

Uploaded by

K.K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

NETWORK ARCHITECTURES SKRIPTA

Uses of Computer Networks


•Business Applica.ons – examples: distribute informa5on through the company computers(resource sharing) –
make available all data for computers in the network- like
some computers in office share the same printer, another
model used for this purpose is client-server(where more
computers ask for informa.on in databases through the
network) Virtual private networking VPN, communica5on
(email ), telephone calling through network(not the one by
phone company) as known as IP telephony or Voice over IP
VoIP, video calls(conference calls), desktop sharing, ecommerce( making business over internet) which is seen in
airlines bookstores etc.

•Home Applica.ons – entertainment(movies videos ) access to remote


informa5on (work from home or outside home ), news and informa.on
(peer to peer communica5on – communica.on one to one through
network, for example the BitTorrent, sharing music and videos,
communica5on purposes - instant messages(twiIer), social
network(facebook), crea5on of a
content( Wikipedia), ecommerce – buying and
selling from your home,online auc.ons,
ubiquitous compu5ng (smart home through
sensors )

•Mobile Users - text messaging (mobile phones


and laptops) though wifi, or 3g/4g, guiding – posi5on control and
movement , GPS(global posi.oning system), m-commerce(mobile
commerce) – payment of food or movie .cket booking from
phone, wearable computers(smart watches), NFC(near field
communica.on)

•Social Issues - Companies that provide Web-based services may


maintain large amounts of personal informa.on about their users that allows them to study user ac.vi.es directly.
For example, Google can read your email and show you adver.sements based on your interests if you use its email
service, Gmail. As part of the process of providing service to your mobile device the network operators learn where
you are at different .mes of day. Web pages and email messages containing ac.ve content (basically, programs or
macros that execute on the receiver’s machine) can contain viruses that take over your computer. They might be
used to steal your bank account passwords, or to have your computer send spam as part of a botnet or pool of
compromised machines. Phishing messages masquerade as origina.ng from a trustworthy party, for example, your
bank, to try to trick you into revealing sensi.ve informa.on, for example, credit card numbers.

There is no generally accepted taxonomy into which all computer networks fit, but two dimensions stand out as
important: transmission technology and scale.

Тhere are two types of transmission technology that are in widespread use: broadcast links and point-to-point links.
Types of transmission technology
•Broadcast links
the communica.on 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. Broadcast systems usually also allow the
possibility of addressing a packet to all des.na.ons by using a special code in the address field. When a packet with
this code is transmiIed, it is received and processed by every machine on the network. This mode of opera.on is
called broadcas5ng. Some broadcast systems also support transmission to a subset of the machines, which known as
mul5cas5ng.
•Point-to-point links
Point-to-point links connect individual pairs of machines. To go from the source to the des.na.on on a network
made up of point-to-point links, short messages, called packets in certain contexts, may have to first visit one or
more intermediate machines. O]en mul.ple 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 some.mes called unicas5ng.

An alterna.ve criterion for classifying networks is by scale. Distance is importantas a classifica.on metric because
different technologies are used at different scales.

PANs (Personal Area Networks) let devices communicate


over the range of
a person. A common example is a wireless network that
connects a computer with its peripherals. Almost every
computer has an aIached monitor, keyboard, mouse, and
printer.
a short-range wireless network called Bluetooth to connect
these components without wires. PANs can also be built with
other technologies that communicate over short
ranges, such as RFID on smartcards and library books
Local Area Networks (LAN)
Bluetooth configura5on
Wireless LAN
A LAN is a privately owned network that operates within and nearby a single building like a home, office or factory.
LANs are widely used to connect personal computers and consumer electronics to let them share resources (e.g.,
printers) and exchange informa.on. When LANs are used by
companies, they are called enterprise networks.
Wireless LANs are computers that have a radio modem and an
antenna that uses to communicate with other computers. This
device, called an AP (Access Point), wireless router, or base
sta5on, relays packets between the wireless computers and also
between them and the Internet. There is a standard for wireless
LANs called IEEE 802.11, popularly known as WiFi, which has
become very widespread. Wired LANs use a range of different
transmission technologies. Most of them use copper wires, but
some use op.cal fiber. LANs are restricted in size,
which means that the worst-case transmission .me is bounded and known in advance.
Knowing these bounds helps with the task of designing network protocols. Typically, wired LANs run at speeds of 100
Mbps to 1 Gbps, have low delay (microseconds or nanoseconds), and make very few errors. Newer LANs can operate
at up to 10 Gbps. Compared to wireless networks, wired LANs exceed them in all dimensions of performance. It is
just easier to send signals over a wire or through a fiber than through the air.
The shape of a local-area network (LAN) is so known as topology. Topologies are either physical or logical.
There are four principal topologies used in LANs.
bus topology: All devices are connected to a central cable, called the bus or backbone. Bus networks are rela.vely
inexpensive and easy to install for small networks. Ethernet systems use a bus topology.
ring topology :All devices are connected to one another in the shape of a closed loop, so that each device is
connected directly to two other devices, one on either side of it. Ring topologies are rela.vely expensive and difficult
to install, but they offer high bandwidth and can span large distances.
star topology: All devices are connected to a central hub. Star networks are rela.vely easy to install and manage, but
boIlenecks can occur because all data must pass through the hub.
tree topology: A tree topology combines characteris.cs of linear bus and star topologies. It consists of groups of star-
configured worksta.ons connected to a linear bus backbone cable.

•Metropolitan Area Networks


A MAN (Metropolitan Area Network) covers a city. The best-known examples of MANs are the cable television
networks available in many ci.es. These systems grew from earlier community antenna systems used in areas with
poor over-the-air television recep.on. In those early systems, a large antenna was placed on top of a nearby hill and
a signal was then piped to the subscribers’ houses. When the
Internet began aIrac.ng a mass audience, the cable TV
network operators began to realize that with some changes to
the system, they could provide two-way Internet service in
unused parts of the spectrum. At that point, the cable TV
system began to morph from simply a way to distribute
television to a metropolitan area network

•Wide Area Networks


Categories of wireless networks:
System interconnec5on
Wireless LANs
Wireless WANs
WAN (Wide Area Network) spans a large geographical area, o]en a country or con.nent. We will begin our
discussion with wired WANs, using the example of a company with branch offices in different ci.es. The WAN in Fig is
a network that connects offices in Perth, Melbourne, and Brisbane. Each of these offices contains computers
intended for running user (i.e., applica.on) programs. We will follow tradi.onal usage and call these machines hosts.
The rest of the network that connects these hosts is then
called the communica5on subnet, or just subnet for
short. The job of the subnet is to carry messages from
host to host, just as the telephone system carries words
(really just sounds) from speaker to listener. In most
WANs, the subnet consists of two dis.nct components:
transmission lines and switching elements. Transmission
lines move bits between machines. They can be made of
copper wire, op.cal fiber, or even radio links. Most
companies do not have transmission lines lying about, so
instead they lease the lines from a telecommunica.ons
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 commonly used. Unfortunately, some
people pronounce it ‘‘rooter’’ while others have it rhyme with ‘‘doubter.’’ Determining the correct pronuncia.on will
be le] as an exercise for the reader. Usually in a WAN, the
hosts and subnet are owned and operated by different
people. A second difference is that 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.
We are now in a posi.on to look at two other varie.es of
WANs. First, rather than lease dedicated transmission lines,
a company might connect its offices to the Internet This
allows connec.ons to be made between the offices as virtual links that use the underlying capacity of the Internet.
This arrangement, is called a VPN (Virtual Private Network). Compared to the dedicated arrangement, a VPN has
the usual advantage of virtualiza.on, which is that it provides flexible reuse of a resource (Internet connec.vity).
Consider how easy it is to add a fourth office to see this. A VPN also has the usual disadvantage of virtualiza.on,
which is a lack of control over the underlying resources. With a dedicated line, the capacity is clear. With a VPN your
mileage may vary with your Internet service. The second varia.on is that 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, as long as they can pay and it can provide service. Since it would be a
disappoin.ng 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. In most
WANs, the network contains many transmission lines, each connec.ng 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. How the network
makes the decision as to which path to use is called the rou5ng algorithm. Other kinds of WANs make heavy use of
wireless technologies. In satellite systems, each computer on the ground has an antenna through which it can send
data to and receive data from to a satellite in orbit. All computers can hear the output from the satellite, and in some
cases they can also hear the upward transmissions of their fellow computers to the satellite as well. Satellite
networks are inherently broadcast and are most useful when the broadcast property is important. The cellular
telephone network is another example of a WAN that uses wireless technology. Each cellular base sta.on covers a
distance much larger than a wireless LAN, with a range measured in kilometers rather than tens of meters. The base
sta.ons are connected to each other by a backbone network that is usually wired. The data rates of cellular networks
are o]en on the order of 1 Mbps, much smaller than a wireless LAN that can range up to on the
order of 100 Mbps.

•Internetworks
Many networks exist in the world, o]en with different hardware and so]ware. People connected to one network
o]en want to communicate with people aIached to a different one. The fulfillment of this desire requires that
different, and frequently incompa.ble, networks be connected. A collec.on of interconnected networks is called an
internetwork or internet. The Internet uses ISP networks to connect enterprise
networks, home networks, and many other networks. Subnets, networks, and internetworks are o]en confused. The
term ‘‘subnet’’ makes the most sense in the context of a wide area network, where it refers to the collec.on of
routers and communica.on lines owned by the network operator. As an analogy, the telephone system consists of
telephone switching offices connected to one another by high-speed lines, and to houses and businesses by low-
speed lines. These lines and equipment, owned and managed by the telephone company, form the subnet of the
telephone system. The telephones themselves (the hosts in this analogy) are not part of the subnet. A network is
formed by the combina.on of a subnet and its hosts. However,the word ‘‘network’’ is o]en used in a loose sense as
well. A subnet might be described as a network, as in the case of the ‘‘ISP network’. talk about how two different
networks can be connected.
The general name for a machine that makes a connec.on between two or more networks and provides the
necessary transla.on, both in terms of hardware and so]ware, is a gateway. Gateways are dis.nguished by the layer
at which they operate in the protocol hierarchy.

Network SoYware

Since the benefit of forming an internet is to connect computers across networks, we do not want to use too low-
level a gateway or we will be unable to make connec.ons between different kinds of networks. We do not want to
use too high-level a gateway either, or the connec.on will only work for par.cular applica.ons.
The level in the middle that is ‘‘just right’’ is o]en called the network layer, and a router is a gateway that switches
packets at the network layer

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 func.on 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. In a sense, each layer is
a kind of virtual machine, offering certain services to the layer above it. This concept is actually a familiar one and is
used throughout computer science, where it is variously known as informa.on hiding, abstract data types, data
encapsula.on, and object oriented programming. The fundamental idea is that a par.cular piece of so]ware (or
hardware) provides a service to its users but keeps the details of its internal state and algorithms hidden from them.
When layer n on one machine carries on a conversa.on with layer n on another machine, the rules and conven.ons
used in this conversa.on are collec.vely known as the layer n protocol. Basically, a protocol is an agreement
between the communica.ng par.es on how communica.on is to proceed.
The en..es comprising the corresponding layers on different machines are called peers. The peers may be so]ware
processes, hardware devices, or even human beings. In other words, it is the peers that communicate by using the
protocol to talk to each other. In reality, no data are directly transferred from layer n on one machine to layer n on
another machine. Instead, each layer passes data and control informa.on to the layer immediately below it, un.l the
lowest layer is reached. Below layer 1 is the physical medium through which actual communica.on occurs. virtual
communica.on is shown by doIed lines and physical communica.on by solid lines.
Between each pair of adjacent layers is an interface. The interface defines which primi.ve opera.ons and services
the lower layer makes available to the upper one. When network designers decide how many layers to include in a
network and what each one should do, one of the most important considera.ons is defining clean interfaces
between the layers. Doing so, in turn, requires that each
layer perform a specific collec.on of well-understood
func.ons. In addi.on to minimizing the amount of
informa.on that must be passed between layers, clearcut
interfaces also make it simpler to replace one layer with a
completely different protocol or implementa.on (e.g.,
replacing all the telephone lines by satellite channels)
because all that is required of the new protocol or
implementa.on is that it offer exactly the same set of
services to its upstairs neighbor as the old one did. It is
common that different hosts use different implementa.ons
of the same protocol (o]en wriIen by different companies).
In fact, the protocol itself can change in some layer without
the layers above and below it even no.cing. A set of layers
and protocols is called a network architecture. The
specifica.on
of an architecture must contain enough informa.on to allow
an implementer to write the program or build the hardware
for each layer so that it will correctly obey the appropriate
protocol. Neither the details of the implementa.on nor the specifica.on of the interfaces is part of the architecture
because these are hidden away inside the machines and not visible from the outside. It is not even necessary that
the interfaces on all machines in a network be the same, provided that each machine can correctly use all the
protocols. A list of the protocols used by a certain system, one protocol per layer, is called a protocol stack.
how to provide communica.on to the top layer of the five-layer network .A message, M, is produced by an
applica.on process running in layer 5 and given to layer 4 for transmission. Layer 4 puts a header in front of the
message to iden.fy the message and passes the result to
layer 3. The header includes control informa.on, such as
addresses, to allow layer 4 on the des.na.on machine to
deliver the message. Other examples of control
informa.on used in some layers are sequence numbers
(in case the lower layer does not preserve message
order), sizes, and .mes. In many networks, no limit is
placed on the size of messages transmiIed in the layer 4
protocol but there is nearly always a limit imposed by
the layer 3 protocol. Consequently, layer 3 must break up
the incoming messages into smaller units, packets,
prepending a layer 3 header to each packet. In this
example, M is split into two parts, M1 and M2, that will
be transmiIed separately. Layer 3 decides which of the
outgoing lines to use and passes the packets to layer 2.
Layer 2 adds to each piece not only a header but also a trailer, and gives the resul.ng unit to layer 1 for physical
transmission. At the receiving machine the message moves upward, from layer to layer, with headers being stripped
off as it progresses. None of the headers for layers below n are passed up to layer n. The important thing to
understand about Fig. 1-15 is the rela.on between the virtual and actual communica.on and the difference between
protocols and interfaces. The peer processes in layer 4, for example, conceptually think of their communica.on as
being ‘‘horizontal,’’ using the layer 4 protocol. Each one is likely to have procedures called something like
SendToOtherSide and GetFrom- OtherSide, even though these procedures actually communicate with lower layers
across the 3/4 interface, and not with the other side. The peer process abstrac.on is crucial to all network design.
Using it, the unmanageable task of designing the complete network can be broken into several smaller, manageable
design problems, namely, the design of the individual layers.
Design Issues for the Layers

1.Error control:Reliability is the design issue of making a network that operates correctly even though it is made up
of a collec.on of components that are themselves . Think about the bits of a packet traveling through the network.
There is a chance that some of these bits will be received damaged (inverted) due to fluke electrical noise, random
wireless signals, hardware flaws, so]ware bugs and so on. How is it possible that we find and fix these errors? One
mechanism for finding errors in received informa.on uses codes for error
detec5on. Informa.on that is incorrectly received can then be retransmiIed un.l it is received correctly. More
powerful codes allow for error correc5on,where the correct message is recovered from the possibly incorrect bits
that were originally received. Both of these mechanisms work by adding redundant informa.on. They are used at
low layers, to protect packets sent over individual links, and high layers, to check that the right contents were
received.
2.Rou5ng-Another reliability issue is finding a working path through a network. O]en there are mul.ple paths
between a source and des.na.on, 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 automa.cally make this
decision. This topic is called rou5ng.
3.Addressing -A second design issue concerns the evolu.on of the network. Over .me, networks grow larger and
new designs emerge that need to be connected to the exis.ng network. We have recently seen the key structuring
mechanism used to support change by dividing the overall problem and hiding implementa.on details: protocol
layering. There are many other strategies as well. Since there are many computers on the network, every layer needs
a mechanism for iden.fying the senders and receivers that are involved in a par.cular message. This mechanism is
called addressing or naming, in the low and high layers, respec.vely. An aspect of growth is that different network
technologies o]en have different limita.ons. For example, not all communica.on channels preserve the order of
messages sent on them, leading to solu.ons 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, transmilng, and then
reassembling messages. This overall topic is called internetworking. When networks get large, new problems arise.
Ci.es 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 con.nue to work well when
the network gets large are said to be scalable.
3.Mul5plexing A third design issue is resource alloca.on. Networks provide a service to hosts from their underlying
resources, such as the capacity of transmission lines. To do this well, they need mechanisms that divide their
resources so that one host does not interfere with another too much. Many designs share network bandwidth
dynamically, according to the shorIerm needs of hosts, rather than by giving each host a fixed frac.on of the
bandwidth that it may or may not use. This design is called sta5s5cal mul5plexing, meaning sharing based on the
sta.s.cs of demand. It can be applied at low layers for a single link, or at high layers for a network or even
applica.ons that use the network.
4.Flow control:An alloca.on 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 o]en used. This subject is called flow control.
Some.mes 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 conges5on. One strategy is for
each computer to reduce its demand when it experiences conges.on. It, too, can be used in all layers. It is interes.ng
to observe that the network has more resources to offer than simply bandwidth. For uses such as carrying live video,
the .meliness of delivery maIers a great deal. Most networks must provide service to applica.ons that want this
real-5me delivery at the same .me that they provide service to applica.ons that want high throughput. Quality of
service is the name given to mechanisms that reconcile these compe.ng demands. The last major design issue is to
secure the network by defending it against different kinds of threats. One of the threats we have men.oned
previously is that of eavesdropping on communica.ons. Mechanisms that provide confiden5ality defend against this
threat, and they are used in mul.ple layers. Mechanisms for authen5ca5on prevent someone from impersona.ng
someone else. They might be used to tell fake banking Web sites from the real one, or to let the cellular network
check that a call is really coming from your phone so that you will pay the bill. Other mechanisms for integrity
prevent surrep..ous changes to messages, such as altering ‘‘debit my account $10’’ to ‘‘debit my account $1000.’’

Connection-Oriented Versus Connectionless Service


Layers can offer two different types of service to the layers above them: connec.on- oriented and connec.onless.
Connec5on-oriented service is modeled a]er the telephone system. To talk to someone, you pick up the phone, dial
the number, talk, and then hang up. Similarly, to use a connec.on-oriented network service, the service user first
establishes a connec.on, uses the connec.on, and then releases the connec.on. The essen.al aspect of a
connec.on is that it acts like a tube: the sender pushes objects (bits) in at one end, and the receiver takes them out
at the other end. In most cases the order is preserved so that the bits arrive in the order they were sent. In some
cases when a connec.on is established, the sender, receiver, and subnet conduct a nego5a5on about the parameters
to be used, such as maximum message size, quality of service required, and other issues. Typically, one side makes a
proposal and the other side can accept it, reject it, or make a counterproposal.
In contrast to connec.on-oriented service, connec5onless service is modeled a]er the postal system. Each message
(leIer) carries the full des.na.on address, and each one is routed through the intermediate nodes inside the system
independent of all the subsequent messages. There are different names for messages in different contexts; a packet
is a message at the network layer. When the intermediate nodes receive a message in full before sending it on to the
next node, this is called store-and-forward switching. The alterna.ve, in which the onward transmission of a
message at a node starts before it is completely received by the node, is called cut-through switching. Normally,
when two messages are sent to the same des.na.on, the first one sent will be the first one to arrive. However, it is
possible that the first one sent can be delayed so that the second one arrives first. Each kind of service can further be
characterized by its reliability. Some services are reliable in the sense that they never lose data. Usually, a reliable
service is implemented by having the receiver acknowledge the receipt of each message so the sender is sure that it
arrived. The acknowledgement process introduces overhead and delays, which are o]en worth it but are some.mes
undesirable.
A typical situa.on in which a reliable connec.on-oriented service is appropriate is file transfer. The owner of the file
wants to be sure that all the bits arrive correctly and in the same order they were sent. On the other hand, to
download a DVD movie, a byte stream from the server to the user’s computer is all that is needed. Message
boundaries within the movie are not relevant. For some applica.ons, the transit delays introduced by
acknowledgements are unacceptable. One such applica.on is digi.zed voice traffic for voice over IP. It
is less disrup.ve for telephone users to hear a bit of noise on the line from .me to .me than to experience a delay
wai.ng for acknowledgements. Similarly, when transmilng a video conference, having a few pixels wrong is no
problem, but having the image jerk along as the flow stops and starts to correct errors is irrita.ng. Unreliable
(meaning not acknowledged) connec.onless
service is o]en called datagram service, in
analogy with telegram service, which also does
not return an acknowledgement to the sender.
The acknowledged datagram service can be
provided for these applica.ons. It is like
sending a registered leIer and reques.ng a
return receipt. When the receipt comes back,
the sender is absolutely sure that the leIer
was delivered to the intended party and not
lost along the way. Text messaging on mobile
phones is an example. S.ll another service is
the request-reply service. In this service the
sender transmits a single datagram containing
a request; the reply contains the answer.
Request-reply is commonly used to implement communica.on in the client-server model: the client issues a request
and the server responds to it. First of all, reliable communica.on may not be available in a given layer. For example,
Ethernet does not provide reliable communica.on. Packets can occasionally be damaged in transit. It is up to higher
protocol levels to recover from this problem. In par.cular, many reliable services are built on top of an unreliable
datagram service. Second, the delays inherent in providing a reliable service may be unacceptable, especially in real-
.me applica.ons such as mul.media. For these reasons, both reliable and unreliable communica.on coexist.
Service Primitives
A service is formally specified by a set of primi5ves (opera.ons)
available to user processes to access the service. These primi.ves
tell the service to perform some ac.on or report on an ac.on
taken by a peer en.ty. If the protocol stack is located in the
opera.ng system, as it o]en is, the primi.ves are normally system
calls. These calls cause a trap to kernel mode, which then turns
control of the machine over to the opera.ng system to send the
necessary packets. The set of primi.ves available depends on the
nature of the service being provided. The primi.ves for
connec.on-oriented service are different from those of connec.onless service.
First, the server executes LISTEN to indicate that it is prepared to accept incoming connec.ons. A common way to
implement LISTEN is to make it a blocking system call. A]er execu.ng the primi.ve, the server process is blocked un.l
a request for connec.on appears. Next, the client process executes CONNECT to establish a connec.on with the server.
The CONNECT call needs to specify who to connect to, so it
might have a parameter giving the server’s address. The
opera.ng system then typically sends a packet to the peer
asking it to connect. The client process is suspended un.l
there is a response. When the packet arrives at the server,
the opera.ng system sees that the packet is reques.ng a
connec.on. It checks to see if there is a listener, and if so it
unblocks the listener. The server process can then establish
the connec.on with the ACCEPT call. This sends a response (2) back to the client process to accept the connec.on. The
arrival of this response then releases the client. At this point the client and server are both running and they have a
connec.on established.
The Relationship of Services to Protocols
Services and protocols are dis.nct concepts. A service is a set of primi.ves (opera.ons) that a layer provides to the
layer above it. The service defines what opera.ons the layer is prepared to perform on behalf of its users, but it says
nothing at all about how these opera.ons are implemented. A service relates to an interface between two layers,
with the lower layer being the service provider and the
upper layer being the service user. A protocol, in contrast, is
a set of rules governing the format and meaning of the
packets, or messages that are exchanged by the peer en..es
within a layer. En..es use protocols to implement their
service defini.ons. They are free to change their protocols at
will, provided they do not change the service visible to their
users. In this way, the service and the protocol are
completely decoupled. protocols relate to the packets sent
between peer en..es on different machines. It is very
important not to confuse the two concepts. A service is like
an abstract data type or an object in an object-oriented
language. It defines opera.ons that can be performed on an
object but does not specify how these opera.ons are
implemented. In contrast, a protocol relates to the implementa>on of the service and as such is not visible to the
user of the service.

REFERENCE MODELS
Although the protocols associated with the OSI model are not used any more, the model itself is actually quite
general and s.ll valid, and the features discussed at each layer are s.ll very important.
The TCP/IP model has the opposite proper.es: the model itself is not of much use but the protocols are widely used.
The OSI Reference Model
The model is called the ISO OSI (Open Systems Interconnec5on) Reference Model because it deals with connec.ng
open systems—that is, systems that are open for communica.on with other systems. We will
The OSI model has seven layers. Note that the OSI model itself is not a network architecture because it does not
specify the exact services and protocols to be used in each layer. It just tells what each layer should do. However, ISO
has also produced standards for all the layers, although these are not part of the reference model itself. Each one has
been published as a separate interna.onal standard. The model (in part) is widely used although the associated
protocols have been long forgoIen
The Physical Layer
The physical layer is concerned with transmilng raw bits over a communica.on 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 a 1 bit, not as a 0 bit. Typical
ques.ons here are what electrical signals should be used to represent a 1 and a 0, how many nanoseconds a bit lasts,
whether transmission may proceed simultaneously in both direc.ons, how the ini.al connec.on is established, how
it is torn down when both sides are finished, how many pins the network connector has, and what each pin is used
for. These design issues largely deal with physical transmission medium, which lies below the physical layer.
The 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. It does so by masking the real errors so the network layer does not see them. It
accomplishes this task by having the sender break up the input data into data frames (typically
a few hundred or a few thousand bytes) and transmit the frames sequen.ally. If the service is reliable, the receiver
confirms correct receipt of each frame by sending back an acknowledgement frame.
Some traffic regula.on mechanism may be needed to let the transmiIer know when the receiver can accept more
data. Broadcast networks have an addi.onal issue in the data link layer: how to control access to the shared channel.
A special sublayer of the data link layer, the medium access control sublayer, deals with this problem.
The Network Layer
The network layer controls the opera.on of the subnet. A key design issue is determining how packets are routed
from source to des.na.on. Routes can be based on sta.c tables that are ‘‘wired into’’ the network and rarely
changed, or more o]en they can be updated automa.cally to avoid failed components. They
can also be determined at the start of each conversa.on, for example, a terminal session, such as a login to a remote
machine. Finally, they can be highly dynamic, being determined anew for each packet to reflect the current network
load.
If too many packets are present in the subnet at the same .me, they will get in one another’s way, forming
boIlenecks. Handling conges.on is also a responsibility of the network layer, in conjunc.on with higher layers that
adapt the load they place on the network. More generally, the quality of service provided (delay,
transit .me, jiIer, etc.) is also a network layer issue. When a packet has to travel from one network to another to get
to its des.na.on, many problems can arise. The addressing used by the second network may be different from that
used by the first one. The second one may not accept the packet at all because it is too large. The protocols may
differ, and so on. It is up to the network layer to overcome all these problems to allow heterogeneous networks to be
interconnected. In broadcast networks, the rou.ng problem is simple, so the network layer is o]en thin or even
nonexistent.
The Transport Layer
The basic func.on 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. Furthermore, all this must
be done efficiently and in a way that isolates the upper layers from the inevitable changes in the hardware
technology over the course of .me. The transport layer also determines what type of service to provide to the
session layer, and, ul.mately, to the users of the network. The most popular type of transport connec.on is an error-
free point-to-point channel that delivers
messages or bytes in the order in which
they were sent. However, other possible
kinds of transport service exist, such as
the transpor.ng of isolated messages
with no guarantee about the order of
delivery, and the broadcas.ng of
messages to mul.ple des.na.ons. The
type of service is determined when the
connec.on is established.
The transport layer is a true end-to-end
layer; it carries data all the way from the
source to the des.na.on. In other
words, a program on the source
machine carries on a conversa.on with
a similar program on the des.na.on
machine, using the message headers
and control messages. In the lower
layers, each protocols is between a
machine and its immediate neighbors,
and not between the ul.mate source
and des.na.on machines, which may
be separated by many routers.
The Session Layer
The session layer allows users on
different machines to establish sessions
between them. Sessions offer various
services, including dialog control
(keeping track of whose turn it is to
transmit), token management (preven.ng two par.es from aIemp.ng the same cri.cal opera.on simultaneously),
and synchroniza5on (checkpoin.ng long transmissions to allow them to pick up from where they le] off in the event
of a crash and subsequent recovery).
The Presenta5on Layer
Unlike the lower layers, which are mostly concerned with moving bits around, the presenta5on layer is concerned
with the syntax and seman.cs of the informa.on transmiIed. In order to make it possible for computers with
different internal data representa.ons 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 presenta.on layer
manages these abstract data structures and allows higher-level data structures to be defined and exchanged.
The Applica5on Layer
The applica5on layer contains a variety of protocols that are commonly needed by users. One widely used
applica.on 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 hos.ng the page using HTTP. The
server then sends the page back. Other applica.on protocols are used for file transfer, electronic mail, and network
news..
The TCP/IP Reference Model

Since applica.ons with divergent requirements were envisioned, ranging from transferring files to real-.me speech
transmission, a flexible architecture was needed.
The Link Layer
All these requirements led to the choice of a packet-switching network based on a connec.onless layer that runs
across different networks. 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 connec.onless 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.
The Internet Layer
The internet layer is the linchpin that holds the whole architecture together. corresponding roughly to the OSI
network layer. Its job is to permit hosts to inject packets into any network and have them travel independently to the
des.na.on (poten.ally 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. Note that ‘‘internet’’
is used here in a generic sense, even though this layer is present in the Internet. 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 helps it func.on. The job of the internet layer is to deliver IP packets where they are
supposed to go. Packet rou.ng is clearly a major issue here, as is conges.on (though IP has not proven effec.ve at
avoiding conges.on).
The Transport 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 en..es on the source and des.na.on hosts to carry on a conversa.on, just as in the OSI transport layer.
Two end-to-end transport protocols have been defined here. The first one, TCP (Transmission Control Protocol), is a
reliable connec.on-oriented protocol that allows a byte stream origina.ng on one machine to be delivered without
error on any other machine in the internet. It segments the incoming byte stream into discrete messages and passes
each one on to the internet layer. At the des.na.on, the receiving TCP process reassembles the received messages
into the output stream. TCP also handles flow control to make sure a fast sender cannot swamp a slow receiver with
more messages than it can handle. The second protocol in this layer, UDP (User Datagram Protocol), is an unreliable,
connec.onless protocol for applica.ons that do not want TCP’s sequencing or flow control and wish to provide their
own.
The Applica5on Layer
The TCP/IP model does not have session or presenta.on layers.
No need for them was perceived. Instead, applica.ons simply
include any session and presenta.on func.ons that they
require. Experience with the OSI model has proven this view
correct: these layers are of liIle use to most applica.ons. On
top of the transport layer is the applica5on 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 are addi.onaly added with years
like: include the Domain Name System (DNS), for mapping host
names onto their network addresses, HTTP, the protocol for
fetching pages on the World Wide Web, and RTP, the protocol for delivering real-.me media such as voice or movies.
A Comparison of the OSI and TCP/IP Reference Models
Both are based on the concept of a stack of independent protocols. Also, the func.onality of the layers is roughly
similar. For example, in both models the layers up through and including the transport layer are there to provide an
end-to-end, network- independent transport service to processes wishing to communicate. Again in both models, the
layers above transport are applica.on-oriented users of the transport service. Despite these fundamental similari.es,
the two models also have many differences.
Three concepts are central to the OSI model:
1. Services.
2. Interfaces.
3. Protocols.
Probably the biggest contribu.on of the OSI model is that it makes the dis.nc.on between these three concepts
explicit. Each layer performs some services for the layer above it. The service defini.on tells what the layer does, not
how en..es above it access it or how the layer works. It defines the layer’s seman.cs.
A layer’s interface tells the processes above it how to access it. It specifies what the parameters are and what results
to expect. It, too, says nothing about how the layer works inside. Finally, the peer protocols used in a layer are the
layer’s own business. It can use any protocols it wants to, as long as it gets the job done .These ideas fit very nicely
with modern ideas about object-oriented programming. An object, like a layer, has a set of methods (opera.ons)
that processes outside the object can invoke. The seman.cs of these methods define the set of services that the
object offers. The methods’ parameters and results form the object’s interface. The code internal to the object is its
protocol and is not visible or of any concern outside the object.
The TCP/IP model did not originally clearly dis.nguish between services, interfaces, and protocols,
For example, the only real services offered by the internet layer are SEND IP PACKET and RECEIVE IP PACKET. As a
consequence, the protocols in the OSI model are beIer hidden than in the TCP/IP model and can be
replaced rela.vely easily as the technology changes. Being able to make such changes transparently is one of the
main purposes of having layered protocols in the first place.
The OSI reference model was devised before the corresponding protocols were invented.
The downside of this ordering was that the designers did not have much experience with the subject and
did not have a good idea of which func.onality to put in which layer. For example, the data link layer originally dealt
only with point-to-point networks. When broadcast networks came around, a new sublayer had to be hacked into the
model.
With TCP/IP the reverse was true: the protocols came first, and the model was really just a descrip.on of the exis.ng
protocols. There was no problem with the protocols filng the model. They fit perfectly. The only trouble was that
the model did not fit any other protocol stacks. Consequently, it was not especially useful for describing other, non-
TCP/IP networks. Turning from philosophical maIers to more specific ones, an obvious difference between the two
models is the number of layers: the OSI model has seven layers and the TCP/IP model has four. Both have
(inter)network, transport, and applica.on layers, but the other layers are different. Another difference is in the area
of connec.onless versus connec.on-oriented communica.on. The OSI model supports both connec.onless and
connec.onoriented communica.on in the network layer, but only connec.on-oriented communica.on in the
transport layer, where it counts (because the transport service is visible to the users). The TCP/IP model supports
only one mode in the network layer (connec.onless) but both in the transport layer, giving the users a choice. This
choice is especially important for simple request-response protocols
A Critique of the OSI Model and Protocols
Neither the OSI model and its protocols nor the TCP/IP model and its protocols are perfect.They can be summarized
as:
1. Bad .ming.
2. Bad technology.
3. Bad implementa.ons.
4. Bad poli.cs.
Bad Timing
The .me at which a standard is established is absolutely cri.cal to its success. If they are wriIen too early (before
the research results are well established), the subject may s.ll be poorly understood; the result is a bad standard. If
they are wriIen too late, so many companies may have already made major investments in different ways of doing
things that the standards are effec.vely ignored. If the interval between the two elephants is very short (because
everyone is in a hurry to get started), the people developing the standards may get crushed. It now appears that the
standard OSI protocols got crushed. The compe.ng TCP/IP protocols were already in widespread use by research
universi.es by the .me the OSI protocols appeared.
Bad Technology
The choice of seven layers was more poli.cal than technical, and two of the layers (session and presenta.on) are
nearly empty, whereas two other ones (data link and network) are overfull.
The OSI model, along with its associated service defini.ons and protocols, is extraordinarily complex.
that to be effec.ve, error control must be done in the highest layer, so that repea.ng it over and over in each of the
lower layers is o]en unnecessary and inefficient.
Bad Implementa5ons
Given the enormous complexity of the model and the protocols, it will come as no surprise that the ini.al
implementa.ons were huge, unwieldy, and slow.
Bad Poli5cs
This belief was only partly true, but the very idea of a bunch of governmentbureaucrats trying to shove a technically
inferior standard down the throats of the poor researchers and programmers down in the trenches actually
developing computer networks did not aid OSI’s cause.
A Critique of the TCP/IP Reference Model
The TCP/IP model and protocols have their problems too. First, the model does not clearly dis.nguish the concepts of
services, interfaces, and protocols.
Good so]ware engineering prac.ce requires differen.a.ng between the specifica.on and the implementa.on,
something that OSI does very carefully, but TCP/IP does not. Consequently, the TCP/IP model is not much of a guide
for designing new networks using new technologies.
Second, the TCP/IP model is not at all general and is poorly suited to describing any protocol stack other than TCP/IP.
Trying to use the TCP/IP model to describe Bluetooth, for example, is completely impossible. Third, the link layer is
not really a layer at all in the normal sense of the term as used in the context of layered protocols. It is an interface
(between the network and data link layers). The dis.nc.on between an interface and a layer is crucial, and one
should not be sloppy about it. Fourth, the TCP/IP model does not dis.nguish between the physical and data link
layers. These are completely different. The physical layer has to do with the transmission characteris.cs of copper
wire, fiber op.cs, and wireless communica.on.
The data link layer’s job is to delimit the start and end of frames and get them from one side to the other with the
desired degree of reliability. A proper model should include both as separate layers. The TCP/IP model does not do
this. Finally, although the IP and TCP protocols were carefully thought out and well implemented, many of the other
protocols were ad hoc.
EXAMPLE NETWORKS
1.5.1 The Internet
The Internet is not really a network at all, but a vast collec.on of different networks that use
certain common protocols and provide certain common services. It is an unusual system in that
it was not planned by anyone and is not controlled by anyone.
The ARPANET
The story begins in the late 1950s. At the height of the Cold War, the U.S. wanted a command-
and-control network that could survive a nuclear war. At that .me, all military communica.ons
used the public telephone network, which was considered vulnerable. Here the black dots
represent telephone switching offices, each of which was connected to thousands of
telephones. These switching offices were, in turn, connected to higher-level switching offices
(toll offices), to form a na.onal hierarchy with only a small amount of redundancy. The
vulnerability of the system was that the destruc.on of a few key toll offices could fragment it
into many isolated islands
The subnet would consist of minicomputers called IMPs (Interface Message
Processors) connected by 56-kbps transmission lines. For high reliability, each IMP would be
connected to at least two other IMPs. The subnet was to be a datagram subnet, so if some lines
and IMPs were destroyed, messages could be automa.cally rerouted
along alterna.ve paths. Each node of the network was to consist of
an IMP and a host, in the same room, connected by a short wire. A
host could send messages of up to 8063 bits to its IMP, which would
then break these up into packets of at most 1008 bits and forward
them independently toward the des.na.on. Each packet was
received in its en.rety before being forwarded, so the subnet was the
first electronic store and- forward packet-switching network.
ARPA then put out a tender for building the subnet. The so]ware was
split into two parts: subnet and host. The subnet so]ware consisted
of the IMP end of the host-IMP connec.on, the IMP-IMP protocol, and a source IMP to des.na.on IMP protocol
designed to improve reliability. Outside the subnet, so]ware was also needed, namely, the host end of the host-IMP
connec.on, the host-host protocol, and the applica.on so]ware. It soon
became clear that BBN was of the opinion that when it had accepted a message on a host-IMP wire and placed it on
the host-IMP wire at the des.na.on, its job was done. This experiment also demonstrated that the exis.ng ARPANET
protocols were not suitable for running over different networks. This observa.on led to more research on protocols,
culmina.ng with the inven.on of the TCP/IP model and protocols (TCP/IP was specifically designed to handle
communica.on over internetworks, something becoming increasingly important as more and more networks were
hooked up to the ARPANET. LANs, were connected to the ARPANET. As the scale increased, finding hosts became
increasingly expensive, so DNS (Domain Name System) was created to organize machines into domains and map
host names onto IP addresses. Since then, DNS has become a generalized, distributed database system for storing a
variety of informa.on related to naming.
Architecture of the Internet
To join the Internet, the computer is connected to an Internet Service Provider, or simply ISP, from who the user
purchases Internet access or connec5vity. This lets the computer exchange packets with all of the other accessible
hosts on the Internet. The user might send packets to surf the Web or for any of a thousand other uses, it does not
maIer. There are many kinds of Internet access, and they are usually dis.nguished by how much bandwidth they
provide and how much they cost, but the most important aIribute is connec.vity. A common way to connect to an
ISP is to use the phone line to your house, in which case your phone
company is your ISP. DSL, short for Digital Subscriber Line, reuses the
telephone line that connects to your house for digital data
transmission. The computer is connected to a device called a DSL
modem that converts between digital packets and analog signals that
can pass unhindered over the telephone line. At the other end, a
device called a DSLAM (Digital Subscriber Line Access Mul5plexer)
converts between signals and packets. The word modem is short for
‘‘modulator demodulator’’ and refers to any device that converts
between digital bits and analog signals. Another method is to send
signals over the cable TV system. Like DSL, this is a way to reuse
exis.ng infrastructure, in this case otherwise unused cable TV
channels. The device at the home end is called a cable modem and
the device at the cable headend is called the CMTS (Cable Modem Termina5on System). At the top of the food chain
are a small handful of companies, that operate large interna.onal backbone networks with thousands of routers
connected by high-bandwidth fiber op.c links. These ISPs do not pay for transit. They are usually called 5er 1 ISPs
and are said to form the backbone of the Internet, since everyone else must connect to them to be able to reach the
en.re Internet.
Companies that provide lots of content, such as Google and Yahoo!, locate their computers in data centers that are
well connected to the rest of the Internet. These data centers are designed for computers, not humans, and may be
filled with rack upon rack of machines called a server farm. Coloca5on or hos5ng data centers let customers put
equipment such as servers at ISP POPs so that short, fast connec.ons can be made between the servers and the ISP
backbones. The Internet hos.ng industry has become increasingly virtualized so that it is now common to rent a
virtual machine that is run on a server farm instead of installing a physical computer. These data centers are so large
(tens or hundreds of thousands of machines) that electricity is a major cost, so data centers are some.mes built in
areas where electricity is cheap
Wireless LANs: 802.11
The prolifera.on of standards meant that a
computer equipped with a brand X radio would
not work in a room equipped with a brand Y
base sta.on. In the mid 1990s, the industry
decided that a wireless LAN standard might be a
good idea, so the IEEE commiIee that had
standardized wired LANs was given the task of
drawing up a wireless LAN standard. All the
other LAN standards had numbers like 802.1,
802.2, and 802.3, up to 802.10, so the wireless
LAN standard was dubbed 802.11. A common
slang name for it is WiFi but it is an important
standard and deserves respect, so we will call it
by its proper name, 802.11. 802.11 networks
are made up of clients, such as laptops and mobile phones, and infrastructure called APs (access points) that is
installed in buildings. Access points are some.mes called base sta5ons. The access points connect to the wired
network, and all communica.on between clients goes through an access point. It is also possible for clients that are
in radio range to talk directly, such as two computers in an office without an access point. This arrangement is called
an ad hoc network. It is used much less o]en than the access point mode. At the frequencies used for 802.11, radio
signals can be reflected off solid objects so that mul.ple echoes of a transmission may reach a receiver along
different paths. The echoes can cancel or reinforce each other, causing the received signal to fluctuate greatly. This
phenomenon is called mul5path fading, The key idea for overcoming variable wireless condi.ons is path diversity, or
the sending of informa.on along mul.ple, independent paths

Physical layer

Informa.on can be transmiIed on wires by varying some physical property such as voltage or current. By
represen.ng the value of this voltage or current as a single-valued func.on of .me, f(t), we can model the behavior
of the signal and analyze it mathema.cally In the early 19th century, the French mathema5cian Fourier proved that
any reasonably behaved periodic func.on, g(t) with period T, can be constructed as the sum of a (possibly infinite)
number of sines and cosines
Bandwidth limited signal - No transmission
facility can transmit signals without losing some
power in the process. If all the Fourier
components were equally diminished, the
resul.ng signal would be reduced in amplitude
but not distorted [i.e., it would have the same
nice squared-off shape as Fig. 2-1(a)].
Unfortunately, all transmission facili.es diminish
different Fourier components by different
amounts, thus introducing distor.on. Usually, for
a wire, the amplitudes are transmiIed mostly
undiminished from 0 up to some frequency fc
[measured in cycles/sec or Hertz (Hz)], with all
frequencies above this cutoff frequency
aIenuated. The width of the frequency range
transmiIed without being strongly aIenuated is
called the bandwidth. In prac.ce, the cutoff is not
really sharp, so o]en the quoted bandwidth is
from 0 to the frequency at which the received
power has fallen by half. Signals that run from 0
up to a maximum frequency are called baseband
signals. Signals that are shi]ed to occupy a higher
range of frequencies, as is the case for all wireless
transmissions, are called passband signals. There
is much confusion about bandwidth because it
means different things to electrical engineers and
to computer scien.sts. To electrical engineers,
(analog) bandwidth is (as we have described
above) a quan.ty measured in Hz. To computer
scien.sts, (digital) bandwidth is the maximum
data rate of a channel, a quan.ty measured in
bits/sec. That data rate is the end result of using
the analog bandwidth of a physical channel for
digital transmission.
The Maximum Data Rate of a Channel
Nyquist proved that if an arbitrary signal has been
run through a low-pass filter of bandwidth B, the filtered signal can be completely reconstructed by making only 2B
(exact) samples per second. Sampling the line faster than 2B .mes per second is pointless because the higher-
frequency components that such sampling
could recover have already been filtered out. If random noise is present, the situa.on deteriorates rapidly. And there
is always random (thermal) noise present due to the mo.on of the molecules in the system. The amount of thermal
noise present is measured by the ra.o of the signal power to the noise power, called the SNR (Signal-to-Noise Ra5o).
If we denote the signal power by S and the noise power by N, the signal-to-noise ra.o is S/N. Usually, the ra.o is
expressed on a log scale as the quan.ty 10 log10 S /N because it can vary over a tremendous range. The units of this
log scale are called decibels (dB),

GUIDED TRANSMISSION MEDIA


The purpose of the physical layer is to transport bits from one machine to another. Each one has its own niche in
terms of bandwidth, delay, cost, and ease of installa.on and maintenance. Media are roughly grouped into guided
media, such as copper wire and fiber op.cs, and unguided media, such as terrestrial wireless, satellite, and lasers
through the air.
Magne5c Media
One of the most common ways to transport data from one computer to another is to write them onto magne.c tape
or removable media (e.g., recordable DVDs), physically transport the tape or disks to the des.na.on machine, and
read them back in again. Although this method is not as sophis.cated as using a geosynchronous communica.on
satellite, it is o]en more cost effec.ve, especially for applica.ons in which high bandwidth or cost per bit transported
is the key factor.
A simple calcula.on will make this point clear. An industry-standard Ultrium tape can hold 800 gigabytes. A box 60 ×
60 × 60 cm can hold about 1000 of these tapes, for a total capacity of 800 terabytes. A box
of tapes can be delivered anywhere in the United States in 24 hours by Federal Express and other companies. The
effec.ve bandwidth of this transmission is 6400 terabits/86,400 sec, or a bit over 70 Gbps. If the des.na.on is only
an hour away by road, the bandwidth is increased to over 1700 Gbps. No computer network Can even approach this.
Of course, networks are gelng faster, but tape densi.es are increasing, too.
Twisted Pairs
Although the bandwidth characteris.cs of magne.c tape are excellent, the delay characteris.cs are poor.
Transmission .me is measured in minutes or hours, not milliseconds. For many applica.ons an online connec.on is
needed. One of the oldest and s.ll 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, just like a DNA
molecule. Twis.ng is done because two parallel wires cons.tute a fine antenna. When the wires are twisted, the
waves from different twists cancel out, so the wire radiates less effec.vely. A signal is usually carried as the difference
in voltage between the two wires in the
pair. This provides beIer immunity to external noise because the noise tends to affect both wires the same, leaving
the differen.al unchanged. The most common applica.on of the twisted pair is the telephone system.
Both telephone calls and ADSL Internet access run over these lines. Twisted pairs can run several kilometers without
amplifica.on, but for longer distances the signal becomes too aIenuated and repeaters are needed. When many
twisted pairs run in parallel for a substan.al distance, such as all the wires coming
from an apartment building to the telephone company office, they are
bundled together and encased in a protec.ve sheath. The pairs in these
bundles would interfere with one another if it were not for the twis.ng.
In parts of the world where telephone lines run on poles above ground, it
is common to see bundles several
cen.meters in diameter.
Twisted pairs can be used for transmilng either analog or digital
informa.on. 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 their adequate performance and low cost, twisted pairs are widely used and are
likely to remain so for years to come.
A category 5 twisted pair consists of two insulated wires gently twisted together. Four such pairs are typically
grouped in a plas.c sheath to protect the wires and keep them together. Different LAN standards may use the
twisted pairs differently. For example, 100-Mbps Ethernet uses two (out of the four) pairs, one pair for each
direc.on. To reach higher speeds, 1-Gbps Ethernet uses all four pairs in both direc.ons simultaneously; this requires
the receiver to factor out the signal that is transmiIed locally.Links that can be used in both direc.ons at the same
.me, like a two-lane road, are called full-duplex links. In contrast, links that can be used in either direc.on, but only
one way at a .me, like a single-track railroad line. are called half-duplex links. A third category consists of links that
allow traffic in only one direc.on, like a one-way street. They are called simplex links. Returning to twisted pair, 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 beIer-quality signal over longer distances, making the cables more suitable
for high-speed computer communica.on, especially 100-Mbps and 1-Gbps Ethernet LANs. New wiring is more likely
to be Category 6 or even Category 7. These categories has more stringent specifica.ons to handle signals with
greater bandwidths.
Coaxial Cable
Another common transmission medium is the coaxial cable. It has beIer 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 commonly used for analog transmission and cable television. Star.ng in the mid- 1990s, cable TV
operators began to provide Internet access over cable, which has made 75-ohm cable more important for data
communica.on. A coaxial cable consists of a s.ff copper wire as the core, surrounded by an insula.ng material. The
insulator is encased by a cylindrical conductor, o]en as a closely woven braided mesh. The outer conductor is
covered in a protec.ve plas.c sheath. The construc.on and shielding of the coaxial cable give it a good combina.on
of high bandwidth and excellent noise
immunity. The bandwidth possible
depends on the cable quality and
length. Modern cables have a
bandwidth of up to a few GHz. Coaxial
cables used to be widely used within
the telephone system for long-distance
lines but have now largely been
replaced by fiber op.cs on longhaul routes. Coax is s.ll widely used for cable television and metropolitan area
networks
Fiber Optics
Of course, this scenario does not tell the whole story because it does not include cost. The cost to install fiber over
the last mile to reach consumers and bypass the low bandwidth of wires and limited availability of spectrum is
tremendous. It also costs more energy to move bits than to compute
Fiber op.cs are used for long-haul transmission in network backbones, highspeed LANs and high-speed Internet
access such as FdH (Fiber to the Home). An op.cal transmission system has three key components: the light source,
the transmission medium, and the detector. Conven.onally, 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 aIaching a light source to one end of an op.cal fiber and a detector to the other, we have a
unidirec.onal 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 prac.ce were it not
for an interes.ng principle of physics. When a light ray passes from one medium to another—for example, from
fused silica to air—the ray is refracted (bent) at the silica/air boundary.Here we see a light ray incident on the
boundary at an angle. The amount of refrac.on depends on the proper.es of the two media (in par.cular, their
indices of refrac.on). For angles of incidence above a certain cri.cal value, the light is refracted back into the silica;
none of it escapes into the air. Thus, a light ray incident at
or above the cri.cal angle is trapped inside the fiber and
can propagate for many kilometers with virtually no loss.
shows only one trapped ray, but since any light ray
incident on the boundary above the cri.cal angle will be
reflected internally, many different rays will be bouncing
around at different angles. Each ray is said to have a
different mode, so a fiber having this property is called a
mul5mode fiber. However, if the fiber’s diameter is reduced to a few wavelengths of light the fiber acts like a wave
guide and the light can propagate only in a straight line, without bouncing, yielding a single-mode fiber. Single-mode
fibers are more expensive but are widely used for longer distances. Currently available single-mode fibers can
transmit data at 100 Gbps for 100 km without amplifica.on. Even higher data rates have been achieved in the
laboratory for shorter distances.
Op.cal fibers are made of glass, which, in turn, is made from sand, an inexpensive raw material available in unlimited
amounts glass.The glass used for modern op.cal fibers is extremly transparent.
The aIenua.on of light through glass depends on the wavelength of the light (as well as on some physical proper.es
of the glass). It is defined as the ra.o of input to output signal power. Three wavelength bands are most commonly
used at present for op.cal communica.on. They are centered at 0.85, 1.30, and 1.55 microns, respec.vely. All three
bands are 25,000 to 30,000 GHz wide. The 0.85-micron band was used first. It has higher aIenua.on and so is used
for shorter distances, but at that wavelength the lasers and electronics could be made from the same material . The
last two bands have good aIenua.on proper.es (less than 5% loss per kilometer). The 1.55-micron band is now
widely used with amplifiers that work directly in the op.cal domain.
Light pulses sent down a fiber spread out in length as they propagate. This spreading is called chroma5c dispersion.
The amount of it is wavelength dependent. One way to keep these spread-out pulses from overlapping is to increase
the distance between them, but this can be done only by reducing the signaling rate. Fortunately, it has been
discovered that making the pulses in a special shape related to the reciprocal of the hyperbolic cosine causes nearly
all the dispersion effects cancel out, so it is possible to send pulses for thousands of kilometers without appreciable
shape distor.on. These pulses are called solitons
Fiber Cables
Fiber op.c cables are similar to coax, except without the braid. At the center is the glass core through which the light
propagates. In mul.mode 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
refrac.on than the core, to keep all the light in the core. Next comes a thin plas.c jacket to protect the cladding.
Fibers are typically grouped in bundles, protected by an outer sheath. Terrestrial fiber sheaths are normally laid in
the ground within a meter of the surface. Near the shore, transoceanic fiber sheaths are buried in trenches by a kind
of seaplow. In deep water, they just lie on the boIom. 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 junc.on 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 connec.on. A fusion splice is almost as good as a single drawn fiber, but even here, a small amount of
aIenua.on occurs.
Two kinds of light sources are typically used to do the signaling. These are LEDs (Light Emilng Diodes) and
semiconductor lasers. Fabry-Perot interferometers are simple resonant cavi.es consis.ng of two parallel mirrors. The
light is incident perpendicular to the mirrors. The length of the cavity selects out those wavelengths that fit inside an
integral number of .mes. Mach-Zehnder interferometers separate the light into two beams. The two beams travel
slightly different distances. They are recombined at the end and are in phase for only certain wavelengths. The
receiving end of an op.cal fiber consists of a photodiode, which gives off an electrical pulse when struck by light. The
response .me of photodiodes, which convert the signal from the op.cal to the electrical domain, limits data rates to
about 100 Gbps. Thermal noise is also
an issue, so a pulse of light must carry
enough energy to be detected. By
making the pulses powerful enough,
the error rate can be made arbitrarily
small.
WIRELESS
TRANSMISSION
In order to have ‘‘hits’’ of data for
laptop, notebook, shirt pocket,
palmtop, or wristwatch computers
without being tethered to the
terrestrial communica.on infrastructure. For these users, wireless communica.on is the answer.Wireless has
advantages for even fixed devices in some circumstances. For example, if running a fiber to a building is difficult due
to the terrain (mountains, jungles, swamps, etc.), wireless may be beIer. It is noteworthy that modern wireless
digital communica.on began in the Hawaiian Islands, where large chunks of Pacific Ocean separated the users from
their computer center and the telephone system was inadequate.
The Electromagne5c Spectrum
When electrons move, they create electromagne.c waves that can propagate through space (even in a vacuum). The
number of oscilla.ons per second of a wave is called its frequency, f, and is measured in Hz
The distance between two consecu.ve maxima (or minima) is called the wavelength, which is universally designated
by the Greek leIer ë (lambda). When an antenna of the appropriate size is aIached to an electrical circuit, the
electromagne.c waves can be broadcast
efficiently and received by a receiver
some distance away. All wireless
communica.on is based on this
principle. In a vacuum, all
electromagne.c waves travel at the
same speed, no maIer what their
frequency. This speed, usually called the
speed of light, c, is approximately 3 ×
108 m/sec, or about 1 foot (30 cm) per
nanosecond. In copper or fiber
the speed slows to about 2/3 of this
value and becomes slightly frequency
dependent. The speed of light is the
ul.mate speed limit. No object or signal
can ever move faster than it.
The electromagne.c spectrum is
constructed of radio, microwave,infrared, and visible light por.ons of the spectrum can all be used for transmilng
informa.on by modula.ng the amplitude, frequency, or phase of the waves. Ultraviolet light, X-rays, and gamma rays
would be even beIer, due to their higher frequencies, but they are hard to produce and modulate, do not propagate
well hrough buildings, and are dangerous to living things.
The terms LF, MF, and HF refer to Low, Medium, and High Frequency, respec.vely. Clearly, when the names were
assigned nobody expected to go above 10 MHz, so the higher bands were later named the Very, Ultra, Super,
Extremely, and Tremendously High Frequency bands.
The amount of informa.on that a signal such as an electromagne.c wave can carry depends on the received power
and is propor.onal to its bandwidth. it should now be obvious why networking people like fiber op.cs so much.
Many GHz of bandwidth are available to tap for data transmission in the microwave band, and even more in fiber
because it is further to the right in our logarithmic scale.
Most transmissions use a rela.vely narrow frequency band
They concentrate their signals in this narrow band to use the spectrum efficiently and obtain reasonable data rates
by transmilng with enough power. However, in some cases, a wider band is used, with three varia.ons. In
frequency hopping spread spectrum, the transmiIer hops from frequency to frequency hundreds of .mes per
second. It is popular for military communica.on because it makes transmissions hard to detect and next to
impossible to jam. It also offers good resistance to mul.path fading and narrowband interference because the
receiver will not be stuck on an impaired frequency for long enough to shut down communica.on. This robustness
makes it useful for crowded parts of the spectrum, such as the ISM bands we will describe shortly. 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 code sequence to spread the data signal
over a wider frequency band. It is widely used commercially as a spectrally efficient way to let mul.ple signals share
the same frequency band. These signals can be given different codes, a method called CDMA (Code Division Mul5ple
Access)
A third method of communica.on with a wider band is UWB (Ultra- WideBand) communica.on. UWB sends a series
of rapid pulses, varying their posi.ons to communicate informa.on. The rapid transi.ons lead to a signal that is
spread thinly over a very wide frequency band. With this much bandwidth,
UWB has the poten.al to communicate at high rates. Because it is spread across a wide band of frequencies, it can
tolerate a substan.al amount of rela.vely strong interference from other narrowband signals. Just as importantly,
since UWB has very liIle energy at any given frequency when used for short-range transmission, it does not cause
harmful interference to those other narrowband radio signals. It is said to underlay the other signals.
Radio Transmission
Radio frequency (RF) waves are easy to generate, can travel long distances, and can penetrate buildings easily, so
they are widely used for communica.on, both indoors and outdoors. Radio waves also are omnidirec.onal, meaning
that they travel in all direc.ons from the source, so the transmiIer and receiver do not have to be carefully aligned
physically. Some.mes omnidirec.onal radio is good, but some.mes it is bad. The proper.es of radio waves are
frequency dependent. 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/r 2 in air—as the signal energy is spread more thinly over a larger
surface. This aIenua.on is called path loss. At high frequencies, radio waves tend to travel in straight lines and
bounce off obstacles. Path loss s.ll reduces power, though the received signal can depend strongly on reflec.ons as
well. High-frequency radio waves are also absorbed by rain and other obstacles to a larger extent than are low-
frequency ones. At all frequencies, radio waves are subject to interference from motors and other electrical
equipment.
In the VLF, LF, and MF bands, radio waves follow the ground, These waves can be detected for perhaps 1000 km at
the lower frequencies, less at the higher ones. Radio waves in these bands pass through buildings easily, which is why
portable radios work indoors. The main problem with using these bands for data communica.on is their low
bandwidth In the HF and VHF bands, the ground waves tend to be absorbed by the earth. However, the waves that
reach the ionosphere, a layer of charged par.cles
circling the earth at a height of 100 to 500 km,
are refracted by it and sent back to earth, as
shown in Fig. 2-12(b). Under certain atmospheric
condi.ons, the signals can bounce several .mes.
Amateur radio operators (hams) use these bands
to talk long distance. The military also
communicate in the HF and VHF bands.
The Politics of the Electromagnetic Spectrum
To prevent total chaos, there are na.onal and interna.onal agreements about who gets to use which frequencies.
Since everyone wants a higher data rate, everyone wants more spectrum. Na.onal governments allocate spectrum
for AM and FM radio, television, and mobile phones, as well as for telephone companies, police, mari.me,
naviga.on, military, government, and many other compe.ng
users. Worldwide, an agency tries to coordinate this alloca.on so devices that work in mul.ple countries can be
manufactured. Even when a piece of spectrum has been allocated to some use, such as mobile phones, there is the
addi.onal issue of which carrier is allowed to use which frequencies. Three algorithms were widely used in the past.
The oldest algorithm, o]en called the beauty contest, requires each carrier to explain why its proposal serves the
public interest best.
A completely different approach to alloca.ng frequencies is to not allocate them at all. Instead, let everyone transmit
at will, but regulate the power used so that sta.ons have such a short range that they do not interfere with each
other. Accordingly, most governments have set aside some frequency bands, called the
ISM (Industrial, Scien5fic, Medical) bands for unlicensed usage. Garage door openers, cordless phones, radio-
controlled toys, wireless mice, and numerous other wireless household devices use the ISM bands. The unlicensed
bands have been a roaring success over the past decade. The ability to use the spectrum freely has unleashed a huge
amount of innova.on in wireless LANs and PANs, evidenced by the widespread deployment of technologies such as
802.11 and Bluetooth
Light Transmission
Unguided op.cal signaling or free-space op5cs has been in use for centuries. A more modern applica.on is to
connect the LANs in two buildings via lasers mounted on their roo]ops. Op.cal signaling using lasers is inherently
unidirec.onal, so each end needs its own laser and its own photodetector. This scheme offers very high bandwidth at
very low cost and is rela.vely secure because it is difficult to tap a narrow laser beam. It is also rela.vely easy to
install and not licensed. The laser’s strength, a very narrow beam, is also its weakness here.Usually, lenses are put
into the system to defocus the beam slightly. To add to the difficulty, wind and temperature changes can distort the
beam and laser beams also cannot penetrate rain or thick fog, although they normally work well on sunny days.
However, many of these factors are not an issue when the use is to connect two spacecra]. Unguided op.cal
communica.on may seem like an exo.c networking technology today, but it might soon become much more
prevalent. We are surrounded by cameras (that sense light) and displays (that emit light using LEDs and other
technology). Data communica.on can be layered on top of these displays by encoding informa.on in the paIern at
which LEDs turn on and off that is below the threshold of human percep.on.
DIGITAL MODULATION AND MULTIPLEXING
Wires and wireless channels carry analog signals such as con.nuously varying voltage, light intensity, or sound
intensity. To send digital informa.on, we must devise analog signals to represent bits. The process of conver.ng
between bits and signals that represent them is called digital modula5on. baseband transmission, in which the
signal occupies frequencies from zero up to a maximum that depends on the signaling rate. It is common for wires.
passband transmission, in which the signal occupies a band of frequencies around the frequency of the carrier
signal. It is common for wireless and op.cal channels for which the signals must reside in a given frequency band.
Channels are o]en shared by mul.ple signals. A]er all, it is much more convenient to use a single wire to carry
several signals than to install a wire for every signal. This kind of sharing is called mul5plexing.
2.5.1 Baseband Transmission
The most straigh}orward form of digital modula.on is to use a posi.ve voltage to represent a 1 and a nega.ve
voltage to represent a 0. For an op.cal fiber, the presence of light might represent a 1 and the absence of light might
represent a 0. This scheme is called NRZ (Non-Return-to-Zero.Once sent, the NRZ signal propagates down the wire.
At the other end, the receiver converts it into bits by sampling the signal at regular intervals of .me. This signal will
not look exactly like the signal that was sent. It will
be aIenuated and distorted by the channel and
noise at the receiver. To decode the bits, the
receiver maps the signal samples to the closest
symbols. For NRZ, a posi.ve voltage will be taken
to indicate that a 1 was sent and a nega.ve
voltage will be taken to indicate that a 0 was sent.
Bandwidth Efficiency
With NRZ, the signal may cycle between the
posi.ve and nega.ve levels up to every 2 bits (in
the case of alterna.ng 1s and 0s). This means that
we need a bandwidth of at least B/2 Hz when the
bit rate is B bits/sec. It is a fundamental limit, so
we cannot run NRZ faster without using more
bandwidth. Bandwidth is o]en a limited resource,
even for wired channels, Higher-frequency signals are increasingly aIenuated, making them less useful, and higher-
frequency signals also require faster electronics. One strategy for using limited bandwidth more efficiently is to use
more than two signaling levels. By using four voltages, for instance, we can send 2 bits at once as a single symbol.
This design will work as long as the signal at the receiver is sufficiently strong to dis.nguish the four levels. The rate
at which the signal changes is then half the bit rate, so the needed bandwidth has been reduced. We call the rate at
which the signal changes the symbol rate to dis.nguish it from the bit rate. The bit rate is the symbol rate mul.plied
by the number of bits per symbol. An older name for the symbol rate, par.cularly in the context of devices called
telephone modems that convey digital data over telephone lines, is the baud rate.
Clock Recovery
For all schemes that encode bits into symbols, the receiver must know when one symbol ends and the next symbol
begins to correctly decode the bits. With NRZ, in which the symbols are simply voltage levels, a long run of 0s or 1s
leaves the signal unchanged. A]er a while it is hard to tell the bits apart, as 15 zeros look much like 16 zeros unless
you have a very accurate clock. Accurate clocks would help with this problem, but they are an expensive solu.on for
commodity equipment. One strategy is to send a separate clock signal to the receiver. Another clock line is no big
deal for computer buses or short cables in which there are many lines in parallel, but it is wasteful for most network
links since if we had another line to send a signal we could use it to send data. A clever trick here is to mix the clock
signal with the data signal by XORing them together so that no extra line is needed. The clock makes a clock
transi.on in every bit .me, so it runs at twice the bit rate. When it is XORed with the 0 level it makes a low-to-high
transi.on that is simply the clock. This transi.on is a logical 0. When it is XORed with the 1 level it is inverted and
makes a high-tolow transi.on. This transi.on is a logical 1. This scheme is called Manchester encoding and was used
for classic Ethernet. The downside of Manchester encoding is that it requires twice as much bandwidth as NRZ
because of the clock, and we have learned that bandwidth o]en maIers. A different strategy is based on the idea
that we should code the data to ensure that there are enough transi.ons in the signal. Consider that NRZ will have
clock recovery problems only for long runs of 0s and 1s. If there are frequent transi.ons, it will be easy for the
receiver to stay synchronized with the incoming stream of symbols. As a step in the right direc.on, we can simplify
the situa.on by coding a 1 as a transi.on and a 0 as no transi.on, or vice versa. This coding is called NRZI (Non-
Return-to-Zero Inverted), a twist on NRZ. The popular USB (Universal Serial Bus) standard for connec.ng computer
peripherals uses NRZI. With it, long runs of 1s do not cause a problem. Of course, long runs of 0s s.ll cause a problem
that we must fix. If we were the telephone company, we might simply require that the sender not transmit too many
0s.
Passband Transmission
O]en, we want to use a range of frequencies that does not start at zero to send informa.on across a channel. For
wireless channels, it is not prac.cal to send very low frequency signals because the size of the antenna needs to be a
frac.on of the signal wavelength, which becomes large. In any case, regulatory constraints and the need to avoid
interference usually dictate the choice of frequencies. Even for wires, placing a signal in a given frequency band is
useful to let different kinds of signals coexist on the channel. This kind of transmission is called passband
transmission because an arbitrary band of frequencies is used to pass the signal. we can take a baseband signal that
occupies 0 to B Hz and shi] it up to occupy a passband of S to S +B Hz without changing the amount of informa.on
that it can carry, even though the signal will look different. To process a signal at the receiver, we can shi] it back
down to baseband, where it is more convenient to detect symbols. Digital modula.on is accomplished with passband
transmission by regula.ng or modula.ng a carrier signal that sits in the passband. We can modulate the amplitude,
frequency, or phase of the carrier signal. Each of these methods has a corresponding name. In ASK (Amplitude ShiY
Keying), two different amplitudes are used to represent 0 and 1. More than two levels can be used to represent more
symbols. Similarly, with FSK (Frequency ShiY Keying), two or more different tones are used. In the simplest form of
PSK (Phase ShiY Keying), the carrier wave is systema.cally shi]ed 0 or 180 degrees at each symbol period. Because
there are two phases, it is called
BPSK (Binary Phase ShiY Keying). ‘‘Binary’’ here refers
to the two symbols, not that the symbols
represent 2 bits. channel bandwidth more
efficiently is to use four shi]s, e.g., 45, 135, 225, or 315
degrees, to transmit 2 bits of informa.on per
symbol. This version is called QPSK (Quadrature Phase
ShiY Keying). We can combine these schemes and use
more levels to transmit more bits per symbol. Only one
of frequency and phase can be modulated at a .me
because they are related, with frequency being the
rate of change of phase over .me.
a) A binary signal
(b) Amplitude modula5on
(c) Frequency modula5on
(d) Phase modula5on

Frequency Division Multiplexing


Consequently, mul.plexing schemes have been developed to share lines among many signals. FDM (Frequency
Division Mul5plexing) takes advantage of passband transmission to share a channel. It divides the spectrum into
frequency bands, with each user having exclusive possession of some band in which to send their signal. AM radio
broadcas.ng illustrates FDM. The allocated spectrum is about 1 MHz, roughly 500 to 1500 kHz. Different frequencies
are allocated to different logical channels
(sta.ons), each opera.ng in a por.on of the
spectrum, with the interchannel separa.on
great enough to prevent interference.
We show three voice-grade telephone
channels mul.plexed using FDM. Filters limit
the usable bandwidth to about 3100 Hz per
voice-grade channel. When many channels
are mul.plexed together, 4000 Hz is
allocated per channel. The excess is called a
guard band. It keeps the channels well
separated. First the voice channels are raised
in frequency, each by a different amount.
Then they can be combined because no two
channels now occupy the same por.on of
the spectrum. No.ce that even though there
are gaps between the channels thanks to the
guard bands, there is some overlap between
adjacent channels. The overlap is there because real filters do not have ideal sharp edges. This means that a strong
spike at the edge of one channel will be felt in the adjacent one as nonthermal noise. This scheme has been used to
mul.plex calls in the telephone system.
Time Division Multiplexing
An alterna.ve to FDM is TDM (Time
Division Mul5plexing). Here, the users
take turns each one periodically gelng
the en.re bandwidth for a liIle burst of
.me. Bits from each input stream are
taken in a fixed 5me slot and output to
the aggregate stream. This stream runs
at the sum rate of the individual
streams. For this to work, the streams
must be synchronized in .me. Small intervals of guard 5me analogous to a frequency guard band may be added to
accommodate small .ming varia.ons. TDM is used widely as part of the telephone and cellular networks. To avoid
one point of confusion, let us be clear that it is quite different from the alterna.ve STDM (Sta5s5cal Time Division
Mul5plexing). The prefix ‘‘sta.s.cal’’ is added to indicate that the individual streams contribute to the mul.plexed
stream not on a fixed schedule, but according to the sta.s.cs of their demand. STDM is packet switching by another
name.

Code Division Multiplexing


There is a third kind of mul.plexing that works in a completely different way than FDM and TDM. CDM (Code
Division Mul5plexing) is a form of spread spectrum communica.on in which a narrowband signal is spread out over
a wider frequency band. This can make it more tolerant of interference, as well as allowing mul.ple signals from
different users to share the same frequency band. Because code division mul.plexing is mostly used for the laIer
purpose it is commonly called CDMA (Code Division Mul5ple Access).
Wavelength Division Mul5plexing
A form of frequency division mul.plexing is used as well as TDM to harness the tremendous bandwidth of fiber op.c
channels. It is called WDM (Wavelength Division Mul5plexing).Here four fibers come together at an op.cal
combiner, each with its energy present at a
different wavelength. The four beams are
combined onto a single shared fiber for
transmission to a distant des.na.on. At
the far end, the beam is split up over as
many fibers as there were on the input
side. Each output fiber contains a short,
specially constructed core that filters out
all but one wavelength. The resul.ng
signals can be routed to their des.na.on
or recombined in different ways for
addi.onal mul.plexed transport. This way of opera.ng is just frequency division mul.plexing at very high
frequencies, As long as each channel has its own frequency (i.e., wavelength) range and all the ranges are disjoint,
they can be mul.plexed together on the long-haul
fiber. The only difference with electrical FDM is that an op.cal system using a diffrac.on gra.ng is completely passive
and thus highly reliable. The reason WDM is popular is that the energy on a single channel is typically only a few
gigahertz wide because that is the current limit of how fast we can convert
between electrical and op.cal signals. By running many channels in parallel on different wavelengths, the aggregate
bandwidth is increased linearly with the number of channels
Switching
Two different switching techniques are used by the network
nowadays: circuit switching and packet switching. The
tradi.onal telephone system is based on circuit switching,
but packet switching is beginning to make inroads with the
rise of voice over IP technology.
Circuit Switching
Conceptually, when you or your computer places a
telephone call, the switching equipment within the
telephone system seeks out a physical path all the way from
your telephone to the receiver’s telephone. This technique
is called circuit switching. Each of the six rectangles
represents a carrier switching office (end office, toll office,
etc.). In this example, each office has three incoming lines
and three outgoing lines. When a call passes through a
switching office, a physical connec.on is (conceptually)
established between the line on which the call came in and
one of the output lines, as shown by the doIed lines. An
important property of circuit switching is the need to set up an end-to-end path before any data can be sent. The
elapsed .me between the end of dialing and the start of ringing can easily be 10 sec, more on long distance or
interna.onal calls. During this .me interval, the telephone system is hun.ng for a path.
Packet Switching
The alterna.ve to circuit switching is packet switching. With this technology, packets are sent as soon as
they are available. There is no need to set up a dedicated path in advance, unlike with circuit switching. It is up to
routers to use store-and-forward transmission to send each packet on its way to the des.na.on on its own. This
procedure is unlike circuit switching, in which the result of the connec.on setup is the reserva.on
of bandwidth all the way from the sender to
the receiver. All data on the circuit follows this
path. Among other proper.es, having all the
data follow the same path means that it cannot
arrive out of order. With packet switching there
is no fixed path, so different packets can follow
different paths, depending on network
condi.ons at the .me they are sent, and they
may arrive out of order. Packet-switching
networks place a .ght upper limit on the size of
packets. This ensures that no user can
monopolize any transmission line for very long
(e.g., many milliseconds), so that packet-
switched networks can handle interac.ve
traffic. It also reduces delay since the first
packet of a long message can be forwarded
before the second one has fully arrived.
However, the store-and-forward delay of
accumula.ng a packet in the router’s memory
before it is sent on to the next router exceeds
that of circuit switching. With circuit switching,
the bits just flow through the wire
con.nuously. Packet and circuit switching also
differ in other ways. Because no bandwidth is
reserved with packet switching, packets may
have to wait to be forwarded. This introduces queuing delay and conges.on if many packets are sent at the same
.me. On the other hand, there is no danger of gelng a busy signal and being unable to use the network. Thus,
conges.on occurs at different .mes with circuit switching (at setup .me) and packet switching (when packets are
sent). If a circuit has been reserved for a par.cular user and there is no traffic, its bandwidth is wasted. It cannot be
used for other traffic. Packet switching does not waste bandwidth and thus is more efficient from a system
perspec.ve. The trade-off is between guaranteed service and was.ng resources versus not guaranteeing service and
not was.ng resources. Packet switching is more fault tolerant than circuit switching. If a switch goes down, all of the
circuits using it are terminated and no more traffic can be sent on any of them. With packet switching, packets can be
routed around dead switches. With circuit switching, charging has historically been based on distance and .me. For
mobile phones, distance usually does not play a role, except for interna.onal calls, and .me plays only a coarse role
With packet switching, connect .me is not an issue, but the volume of traffic is. For home users, ISPs usually charge a
flat monthly rate because it is less work for them and their customers can understand this model, but backbone
carriers charge regional networks based on the volume of their traffic

DATA LINK LAYER DESIGN ISSUES


The data link layer uses the services of the physical layer to send and receive bits over communica.on channels. It
has a number of func.ons, including:
1. Providing a well-defined service interface to the
network layer.
2. Dealing with transmission errors.
3. Regula.ng the flow of data so that slow receivers
are not swamped by fast senders.
To accomplish these goals, the data link layer takes
the packets it gets from the network layer and =
encapsulates them into frames for transmission.
Each frame contains a frame header, a payload field
for holding the packet, and a frame trailer. Frame management forms the heart of what the data link layer does.
Services Provided to the Network Layer
The func.on of the data link layer is to provide services to the network layer. The principal service is transferring data
from the network layer on the source machine to the network layer on the des.na.on machine. On the source
machine is an en.ty, call it a process, in the network layer that hands some bits to the data link layer for transmission
to the des.na.on. The job of the data link layer is to transmit the bits to the des.na.on machine so they can be
handed over to the network layer there.The actual transmission follows but it is easier to think in terms of two data
link layer processes communica.ng using a data link protocol. The data link layer can be designed to offer various
services. The actual services
that are offered vary from protocol to protocol. Three reasonable possibili.es
that we will consider in turn are:
1. Unacknowledged connec.onless service.
2. Acknowledged connec.onless service.
3. Acknowledged connec.on-oriented service.
Unacknowledged connec.onless service consists of having the source machine send independent frames to the
des.na.on machine without having the des.na.on machine acknowledge them. Ethernet is a good example of a
data link layer that provides this class of service. No logical connec.on is established beforehand or released
a]erward. If a frame is lost due to noise on the line, no aIempt is made to detect the loss or recover from it in the
data link layer. This class of service is appropriate when the error rate is very low, so recovery is le] to higher layers. It
is also appropriate for real-.me traffic, such as voice, in which late data are worse than bad data. The next step up in
terms of reliability is acknowledged connec.onless service. When this service is offered, there are s.ll no logical
connec.ons used, but each frame sent is individually acknowledged. In this way, the sender knows whether a frame
has arrived correctly or been lost. If it has
not arrived within a specified .me interval,
it can be sent again. This service is useful
over unreliable channels, such as wireless systems. 802.11 (WiFi) is a good example of this class
of service. It is perhaps worth emphasizing that providing acknowledgements in the data link layer is just an
op.miza.on, never a requirement. The network layer can always send a packet and wait for it to be acknowledged
by its peer on the remote machine. If the acknowledgement is not forthcoming before the .mer expires, the sender
can just send the en.re message again. The trouble with this strategy is that it can be inefficient. Links usually have a
strict maximum frame length imposed by the hardware, and known propaga.on delays. The network layer does not
know these parameters. It might send a large packet that is broken up into, say, 10 frames, of which 2 are lost on
average. It would then take a very long .me for the packet to get through. Instead, if individual frames are
acknowledged and retransmiIed, then errors can be corrected more directly and more quickly. On reliable channels,
such as fiber, the overhead of a heavyweight data link protocol may be unnecessary, but on (inherently unreliable)
wireless channels it is well worth the cost.
Gelng back to our services, the most sophis.cated service the data link layer can provide to the network layer is
connec.on-oriented service. With this service, the source and des.na.on machines establish a connec.on before
any data are transferred. Each frame sent over the connec.on is numbered, and the data link layer guarantees that
each frame sent is indeed received. Furthermore, it guarantees that each frame is received exactly once and that all
frames are received in the right order. Connec.on-oriented service thus provides the network layer processes with
the equivalent of a reliable bit stream. It is appropriate over long, unreliable links such as a satellite channel or a
long-distance telephone circuit. If acknowledged connec.onless service were used, it is conceivable that lost
acknowledgements could cause a frame to be sent and received several .mes, was.ng bandwidth. When
connec.on-oriented service is used, transfers go through three dis.nct phases. In the first phase, the connec.on is
established by having both sides ini.alize variables and counters needed to keep track of which frames have been
received
and which ones have not. In the second phase, one or more frames are actually transmiIed. In the third and final
phase, the connec.on is released, freeing up the variables, buffers, and other resources used to maintain the
connec.on
Framing
To provide service to the network layer, the data link layer must use the service provided to it by the physical layer.
What the physical layer does is accept a raw bit stream and aIempt to deliver it to the des.na.on. If the channel is
noisy, as it is for most wireless and some wired links, the physical layer will add some redundancy to its signals to
reduce the bit error rate to a tolerable level. However, the bit stream received by the data link layer is not guaranteed
to be error free. Some bits may have different values and the number of bits received may be less than, equal to, or
more than the number of bits transmiIed. It is up to the data link layer to detect and, if necessary, correct errors.
The usual approach is for the data link layer to break up the bit stream into discrete frames, compute a short token
called a checksum for each frame, and include the checksum in the frame when it is transmiIed.) When a frame
arrives at the des.na.on, the checksum is recomputed. If the newly computed checksum is different from the one
contained in the frame, the data link layer knows that an error has occurred and takes steps to deal with it (e.g.,
discarding the bad frame and possibly also sending back an error report). Breaking up the bit stream into frames is
more difficult than it at first appears. A good design must make it easy for a receiver to find the start of new frames
while using liIle of the channel bandwidth.
1. Byte count.
2. Flag bytes with byte stuffing.
3. Flag bits with bit stuffing.
4. Physical layer coding viola.ons.
The first framing method uses a field in the
header to specify the number of bytes in the
frame. When the data link layer at the
des.na.on sees the byte count, it knows how
many bytes follow and hence where the end of
the frame is. for four small example frames of
sizes 5, 5, 8, and 8 bytes, respec.vely. The
trouble with this algorithm is that the count can
be garbled by a transmission error. For example,
if the byte count of 5 in the second frame becomes a 7 due to a single bit flip, the des.na.on will get out of
synchroniza.on.
It will then be unable to locate the correct start of the next frame. Even if the checksum is incorrect so the
des.na.on knows that the frame is bad, it s.ll has no way of telling where the next frame starts. Sending a frame
back to the source asking for a retransmission does not help either, since the des.na.on does not
know how many bytes to skip over to get to the start of the retransmission. For this reason, the byte count method is
rarely used by itself.
The second framing method gets around the problem of resynchroniza5on aYer an error by having each frame
start and end with special bytes. O]en the same byte, called a flag byte, is used as both the star.ng and ending
delimiter. Two consecu.ve flag bytes indicate the end of one frame and the start of the next. Thus, if the receiver
ever loses synchroniza.on it can just search for two flag bytes to find the end of the current frame and the start of
the next frame.It may happen that the flag byte occurs in the data, especially when binary data such as photographs
or songs are being transmiIed. This situa.on would interfere with the framing. One way to solve this problem is to
have the sender’s data link layer insert
a special escape byte (ESC) just before
each ‘‘accidental’’ flag byte in the
data. Thus, a framing flag byte can be
dis.nguished from one in the data by
the absence or presence of an escape
byte before it. The data link layer on
the receiving end removes the escape
bytes before giving the data to the
network layer. This technique is called
byte stuffing.
The byte-stuffing slight simplifica.on
of the one used in PPP (Point-to-Point
Protocol), which is used to carry
packets over communica.ons links.

The third method of delimi5ng the


bit stream gets around a disadvantage
of byte stuffing, which is that it is .ed
to the use of 8-bit bytes. Framing can
be also be done at the bit level, so frames can contain an
arbitrary number of bits made up of units of any size. It was
developed for the once very popular HDLC (Highlevel Data
Link Control) protocol. Each frame begins and ends with a
special bit paIern. This paIern is a flag byte. Whenever
the sender’s data link layer encounters five consecu.ve 1s
in the data, it automa.cally stuffs a 0 bit into the outgoing bit stream. This bit stuffing is analogous to byte stuffing,
in which an escape byte is stuffed into the outgoing character stream before a flag byte in the data. It also ensures a
minimum density of transi.ons that help the physical layer maintain synchroniza.on. USB (Universal Serial Bus) uses
bit stuffing for this reason. When the receiver sees five consecu.ve incoming 1 bits, followed by a 0 bit, it
automa.cally deletes the 0 bit. Just as byte stuffing is completely transparent to the network layer in both
computers, so is bit stuffing.
With bit stuffing, the boundary between two frames can be unambiguously recognized by the flag paIern. Thus, if
the receiver loses track of where it is, all it has to do is scan the input for flag sequences, since they can only occur at
frame boundaries and never within the data.

Error Control
By introducing .mers and sequencing. This possibility is dealt with by introducing .mers into the data link layer.
When the sender transmits a frame, it generally also starts a .mer. The .mer is set to expire a]er an interval long
enough for the frame to reach the des.na.on, be processed there, and have the acknowledgement propagate back
to the sender. Normally, the frame will be correctly received and the acknowledgement will get back before the
.mer runs out, in which case the .mer will be canceled. However, if either the frame or the acknowledgement is
lost, the .mer will go off, aler.ng the sender to a poten.al problem. The obvious solu.on is to just transmit the
frame again. However, when frames may be transmiIed mul.ple .mes there is a danger that the receiver will
accept the same frame two or more .mes and pass it to the network layer more than once. To prevent this from
happening, it is generally necessary to assign sequence numbers to outgoing frames, so that the receiver can
dis.nguish retransmissions from originals.
Flow Control
Another important design issue that occurs in the data link layer is what to do with a sender that systema.cally
wants to transmit frames faster than the receiver can accept them. This situa.on can occur when the sender is
running on a fast, powerful computer and the receiver is running on a slow, low-end machine. Clearly, something has
to be done to prevent this situa.on. Two approaches are commonly used. In the first one, feedback-based flow
control, the receiver sends back informa.on to the sender giving it permission to send more data, or at least telling
the sender how the receiver is doing. In the second one, rate-based flow control, the protocol has a built-in
mechanism that limits the rate at which senders may transmit data, without using feedback from the receiver

Error Detec5on and Correc5on


One strategy is to include enough redundant informa.on to enable the receiver to deduce what the transmiIed data
must have been. The other is to include only enough redundancy to allow the receiver to deduce that an error has
occurred. The former strategy uses error-correc5ng codes and the laIer uses error-detec5ng codes.
Error-Correc5ng Codes
We will examine four different error-correc.ng codes:
1. Hamming codes.
2. Binary convolu.onal codes.
3. Reed-Solomon codes.
4. Low-Density Parity Check codes.
All of these codes add redundancy to the informa.on that is sent. A frame consists of m data (i.e., message) bits and
r redundant (i.e. check) bits. In a block code, the r check bits are computed solely as a func.on of the m data bits
with
which they are associated, as though the m bits were looked up in a large table to find their corresponding r check
bits. In a systema5c code, the m data bits are sent directly, along with the check bits, rather than being encoded
themselves before they are sent. In a linear code, the r check bits are computed as a linear func.on of the m data
bits. Exclusive OR (XOR) or modulo 2 addi.on is a popular choice. This means that encoding can be done with
opera.ons such as matrix mul.plica.ons or simple logic circuits.

The parity bits are always on posi.on which is of power of 2, i.e 1,2,4,8 …. Parity 1 is
calculated by star.ng at posi.on one and taking an skipping one bit of the data. Parity
2 is calculated by star.ng at posi.on two and taking an skipping two bits of the data.
The same rules apply to 4,8… and all other parity bits. The parity bits are then sent
with the real data over the channel.
How to detect an error Recalculate the parity bits on the receiver’s side. If they match
than there is no error in the message. If they do not match just sum all those parity
bits and you will find the exact bit posi.on where the error ocured.

Elementary Data Link Protocols


•An Unrestricted Simplex Protocol

The Simplex protocol is hypothe.cal protocol designed for unidirec.onal data


transmission over an ideal channel, i.e. a channel through which transmission can never
go wrong. It has dis.nct procedures for sender and receiver. The sender simply sends
all its data available onto the channel as soon as they are available its buffer. The
receiver is assumed to process all incoming data instantly. It is hypothe.cal since it does
not handle flow control or error control.

•A Simplex Stop-and-Wait Protocol

Stop – and – Wait protocol is for noiseless channel too. It provides unidirec.onal data transmission without any error
control facili.es. However, it provides for flow control so that a fast sender does not drown a slow receiver. The
receiver has a finite buffer size with finite processing speed. The sender can send a frame only when it has received
indica.on from the receiver that it is available for further data processing.

•A Simplex Protocol for a Noisy Channel


Stop – and – wait Automa.c Repeat Request (Stop – and – Wait ARQ) is a varia.on of the above protocol with added
error control mechanisms, appropriate for noisy channels. The sender keeps a copy of the sent frame. It then waits
for a finite .me to receive a posi.ve acknowledgement from receiver. If the .mer expires or a nega.ve
acknowledgement is received, the frame is retransmiIed. If a posi.ve acknowledgement is received then the next
frame is sent.

Sliding Window Protocols


•A One-Bit Sliding Window Protocol

Sliding window protocols are data link layer protocols for reliable and sequen.al delivery of data frames. The sliding
window is also used in Transmission Control Protocol.
In this protocol, mul.ple frames can be sent by a sender at a .me before receiving an acknowledgment from the
receiver. The term sliding window refers to the imaginary boxes to hold frames. Sliding window method is also known
as windowing.
n one – bit sliding window protocol, the size of the
window is 1. So the sender transmits a frame, waits for
its acknowledgment, then transmits the next frame.
Thus it uses the concept of stop and waits for the
protocol. This protocol provides for full – duplex
communica.ons. Hence, the acknowledgment is
aIached along with the next data frame to be sent by
piggybacking. The data frames to be transmiIed
addi.onally have an acknowledgment field, ack field
that is of a few bits length. The ack field contains the
sequence number of the last frame received without
error. If this sequence number matches with the
sequence number of the frame to be sent, then it is
inferred that there is no error and the frame is transmiIed. Otherwise, it is inferred that there is an error in the
frame and the previous frame is retransmiIed.
Since this is a bi-direc.onal protocol, the same algorithm applies to both the communica.ng par.es.

•A Protocol Using Go Back N

Go-Back-N protocol is a sliding window protocol. It is a mechanism to detect and control the error in datalink layer.
During transmission of frames between sender and receiver, if a frame is damaged, lost, or an acknowledgement is
lost then the ac.on performed by sender and receiver is
explained in the following content.
Damaged Frame
If a receiver receives a damaged frame or if an error occurs while
receiving a frame then, the receiver sends the NAK ( nega.ve
acknowledgement) for that frame along with that frame number,
that it expects to be retransmiIed. A]er sending NAK, the
receiver discards all the frames that it receives, a]er a damaged
frame. The receiver does not send any ACK (acknowledgement)
for the discarded frames. A]er the sender receives the NAK for
the damaged frame, it retransmits all the frames onwards the
frame number referred by NAK.
Lost frame
The receiver checks the number on each frame, it receives. If a
frame number is skipped in a sequence, then the receiver easily
detects the loss of a frame as the newly received frame is received out of sequence. The receiver sends the NAK for
the lost frame and then the receiver discards all the frames received a]er a lost frame. The receiver does not send
any ACK (acknowledgement) for that discarded frames. A]er the sender receives the NAK for the lost frame, it
retransmits the lost frame referred by NAK and also retransmits all the frames which it has sent a]er the lost frame.
Lost Acknowledgement
If the sender does not receive any ACK or if the ACK is lost or damaged in between the transmission. The sender
waits for the .me to run out and as the .me run outs, the sender retransmits all the frames for which it has not
received the ACK. The sender iden.fies the loss of ACK with the help of a .mer.
The ACK number, like NAK (nega.ve acknowledgement) number, shows the number of the frame, that receiver
expects to be the next in sequence. The window size of the receiver is 1 as the data link layer only require the frame
which it has to send next to the network layer. The sender window size is equal to ‘w’. If the error rate is high, a lot of
bandwidth is lost wasted.

•A Protocol Using Selec5ve Repeat


Selec.ve repeat is also the sliding window protocol which detects or corrects the error occurred in datalink layer. The
selec.ve repeat protocol retransmits only that frame which is damaged or lost. In selec.ve repeat protocol, the
retransmiIed framed is received out of sequence. The selec.ve repeat protocol can perform following ac.ons
• The receiver is capable of sor.ng the frame in a proper sequence, as it receives the retransmiIed frame
whose sequence is out of order of the receiving frame.
• The sender must be capable of searching the frame for which the NAK has been received.
• The receiver must contain the buffer to store all the previously received frame on hold .ll the retransmiIed
frame is sorted and placed in a proper sequence.
• The ACK number, like NAK number, refers to the frame which is
lost or damaged.
• It requires the less window size as compared to go-back-n
protocol.

Damaged frames
If a receiver receives a damaged frame, it sends the NAK for the frame in
which error or damage is detected. The NAK number, like in go-back-n
also indicate the acknowledgement of the previously received frames
and error in the current frame. The receiver keeps receiving the new
frames while wai.ng for the damaged frame to be replaced. The frames
that are received a]er the damaged frame are not be acknowledged
un.l the damaged frame has been replaced.
Lost Frame
As in a selec.ve repeat protocol, a frame can be received out of order and further they are sorted to maintain a
proper sequence of the frames. While sor.ng, if a frame number is skipped, the receiver recognize that a frame is
lost and it sends NAK for that frame to the sender. A]er receiving NAK for the lost frame the sender searches that
frame in its window and retransmits that frame. If the last transmiIed frame is lost then receiver does not respond
and this silence is a nega.ve acknowledgement for the sender.
Lost Acknowledgement
If the sender does not receive any ACK or the ACK is lost or damaged in between the transmission. The sender waits
for the .me to run out and as the .me run outs, the sender retransmit all the frames for which it has not received
the ACK. The sender iden.fies the loss of ACK with the help of a .mer.

PPP
point to point protocol is a data link layer protocol which is used to set up a direct connec.on between two
networking nodes. Below are some of the characteris.cs of PPP:
Characteristics of Point to Point Protocol
• As men.oned in the beginning, PPP resides at the layer two of the OSI model.
• This protocol supports other essen.als such as authen.ca.on, error detec.on, link quality monitoring,
load balancing, compression, etc.
PPP basically redefines the format of the frame to be exchanged between two devices. Once the format is set, both
of devices can exchange the packets easily.
Components of PPP
To make PPP a successful protocol, there are certain essen.al components which form the basic building blocks of
this protocol.
1. Encapsula.on
2. Link Control Protocol (LCP) and,
3. Network Control Protocol (NCP)
1. Encapsula5on in PPP
Point to point protocol encapsulates the network layer packets in its frames. The fact that PPP can encapsulate any
network layer packet makes PPP layer three protocol independent and also capable of carrying mul.ple Layer three
packets over a single link.
2. Link Control Protocol
Link Control Protocol is the second component of PPP. The main purpose of LCP is to build and maintain data-link
connec.ons. Below are some of the func.onali.es of this sub-protocol:
2.1 PPP Authen.ca.on
PPP uses its Authen.ca.on method to iden.fy the remote device.
Scenario
Let’s say there are two routers R1 and R2. R1 has some data for R2 and wants to send the same to R2. But before
sending the data, R1 just wants to make sure that the R2 is in Real “R2”. To authen.cate its genuineness, R1 will
ini.ate an authen.ca.on process in where R2 will have to prove its iden.ty.
There are two authen.ca.on methods that PPP uses for authen.ca.on:
• PAP (Password Authen.ca.on Protocol)
• CHAP (Challenge Handshake Authen.ca.on Protocol)
2.1.1 PAP (Password Authen.ca.on Protocol)
PAP authen.ca.on is a two steps process. It goes like this:
Scenario: Router two wants to authen.cate itself to router one.
• In step one, router two will authen.cate itself to router one by sending its username and password in
clear text.
• Upon receiving it, router one will check its database and match the creden.als.
• Upon matching the creden.als, router one will either accept or reject the router two request.
It should be noted that PAP authen.ca.on between two routers happens during the connec.on establishment only.
Once the connec.on is already set up, no more sequen.al authen.ca.on is done for that par.cular session.
2.1.2 CHAP (Challenge Handshake Authen.ca.on Protocol)
Unlike PAP, CHAP is not only used for the ini.al connec.on set up but also, sequen.al authen.ca.on is performed to
make sure that router is s.ll communica.ng with the same host. If any sequen.al authen.ca.on is failed, the
connec.on will be terminated immediately.
CHAP authen.ca.on is a three steps process. It goes like this (scenario remains the same as of PAP)
2.2 Compression
Link Control Protocol (LCP) uses compression to increase overall data transmission speed while saving bandwidth at
the same .me. LCP compresses data at the sending end and decompresses the same at the receiving end.
2.3 Error Detec.on
LCP u.lizes a tool called LQM (Link Quality Monitoring) to monitor different interfaces for their error percentage.
There is a threshold value that has been defined for each interface. If a faulty interface exceeds the threshold value,
LCP disables that interface.
2.4 Mul.link
LCP can combine two physical links logically in such a way that they seem a single logical connec.on at layer three,
i.e., the network layer. For example, if there are two connec.ons of 128 Kbps then mul.link will combine them in
such a way that at layer three, they appear as one 256 Kbps connec.on.
You can also think of mul.link as link aggrega.on technology. However, with the mul.link the chances of receiving
the packets out of order, because of the mul.ple links, become high.
2.5 Loop Detec.on
Point to point protocol is also famous for detec.ng the looped connec.ons. To detect a loop, a node, while sending
the PPP LCP messages, might also tag along with a magic number. If the line is looped, the node will get back its sent
magic number in return. Otherwise, the node gets the peer’s magic number.
3. Network Control Protocol (NCP)
We already know that PPP works in data link layer of the OSI model. The data which comes from the upper layers
such as Transport Layer or Network Layer has to be fully compa.ble with the PPP. For the same purpose, NCP was
discovered.

You might also like