If we look at the client-server model in detail, we see that two processes (i.e., running programs)
are involved, one on the client machine and one on the server machine. Communication takes the
form of the client process sending a message over the network to the server process. The client
process then waits for a reply message. When the server process gets the request, it performs the
requested work or looks up the requested data and sends back a reply.
Home applications:
1.Access to remote information: Access to remote information comes in many forms. It can be
surfing the World Wide Web for information or just for fun. Information available includes the
arts, business, cooking, government, health, history, hobbies, recreation, science, sports, travel,
and many others. Fun comes in too many ways to mention, plus some ways that are better left
unmentioned.
2. Person-to-Person Communication: The second broad category of network use is person-toperson communication, basically the 21st centurys answer to the 19 th centurys telephone. Email is already used on a daily basis by millions of people all over the world and its use is
growing rapidly. It already routinely contains audio and video as well as text and pictures. Smell
may take a while. Any teenager worth his or her salt is addicted to instant messaging. This
facility, derived from the UNIX talk program in use since around 1970, allows two people to
type messages at each other in real time. There are multi-person messaging services too, such as
the Twitter service that lets people send short text messages called tweets to their circle of
friends or other willing audiences.
Network hardware:
Personal area network : PANs (Personal Area Networks) let devices communicate over the
range of
person. A common example is a wireless network that connects a computer with its peripherals.
Almost every computer has an attached monitor, keyboard, mouse, and printer. Without using
wireless, this connection must be done with cables. So many new users have a hard time finding
the right cables and plugging them into the right little holes (even though they are usually color
coded) that most computer vendors offer the option of sending a technician to the users home to
do it. To help these users, some companies got together to design a short-range wireless network
called Bluetooth to connect these components without wires.
LAN:
The next step up is the LAN (Local Area Network). 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 information.When LANs are used by companies, they are
called enterprise networks.
MAN:
A MAN (Metropolitan Area Network) covers a city. The best-known examples of
MANs are the cable television networks available in many cities. These systems grew from
earlier community antenna systems used in areas with poor over-the-air television reception. 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.
NETWORK SOFTWARE:
Terminologies:
Protocol: Agreement /rule b/w the communication parties on how the communication is to be
done i.e., b/w the systems transferring of data.
Architecture: A set of layers and protocols together farm network architecture.
Interface: it acts as an mediator b/w the two layers and services the lower layer makes available
to the upper 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 function of each layer differ from network to network. The purpose of each
layer is to offer certain services to the higher layers while shielding those layers from the details
of how the offered services are actually implemented. 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 information hiding, abstract data types, data encapsulation, and objectoriented programming. The fundamental idea is that a particular piece of software (or hardware)
provides a service to its users but keeps the details of its internal state and algorithms hidden
from them.
CONNECTION ORIENTED:
Connection-oriented service is modeled after the telephone system. To talk to
someone, you pick up the phone, dial the number, talk, and then hang up. Similarly, to use a
connection-oriented network service, the service user first establishes a connection, uses the
connection, and then releases the connection. The essential aspect of a connection 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 connection is established, the sender, receiver, and subnet conduct a
negotiation 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.
A circuit is another name for a connection with associated resources, such as a fixed bandwidth.
This dates from the telephone network in which a circuit was a path over copper wire that carried
a phone conversation.
CONNECTION ORIENTED
1. CONNECTION
2. DATA TRANSFER
3. DISCONNECT
Feature: route path is identified from sending host to receiving host a fixed route is identified and
used the same route to transfer all the packets.
VARIATIONS OF CONNECTION ORIENTED:
1. Reliable message stream
2. Reliable byte stream
3. Unreliable connection
Connection less:
connectionless service is modeled after the postal system. Each message (letter) carries the full
destination 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
alternative, 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 destination, 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.
Variations:
Unreliable data gram connection less service.
Acknowledge data gram service.
Request reply connection less service.
Layers:
OSI (open system interconnection)
The OSI model (minus the physical medium) This model is based on a proposal developed by
the International Standards Organization (ISO) as a first step toward international standardization
of the protocols used in the various layers (Day and Zimmermann, 1983). It was revised in 1995
(Day,
1995). The model is called the ISO OSI (Open Systems Interconnection) Reference Model
because it deals with connecting open systemsthat is, systems that are open for communication
with other systems. We will just call it the OSI model for short.
The OSI model has seven layers. The principles that were applied to arrive at the seven layers
1.Physical layer: The physical layer is concerned with transmitting raw bits over a
communication
channel. The design issues have to do with making sure that when one side sends a 1 bit it is
received by the other side as a 1 bit, not as a 0 bit. Typical questions 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 directions, how the initial connection 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 mechanical,
electrical, and timing interfaces, as well as the physical transmission medium, which lies below
the physical layer.
2.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 sequentially. If
the service is reliable, the receiver confirms correct receipt of each frame by sending back an
acknowledgement frame.
Another issue that arises in the data link layer (and most of the higher layers as well) is how to
keep a fast transmitter from drowning a slow receiver in data. Some traffic regulation mechanism
may be needed to let the transmitter know when the receiver can accept more data. Broadcast
networks have an additional 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 sub layer, deals
with this problem.
The network layer: The network layer controls the operation of the subnet. A key design issue is
determining how packets are routed from source to destination. Routes can be based on static
tables that are wired into the network and rarely changed, or more often they can be updated
automatically to avoid failed components. They can also be determined at the start of each
conversation, 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 time, they will get in one anothers
way, forming bottlenecks. Handling congestion is also a responsibility of the network layer, in
conjunction with higher layers that adapt the load they place on the network. More generally, the
quality of service provided (delay, transit time, jitter, etc.) is also a network layer issue.
Transport layer:
The basic function of the transport layer is to accept data from above it, split it up into smaller
units if need be, pass these to the network layer, and ensure that the pieces all arrive correctly at
the other end. 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 time.
The transport layer also determines what type of service to provide to the session layer, and,
ultimately, to the users of the network. The most popular type of transport connection is an errorfree 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 transporting of isolated
messages with no guarantee
about the order of delivery, and the broadcasting of messages to multiple destinations. The type
of service is determined when the connection is established. (As an aside, an error-free channel is
completely impossible to achieve; what people really mean by this term is that the error rate is
low enough to ignore
in practice.)
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 (preventing two parties from attempting the same
critical operation simultaneously), and synchronization (check pointing long transmissions to
allow them to pick up from where they left off in the event of a crash and subsequent recovery).
The presentation layer: Unlike the lower layers, which are mostly concerned with moving bits
around, the presentation layer is concerned with the syntax and semantics of the information
transmitted. In order to make it possible for computers with different internal data
representations to communicate, the data structures to be exchanged can be defined in an abstract
way, along with a standard encoding to be used on the wire. The presentation layer manages
these abstract data structures and allows
higher-level data structures (e.g., banking records) to be defined and exchanged.
Application layer: The application layer contains a variety of protocols that are commonly
needed by users. One widely used application protocol is HTTP (Hypertext Transfer Protocol),
which is the basis for the World Wide Web. When a browser wants a Web page, it sends the name
of the page it wants to the server hosting the page using HTTP. The server then sends the page
back. Other application protocols are used for file transfer, electronic mail, and network news.
2. Tcp/Ip reference model: Let us now turn from the OSI reference model to the reference model
used in the grandparent of all wide area computer networks, the ARPANET, and its successor,
the worldwide Internet. Although we will give a brief history of the ARPANET later, it is useful
to mention a few key aspects of it now. The ARPANET was a research network sponsored by the
DoD (U.S. Department of Defense). It eventually connected hundreds of universities and
government installations, using leased telephone lines. When satellite and radio networks were
added later, the existing protocols had trouble interworking with them, so a new reference
architecture was needed. Thus, from nearly the beginning, the ability to connect multiple
networks in a seamless way was one of the major design goals. This architecture later became
known as the TCP/IP Reference Model, after its two primary protocols. It was first described by
Cerf and Kahn (1974), and later refined and defined as a standard in the Internet community
(Braden, 1989). The design philosophy behind the model is discussed by Clark (1988).
The link layer: All these requirements led to the choice of a packet-switching network based
on a connectionless 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 connectionless internet layer. It is not really a layer at all, in the normal sense of the
term, but rather an interface between hosts and transmission links. Early material on the TCP/IP
model has little
to say about it.
The Internet layer: The internet layer is the linchpin that holds the whole architecture together.
It is shown in Fig. 1-21 as 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 destination
(potentially on a different network). They may even arrive in a completely different order than
they were sent, in which case it is the job of higher layers to rearrange them, if in-order delivery
is desired. Note that internet is used here in a generic sense, even though this layer is present
in the Internet.
The application layer: The layer above the internet layer in the TCP/IP model is now usually
called the transport layer. It is designed to allow peer entities on the source and destination
hosts to carry on a conversation, 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 connection-oriented protocol that allows a byte stream originating 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 destination, 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 internet:
The Internet is not really a network at all, but a vast collection 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. To better understand it, let us start
from the beginning and see how it has developed and why. For a wonderful history of the
Internet, John Naughtons (2000) book is highly recommended. It is one of those rare books that
is not only fun to read, but also has 20 pages of ibid.s and op. cit.s for the serious historian.
Some of the material in this section is based on this book.
Architecture of the Internet: The architecture of the Internet has also changed a great deal as it
has grown explosively. In this section, we will attempt to give a brief overview of what it looks
like today. The picture is complicated by continuous upheavals in the businesses of telephone
companies (telcos), cable companies and ISPs that often make it hard to tell who is doing what.
One driver of these upheavals is telecommunications convergence, in which one network is used
for previously different
uses. For example, in a triple play one company sells you telephony, TV, and Internet service
over the same network connection on the assumption that this will save you money.
Consequently, the description given here will be of necessity somewhat simpler than reality. And
what is true today may not be true tomorrow.
The big picture is shown in Fig. 1-29. Let us examine this figure piece by piece, starting with a
computer at home (at the edges of the figure). To join the Internet, the computer is connected to
an Internet Service Provider, or simply ISP, from who the user purchases Internet access or
connectivity. 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 matter. There are many kinds of Internet access, and they are usually distinguished by
how much bandwidth they provide and how much they cost, but
the most important attribute is connectivity.
PHYSICAL LAYER
---The theoretical basis for data communication info can be
transmitted through wires by varying some physical property such as voltage or current.
---By representing the value of voltage with a single valued function
of time f(t) can be modelled with the behavior of signal.
Fourier series:
Any reasonably period function g(t) with period T can be constructed as the sum
of number of sines and cosines.
g(t)=1/2+ansin(2nft)+ bncos(2nft)
n=1
n=1
Where f=1/T and an, bn are the sine and cosine amplitudes and is a
constant such decomposition is called fourier series.
T
an=2/Tg(t) .sin(2nft)dt
0
T
bn=2/Tg(t) .cos(2nft)dt
T
=2/Tg(t) dt
--Bandwidth: The range of frequencies transmitted without being modified or altered is called
bandwidth.
--The bandwidth is a physical property of the transmission medium depends on
thickness and length of the medium.
construction,
--magnetic media.
--A twisted pair consists of two insulated copper wires about 1mm thickness.
--These wires are twisted together to reduce the finite antinas which is produced
When both wires are in parallel.
--Twisted pairs can be several meters without amplification, but for longer distances repeaters
are required.
--The bandwidth depends on the thickness of the wire and several megabits/sec transmission rate
can be achieved.
--They are cheap and perform well.
Coaxial Cables:
Ex: The city cable wire used for cable TV and MANs.
Fiber Optics:
An optical transmission has three key components
i.)The light source.
ii.)The transmission media.
iii.)Detector.
--A pulse of light indicates a one bit and the absence of light indicates a zero
Width.
--The transmission medium is an ultrathin fiber of glass and the detector generates an electrical
pulse when light falls on it.
--By attaching a light source at one end of an optical fiber and a detector to the other end.
--A unidirectional data transmission system that accepts an electrical signal converts and
transmits the signal by the light pulse and then reconverts the output to an electrical signal at the
receiving time.
--When light passes from one medium to other the ray is refracted at the boundary the amount of
refraction depends on the media.
Atienuation:
-- The loss of energy has the signal propagates outwards.
-- The loss of energy is expressed in decibals per second.
Noise:
An unwanted energy from sources other than the transmitter.
Modems:
To avoid the problems assocaited with DC-signalling,AC-signalling the modems are used.
Multiplexers:
--Telephone companies have developed eloborate schemes for multiplexig over a singal trunck
they are freuency division multiplexing.
--The frequency spectrum is divided into frequency with each user having exclusive frequency.
Switching:
When a message is created at the centre and intended to send the message to the receiver there
are three varities of switching there are
i.)Circuit switching: In circuit switching a virtual circuit i.e path from sender to recevier is
established,the entire message is allowed to pass through the circuit bit by bit.
iii.)Packet Switching: Packet Switching is very similar to message switching except a type upper
limit to the size of the block or packet and these packets are placed in the routers main memory
and then transfer to the receiver.
Packet Switching
Probability of congestion.
No wastage of bandwidth.
a)A Frame Delimited By Flag Bytes b)Four examples of Byte Sequences before and after
stuffing.
It is one of the error detecting methods and is used to detect a single error.
In this process, we have a generator and a frame.
For example ,we have total n no. of digits in generator ,we append
n-1 no. of zeroes at the end of frame and continue the division process.
After performing the division as mentioned above, if the remainder is obtained 0,we
conclude there is no error and the data is correctly transmitted.
If the remainder is not 0,there is an error and the message is
discarded and receiver asks the sender to retransmit the data.
Fig.below illustrates the calculation for a frame 1101011011 using the generator G(x) = x4 + x +
1.
Calculation of the polynomial code checksum:
Assumptions:
1)One direction flow of data from sender to receiver.
2) The receiver has only finite buffer capacity.
3) Communication is error free.
4) The receiver has a finite processing speed.
The advantage of this protocol is that it is able to prevent the sender from flooding the
receiver with fastest data rate, than it can handle.
The sender procedure has one frame which is made from the packet received from
network layer and forwarded to physical layer. But, the physical layer would be waiting
for the acknowledgement frame from the previously transmitted frame from the receiver.
The receiver procedure has two frames. One for the frame received from the physical
layer to be converted to a packet and forwarded to the network layer. The other frame is
sent to the physical layer as acknowledgement to the sender for the already transmitted
frame.
Disadvantages:
1) Sender always waits for the acknowledgement frame to send the next frame.
2)If the acknowledgement frame gets corrupted,the sender cannot perform anymore.
Assumptions:
1) Data transfer is only in one direction.
2) Separate sender and receiver.
3) Finite processing capacity and speed at the receiver.
4) Since it is a noisy channel , errors in the data frames or acknowledgement frames are
expected.
5) Every frame has an unique sequence number.
6) After a frame has been transmitted, timer is started for a finite time. Before the timer expires,
if the acknowledgement is not received, the frame gets retransmitted.
7) When the acknowledgement gets corrupted or the sent data frame gets damaged, how long the
sender should wait to transmit the next frame is infinite.
This protocol is also called as Positive Acknowledgement with Retransmission (PAR) or
Automatic Repeat Request Protocol (ARQ).
Sliding Window Protocols:
1. Piggy Backing
2. One Bit Sliding Window Protocol
In the data link protocols, data frames transmitted in one direction only, where as in
sliding window protocols, the data is transmitted in both the directions.
1.Piggy Backing:
When a data frame arrives,instead of immediately sending the acknowledgement
frame,the receiver waits for the next data packet and the acknowledgement ia attached to the
outgoing frame.
When no data packet from receiver ,the receiver should send an acknowledgement
to the sender before the time elapses at the sender to avoid retransmission of data.
2.One Bit Sliding Window Protocol:
In this protocol, each frame contains a sequence number ranging from 0 to 1.In
general, the sequence numbers will be from 0 to 2^ (n-1),where n is the sequence number bit
field. This protocol is similar to elementary data link protocols except the direction of
communication. Next frame to send tells which frame the sender is trying to send .The frame
expected tells which frame the receiver is expecting. In both the cases, 0 and 1 are the only
possibilities.
The Acknowledgement field contains the number of last frame received without
error. If this number agrees with the sequence number of the frame, the sender is trying to send ,
the sender knows it is received correctly. The next frame stored in the buffer can be fetched from
the network layer. If the sequence number disagrees, it must continue to send the same frame.
1. Pipelining
2. Round Trip Time
3. Protocol 5(Go Back N)
4. protocol 6(Selective Repeat)
1.Pipelining:
In all the previous protocols,the rule is that a sender has to wait for an
acknowledgement before sending another frame.It is a technique which includes parallelism in
the protocols and allows the sender to transmit more than one frame before blocking.With an
appropriate choice,how many frames sender will be able to continuously transmit frames for a
time equal to round trip time.
2.Round Trip Time:
Sum of the times taken from the sender to receiver and from receiver to sender for a
frame to transmit.
3.Protocol 5(Go Back N protocol):
One of the pipelining protocol which deals with errors. The receiver simply
discards all subsequent frames sending no acknowledgements for the discarded frames. The data
link layer refuses to accept any frame except the next one it must give to the network layer. If the
senders window fills up before the timer runs out, the pipeline begins to empty and the sender
retransmit all the unacknowledged frames in order starting with the lost frame.
Advantages:
i.
Minimum Buffer management is required.
ii.
It requires minimum buffer space.
Disadvantages:
i.
ii.
the receiver can deliver to the network layer in sequence. Selective Repeat Protocol is often
combined with negative acknowledgements when it detects an error.
A
dvantages:
i.
ii.
iii.
Disadvantages:
1. It requires large amount of buffer space at the receiver end.
CARRIER SENSE MULTIPLE ACCESS WITH COLLISION DETECTION(CSMA/CD):If two staations senses the channel to be idle and begin trasmitting
simultaneously ,the above protocols may not work.
CSMA/CD uses the conceptual model, a station has finished its trasmittiing its frame,any other
station having a frame to send may attempt to trasnsfer the frame .If two or more stations
decides to transmit simultaneously,there will be a collision.If a station detects a collision,it
aborts its transmission waits a random period of time and then transmitts again.
CSMA/CD can be in one of three states: contention,
transmission, or idle.
TRANSMISSION PERIOD:
Stations can send the frames without any collision.
CONTENSION PERIOD:
When more than one station ready with their data, a fight among themselves for a channel.
IDLE PERIOD:
The channel is not busy and no station is ready with frames.
MULTIPLE ACCESS PROCESS:
The basic idea of ALOHA is very simple.The users transmit the data whenever they are
required.There will be collisions and all the colliding frames will be damaged.Systems in which
multiple users share a common channel in which they lead to conflicts which are known as
contention systems.
In pure ALOHA, frames are transmitted at completely
arbitrary times.
When
at a time,the two frames colllides each other and both the frames are lost.In this particular
case,the first bit of the new frme overlaps of the first bitof the frames and they should be
retramsmitted once again.
Frame time denotes the amount of time needed to transmit the standard fixed length frame and it
uses poison distribution formula.
N=no.of frames generated by all the users in on frame time.
0<N<1
K=no.of transmissionss attempt for frame time.
G=no.of old frmes +no.of new frames.
Bit-Map Protocol:
In this protocol each contension period consists of n-slots, when station J has a frame to send it
announces by inserting 1 bit into the slot J. After all n slots have passed by each station has
complete knowledge of which stations need to tansmit.
Station they begins the transmitting the frames in numerical order and it helps us to avoid the
collision.
Protocols like this in which the desire to transmit is broadcast before the actual transmission are
called reservation protocols.
Performance:The performance of the protocol calculates under two circumstances
i.
At low load
ii.
At high load
starting with high ordered bit all address are assumed to be same length.
The bits on each address position from different stations are Boolean or operation is
performed.
When stations 0010,0100,1001 & 1010 are in competition for the channel, the last two
stations has higher order bit 1.
Therefore, the first two stations giveup for the current round.Now the competition is
between the last two stations, the next bit is 0 in both the station addresses, so the
competition continues in the next bit position only 1010 station has one in that position
Therefore 1001, gives up and the winner is 1010.
Channel efficiency is d/(d+log2N).
Ethernet MAC sublayer protocol:
The minimum requirement for the frame length is 64 bytes, the pad field is used to fill out the
frame to the minimum size.
Checksum field:
If data is received and error is identified then checksum algorithm will be used.
LAN.
Uses of bridges:
Different departments in the organization have different goals and the organizations may be
geographically connected to accommodate the load, it is necessary to split a single LAN for
reliability purpose and physical distance between the LANs.
Bridges should be transparent so that any bridge can be removed or inserted without changing
any hardware, software or configuration tables.
Fig:
Flooding:
Every incoming frame for an unknown destination is output on all the LANs to which the
bridge is connected except the one it is arrived on.
Bridges connect multiple LANs.
Each bridge maintains a hash table within them.
Hash tables are used to forward the incoming frame to the next available LAN on the
destination address.
Bridges operate plug in and plug out without changing any software or hardware.
When bridge is connected newly it fills the data into the hash table by backward mechanism.
Addition or removal of any host or any LAN has no impact on rich performance.
The routing procedure for an incoming frame depends on the LAN it arrives and the LAN of its
destination is as follows:
(i)If destination and source LANs are same, discard the frame.
(ii)If destination and source LANs are different, forward the frame.
(iii)If destination LAN is unknown, use flooding.
Repeater:
These are the analogue devices that are connected for a given cable segments. A signal appearing
on one of them is amplified and put out on the other cable. Repeater can only understand volts.
Hubs:
Hub has a number of input lines that it joins electrically. Frames arriving on any of the line are
sent out on all the others. If two frames arrives at the same time they will collide. Therefore the
entire hub forms a single collision domain and hubs do not amplify the incoming signal.
Fig:
Switches:
Switches are similar to bridges. A switch is often used to connect individual computers, switches
only forward frames.
Bridges:
A bridge connects two or more LANs when a frame arrives the software in the bridge extracts
the destination address from the frame and look it in the hash table where to send the frame in tis
domain.
Router:
When a packet comes into a router, the frame header and trailer are stripped off and the packet
located in the frame is passed into the routing software. This software uses the packet header to
choose an output line.
Gateways:
It understands the format and the content of the data and translate the message from one format
to another format.
As table
Initially
later
Cs table
Es table
H1
H3
As table
Cs table
Es table
Fig: Routing within a virtual circuit
For connection oriented service, we need a virtual circuit subnet. When a
connection is established, a route from the source machine to the destination machine is chosen
as part of the connection setup and stored in tables inside the routers. The route is used for all
traffic following over the connection. When a connection is released, the virtual circuit is also
terminated. With connection oriented service, each packet carries an identifier telling which
virtual circuit it belongs to.
Example : Host H1 establishes a connection to H2 with identifier=1. The first line in all router
tables are created with id=1. When host H3 wanted to have a connection with H2, H3 thinks also
id=1 but A-knows id=1 is already in use and gives id=2 for H3 to H2 traffic. All second entries of
all table i.e. A,C,B are for H3 to H2.
4.Comparision of Virtual circuit and Datagram subnets :
6.Quality of
service
Difficult
7.Congestion
control
Issue
Difficult
1.Circuit setup
Not needed
2.Addressing
Each packet contains the full Each packet contains a short virtual
source and destination addresses. circuit numbers.
3.State
information
Routers do not hold state info Each virtual circuit requires router
about connections.
table space per connection.
4.Routing
Each
packet
independently.
Datagram subnet
Required
is
5.Effect of router None, except the packets lost All virtual circuits that passed through
failure
during the crash.
the failed router are terminated.
Routing algorithms :
1. Non adaptive / Static algorithms: They do not base their routing decisions on
measurements or estimates of the current traffic and topology.
2. Adoptive / Dynamic routing: They change their routing decisions to reflect changes in the
topology, and the current traffic as well.
Shortest path routing: (A static routing algorithm)
Metrics used: Distance, Bandwidth, average traffic, communication cost, mean queue
length, measured delay etc.
One among them is used in Routing algorithms. Dijkstra(1959) developed this. Each
node is labelled with its distance from the source node along the best known path. Initially, no
paths are known, so all nodes are labelled with infinity. As the algorithm proceeds and paths are
found, the labels may change, reflecting better paths. A label may be tentative or permanent.
Initially all labels are tentative. When it is discovered that a label represents the shortest possible
path from the source to that node, it is made permanent and never changed there after.
TO
New
estimated
delay from
J
Line
A
B
C
D
E
F
G
H
I
J
K
L
0
12
25
40
14
23
18
17
21
9
24
29
24
36
18
27
7
20
31
20
0
11
22
33
20
31
19
8
30
19
6
0
14
7
22
9
21
28
36
24
22
40
31
19
22
10
0
9
JA
JI
JH
JK
Delay in 8 Delay in 10 Delay in 12 Delay in 6 sec
sec
sec
sec
8
20
28
20
17
30
18
12
16
0
6
15
A
A
I
H
I
I
H
H
I
K
K
This algorithm reacts rapidly for good news but leisurely for bad news .After 4 exchanges E
comes to know ,it is 4 hops away from router A.
B.
Bad news:-
Where a link between A and B fails , B looks at C and increments its value to 3 looking at B. C
also increments its values to 4 and this into with its neighbors .This process continued and
values become infinity ,but no station is found . This is called count to infinity problem in DV
routing.
LINK-STATE ROUTING
This is simple and can be done in five steps.
1.Discover its neighbors and learn their new address .
2.Measure the delay or cost to each of its neighbors.
Every router can know who is its neighbors by sending a hallow packet on point to point
liner. But in some typical cases as shown in fig a, This can be resolved by adding a new during
node N to which A,C,I are connected.
Measuring the live cost:-It is important to know the live cost or delay between its neighbors by
every router .This can be achieved by sending a echo packet to all its neighbors .The other side
returns immediately there by round trip time (RTT) can be estimated and half of RTT would be
the live cost between that two routers.
3.building link state packets:- As the information is collected ,it should be exchanged with
routers of the subnet. Each router is building a packet contains all this information called link
state packets.
C
SEQ
AGE
B
D
E
2
3
1
SEQ
SEQ
AGE
AGE
A
C
F
5
1
8
C
F
3
7
B
Seq
Age
A 4
C 2
AF 6
Seq
Age
B 4
E 5
F
SEQ
The link state packets for subnet.
AGE
B
D
E
6
7
8
1a
- 1c - 3
Distributing
1b 1b
This
the routers
1d 1c
age fields
confusion.
2a 1b
Computing
Once2ba 1b
can
2d With
1b
results of
normal
2d 1b
Hierarchical
As 3a
the 1c
router
done3b
Where
4a
1c
regions,
route4b
1c
For huge
zones and
4c
1c
the link state packets:algorithm uses flooding to distribute all the packets to all
in the subnet. During this process sequences number and
are node helpful in reducing the congestion and
1
2
3
new routes:router has accumulated a full set of link state packets ,it
constructs entire subnet graph.
the help of shortest path to all possible destinations. The
the algorithm can be installed in the routing tables and
operations resumed.
routing:networks grows, it is not possible to keep every other
information in any routing table .so the routing have to be
hierarchically.
hierarchical routing is used, the router are divided into
with each routers knowing all the details about how to
packets to destinations within its region.
networks regions are divided into cluster, the cluster into
zones into groups e t c. .
3
4
3
2
4
4
4
5a
1c
5b
1c
5d
1b
5d
1c
From the
number of
There are
considered
to 7 from
5e
1a
1b
1d
1c
1b
1c
1c
1c
2. Flooding is another method, but not suitable for point to-point links.
3. Multi destination Routing. Each packets contains either a list of destinations or a bitmap
indicating the designed destinations. With this all the destinations are partitioned and grouped.
Each packet having one group of addresses and where a packet comes on to a router, router pick
up the concerned outgoing linear to reach to only those destinations. Finally all the destinations
are reached.
3. Spanning tree: - When a router needs to be broad casted, tacking that router as the root
node, a spanning tree could be constructed which includes all router but no loops. Further
these packets are forwarded to all destinations.
Advantages:
1. Reasonably efficient.
2. Easy to implement.
3. It does not requires router to know about spanning tree.
4. No overhead of destination list/bitmap.
MULTICAST ROUTING
Sending a message to a group is called multicasting & its routing algorithm is called multicast
routing.
Multicasting requires group management. It is needed to create and destroy groups. Routing
should be informed which of their hosts belong to which groups. Sometimes hosts inform this
information, in other case routers query their hosts periodically for the same.
To do multicast routing, each router computes a spanning tree covering all other routers.
When a process sends a multicast packet to a group, the first router examines its spanning tree
and pruses it, removing all lines that does not lead to hosts that are members of the group.
Multicast packets are forwarded only along the appropriate spanning tree.
Advantages: So far this is the best algorithm for multicast routing.
Disadvantages: It scales poorly to large networks.
CONGESTION CONTROL ALGORITHMS
When too many packets are present in the subnet, performance degrades. This situation is called
congestion.
What should we do in Routers?
1. Within the router, the memory capacity can be increased. So that a bigger queue is
accommodated.
2. The processing speed of the router can be increased.
Overall, congestion control has to do with making sure the subnet is able to carry the offered
traffic.
I.
It has 3 parts.
1. Monitor the systems to detect when and where congestion occurs.
2. Pass their information to places where actions can be taken.
3. Adjust system operation to correct the problem.
Metrics used for congestion control
1. % of all packets discarded for lack of buffer space.
2. The average queue lengths.
3. The number of packets that timeout and retransmitted.
4. The average packet delay & standard deviation of the packet delay.
II.
3. Negotiation between host and subnet: When a virtual circuit is setup host can
negotiate for an agreement with the subnet. This agreement normally specifies the volume &
shape of the traffic, quality of service required. To keep its part of agreement, the subnet
reserve resources along the path when the circuit is setup.
III.
Choke Packet: In this procedure, the router sends a choke packet back to the source host.
When the source host gets a choke packet, it is required to reduce the traffic sent to the
specified destination.
Hop-By-Hop Choke Packet: At high speeds or over long distances, sending a choke packet
to the source hosts does not work well because the reaction is slow. An alternative approach
is to have the choke packet take effect at every hop it passes through. The net effect of this
hop-by-hop scheme is to provide quick relief at the point of congestion at the price of using
up more buffer upstream.
IV.
Load Shedding
When no method is able to control the congestion & routers are heavily flooded with
packets. They try to drop packets at random. This is called load shedding. But there are some
alternatives, which packet to drop & which is not.
Senders can send their packets with some priority classes to indicate how important they
are. If they do this, then when packets have to be discarded, routers can drop first packets
from the lowest class and the n the next lowest class & so on.
V.
JITTER CONTROL
For audio, video streaming it does not matter how much if the packet take 20msec or 30msec
to be delivered, as long as the transit time in constant. The variation in the packet arrival time
called Jitter.
To control Jitter
Method 1:
When a packet arrives at a router, the router checks to see how much the packet is behind
or ahead of its schedule. This information is stored in the packet and updated at each hop. In
the way packets ahead of schedule get slowed down and which are behind schedule gets
speeded up.
Method 2:
Jitter can be eliminated by buffering at the receiver and then fetching data for display
from the buffer instead of from the network.
Quality of service:
A stream of packets from a source to a destination is called a flow. The needs of each flow can
be characterized by 1.Realiability 2.Delay 3.Jitter 4.Bandwidth. Together these determine QOS
(Quality of Service) the flow requires.
The leaky bucket consists of a finite queue. When a packet arrives, if there is room on
the queue it is appended to the queue. Otherwise it is discarded. At every clock tick, one packet
is transmitted.
The byte counting leaky bucket is implemented as, at each tick, counter is initialized to
n. If the first packet on the queue has fewer bytes than the current value of the counter, it is
transmitted, and the counter is decremented by that number of bytes. Additional packets may also
be sent, as long as the counter is high enough. When the counter drops below the length of the
next packet on the queue, transmission stops until the next tick, at which time the residual byte
The token bucket algorithm can save number of token depends on the size of the bucket, n.
This property means that bursts of up to n-packets can be sent at once, allowing some burstiness
in the output stream and giving faster response to sudden bursts of input.
TRANSPORT LAYER
-The hardware and software (within the transport layer) that does the work is called transport
entity.
Packets sent
None
ii.)connect
Connection request(c.r)
iii)send
iv.)receive
Data
None
v.)disconnect
disconnection
Connection Management:
Meaning
It blocks untill some process
tries to connect.
Actively attempt to establish
a connection.
Sending information
Blocks until the data packet
arrives.
Removes connection.
Berkley Sockets:
i.)Socket: It creates new communication end point and contains IP address and port number.
ii.)Bind: It attaches a local address to a socket.
iii.)Listen: Announces willingness to accept the connection.
iv.)Accept: Blocks the caller until a connection attempt arrives.
v.)connect: Actively attempts to establish a connection.
vi.)send: Sends some date over the connection.
vii.)Receive: Receives some data from the connection.
viii.)close: Release the connection.
Elements of transport protocols:
i.)Addressing.
ii.)connection establishment.
iii.) connection release.
Old duplicate connection request appearing out of nowhere some has send the request to the
host 2 acknowledgment will be sent to host 1 after verification the host 1 rejects the
connection.
Connection release:
- It is terminating as a connection , this is of two types i.)asymmetric release.
-
Ii.)symmetric release.
The networks is unreliable the sender must before send all the TDPU use (transfer protocol
data use) all the TDPU use are not the same size and there are different schemes available to
keep ine buffer from one TDPU.
a.)Chained fixed size buffer:
If the buffer size is chosen equal to the largest possible space will be wasted, wherever a
short TDPU arise.
b.)Variable size buffer:
We can have variable sized buffers with short TDPU , and is accommodated in large
buffers.
Adv: Better memory utilization.
Disadv: more complicated buffer management.
c.)Single large buffer:
The third possibility it is dedicated , a single large buffer for connection and the system
also make use of the memory.
Multiplexing:
a.)Source Port: This is needed when a reply must be sent back source. In the reply , datagram
source code port becomes destination port.
b.)UDP_length: This includes the 8 byte header and data.
c.)UDP_checksum: This is optional and store 0 if not computed UDP doesnt do flow
control , error control , retransmission. UDP is useful inclient server application , Domain
Name System (DNS).
ii.)TCP(Transmission Control Protocol):
It was designed to provide a reliable end to end byte stream over an unreliable network. It is
a connection oriented protocol. A TCP entity accepts user datagram and breaks them into
small pieces not exceeding 64 kb.
i.)Source port and Destination port: They identify the local end points of the connection.
ii.)sequence and acknowledgment number: This field is 32 bit long because every byte of
data is numbered in tcp and the acknowledgment number specifies the next byte expected.
ii.)TCP header length: It tells how many 32 bit words are contained in the TCP header.
URG: When URG is set to 1 , the urgent pointer is in use, it is used to indicate a byte offset
from the current sequence number at which urgent data to be found.
Ack : The acknowledgment bit is set to 1 , to indicate that the acknowledgment is valid, if
ack=0, the segment doesnt contain an acknowledgment .
PSH: This indicates the pushed data , receiver is requested to deliver the date to the
application upon arrival and not buffering.
RST: This bit used to reset a connection that has become confused due to host crash or some
other reason.
SYN: The syn bit is used to establish a connection. The connection request has syn=1, ack=0
which indicates no use of the piggy back acknowledment if syn=ack=1 , use piggy back
acknowledment.
FIN: It is used to release a connection , ot specifies that sender has no more data to transmit.
WindowSize: This field tells how many bytes may be sent starting at the byte
acknowledment.
Checksum:Thisis also provided for extra reliability it checksums the header and data.
Options: This field provides a way to add extra facilities not covered by the regular header.
This problem degrades TCP performance. This problem occurs when data is
passed to the sending TCP entity in large blocks. On the receiving side, it reads 1 byte data at
a time. From the figure, initially TCP buffer on the receiving side is useful, and the sender
has this information and the application reads, char from TCP stream at the receiver and
sends a window update one to the sender to send 1 byte of information. The sender sends 1
byte and the buffer is now full, and the receiver acknowledges the 1 byte segment. This
behavior can go on for ever.
Solution:
Instead of sending update for every one byte, if it is forced to wait until it has decent
amount of space available and then sends the window for data.
Congestion:
Happens when offered load close to network capacity
Several factors can cause congestion
Sudden traffic bursts
Role of memory (buffering capacity)
Slow processors
Low bandwidth links
Congestion control vs. flow control
Congestion control involves the whole network
Only a pair of nodes (sender and receiver of a flow) are involved in flow control
But both may require same response from senders, i.e., reducing sending rate
Congestion Control:
Virtual circuit subnets
Admission control
Rerouting new virtual circuits around congested areas
Resource reservation during virtual circuit setup
Jitter (delay variation) control for audio/video applications
Can be bounded by computing expected transit time
Prioritizing packets that are behind their schedule the most can help control jitter
Buffering at receiver can help for video on demand or stored audio/video streaming apps,
but not for live apps like Internet telephony or video conferencing.
Datagram subnets
Monitor resource (e.g., output line) utilization and enter a warning state when it exceeds
a threshold
On packet arrival for the resource in warning state, inform traffic source
using:
Warning bit
Choke packets
Hop-by-hop choke packets
Load shedding (random vs. application-aware)
- E.g., Random Early Detection (RED) with TCP.
TCP Congestion Control:
Congestion can be dealt with by employing a principle borrowed from physics: law of
conservation of packets, i.e., refrain from injecting a new packet until an old one leaves the
network
TCP achieves this goal by adjusting transmission rate via dynamic manipulation of sender
window = min (receiver window, congestion window)
a) A fast network feeding a low capacity receiver flow control problem (receiver window)
b.)A slow network feeding a high capacity receiver congestion control problem (congestion
window)
Congestion detection via monitoring retransmission timeouts because lossesmainly due to
congestion in wired Internet and losses lead to timeouts
In principle, domains can be inserted into the tree in two different ways. For example,
cs.yale.edu could equally well be listed under the us country domain as cs.yale.ct.us. In
practice, however, most organizations in the United States are under a generic domain, and
most outside the United States are under the domain of their country. There is no rule
against registering under two top-level domains, but few organizations except multinationals
do it (e.g., sony.com and sony.nl).
Each domain controls how it allocates the domains under it. For example, Japan has
domains ac.jp and co.jp that mirror edu and com. The Netherlands does not make this
distinction and puts all organizations directly under nl. Thus, all three of the following are
university computer science departments:
1. cs.yale.edu (Yale University, in the United States)
2. cs.vu.nl (Vrije Universiteit, in The Netherlands)
3. cs.keio.ac.jp (Keio University, in Japan)
Resource Records
Every domain, whether it is a single host or a top-level domain, can have a set of resource
records associated with it. For a single host, the most common resource record is just its IP
address, but many other kinds of resource records also exist. When a resolver gives a
domain name to DNS, what it gets back are the resource records associated with that name.
Thus, the primary function of DNS is to map domain names onto resource records.
A resource record is a five-tuple. Although they are encoded in binary for efficiency, in most
expositions, resource records are presented as ASCII text, one line per resource record. The
format we will use is as follows:
Domain_name Time_to_live Class Type Value
The Domain_name tells the domain to which this record applies. Normally, many records exist
for each domain and each copy of the database holds information about multiple domains
The Time_to_live field gives an indication of how stable the record is. Information that is
highly stable is assigned a large value, such as 86400 (the number of seconds in 1 day).
Information that is highly volatile is assigned a small value, such as 60 (1 minute). We will
come back to this point later when we have discussed caching.
The third field of every resource record is the Class. For Internet information, it is always IN.
For non-Internet information, other codes can be used, but in practice, these are rarely
seen.
The Type field tells what kind of record this is.
Name Servers
In theory at least, a single name server could contain the entire DNS database and respond
to all queries about it. In practice, this server would be so overloaded as to be useless.
Furthermore, if it ever went down, the entire Internet would be crippled
The next step is to start at the top of the name hierarchy by asking one of
the
root name servers. These name servers have information about each toplevel domain
To contact a root server, each name server must have information about one
or more root name servers. This information is normally present in a system
configuration file that is loaded into the
DNS cache when the DNS server is started. It is simply a list of NS records for
the root and the corresponding A records.
There are 13 root DNS servers, unimaginatively called a-root-servers.net
a small number of retries. This process is designed to handle the case of the
server
being down as well as the query or response packet getting lost. A 16-bit
identifier is included in each query and copied to the response so that a
name server
can match answers to the corresponding query, even if multiple queries are
outstanding at the same time.
Electronic mail
Electronic mail, or e-mail, as it is known to its many fans, has been around for over two
decades. Before 1990, it was mostly used in academia. During the 1990s, it became known
to the public at large and grew exponentially to the point where the number of e-mails sent
per day now is vastly more than the number of snail mail (i.e., paper) letters.
E-mail is full of jargon such as BTW (By The Way), ROTFL (Rolling On The Floor Laughing),
and IMHO (In My Humble Opinion). Many people also use little ASCII symbols called
smileys or emoticons in their e-mail. A few of the more interesting ones are reproduced in
Fig. 7-6.
The first e-mail systems simply consisted of file transfer protocols, with the convention that
the first line of each message (i.e., file) contained the recipient's address. As time went on,
the limitations of this approach became more obvious.
Some of the complaints were as follows:
1. Sending a message to a group of people was inconvenient. Managers often need this
facility to send memos to all their subordinates.
2. Messages had no internal structure, making computer processing difficult. For
example, if a forwarded message was included in the body of another message,
extracting the forwarded part from the received message was difficult.
3. The originator (sender) never knew if a message arrived or not.
4. If someone was planning to be away on business for several weeks and wanted all
incoming e-mail to be handled by his secretary, this was not easy to arrange.
5. The user interface was poorly integrated with the transmission system requiring users
first to edit a file, then leave the editor and invoke the file transfer program.
6. It was not possible to create and send messages containing a mixture of text,
drawings, facsimile, and voice.
RFC 822
Messages consist of a primitive envelope (described in RFC 821), some number of header fields, a blank line, and
then the message body. Each header field (logically) consists of a single line of ASCII text containing the field
name, a colon, and, for most fields, a value. RFC 822 was designed decades ago and does not clearly distinguish the
envelope fields from the header fields.
Message Transfer
The message transfer system is concerned with relaying messages from the originator to
the recipient. The simplest way to do this is to establish a transport connection from the
source machine to the destination machine and then just transfer the message. After
examining how this is normally done, we will examine some situations in which this does not
work and what can be done about them.
POP3
Unfortunately, this solution creates another problem: how does the user get the e-mail from
the ISP's message transfer agent? The solution to this problem is to create another protocol
that allows user transfer agents (on client PCs) to contact the message transfer agent (on
the ISP's machine) and allow e-mail to be copied from the ISP to the user. One such
protocol is POP3 (Post Office Protocol Version 3), which is described in RFC 1939.
POP3 begins when the user starts the mail reader. The mail reader calls up the ISP (unless
there is already a connection) and establishes a TCP connection with the message transfer
agent at port 110. Once the connection has been established, the POP3 protocol goes
through three states in sequence:
1. Authorization.
2. Transactions.
3. Update.
The authorization state deals with having the user log in. The transaction state deals with the user collecting the emails and marking them for deletion from the mailbox. The update state actually causes the e-mails to be deleted.
Delivery Features
Independently of whether POP3 or IMAP is used, many systems provide hooks for additional
processing of incoming e-mail. An especially valuable feature for many e-mail users is the
ability to set up filters. These are rules that are checked when e-mail comes in or when the
user agent is started. Each rule specifies a condition and an action. For example, a rule
could say that any message received from the boss goes to mailbox number 1, any message
from a select group of friends goes to mailbox number 2, and any message containing
certain objectionable words in the Subject line is discarded without comment.
Architectural Overview
From the users' point of view, the Web consists of a vast, worldwide collection of documents
or Web pages, often just called pages for short. Each page may contain links to other
pages anywhere in the world. Users can follow a link by clicking on it, which then takes
them to the page pointed to. This process can be repeated indefinitely. The idea of having
one page point to another, now called hypertext, was invented by a visionary M.I.T.
professor of electrical engineering, Vannevar Bush, in 1945, long before the Internet was
invented.
Pages are viewed with a program called a browser, of which Internet Explorer and
Netscape Navigator are two popular ones. The browser fetches the page requested,
interprets the text and formatting commands on it, and displays the page, properly
formatted, on the screen. An example is given in Fig. 7-18(a). Like many Web pages, this
one starts with a title, contains some information, and ends with the e-mail address of the
page's maintainer. Strings of text that are links to other pages, called hyperlinks, are often
highlighted, by underlining, displaying them in a special color, or both.
Let us now examine the client side of Fig. 7-19 in more detail. In essence, a browser is a
program that can display a Web page and catch mouse clicks to items on the displayed
page. When an item is selected, the browser follows the hyperlink and fetches the page
selected. Therefore, the embedded hyperlink needs a way to name any other page on the
Web. Pages are named using URLs (Uniform Resource Locators). A typical URL is
http://www.abcd.com/products.html
We will explain URLs later in this chapter. For the moment, it is sufficient to know that a URL
has three parts: the name of the protocol (http), the DNS name of the machine where the
page is located (www.abcd.com), and (usually) the name of the file containing the page
(products.html).
When a user clicks on a hyperlink, the browser carries out a series of steps in order to fetch
the page pointed to. Suppose that a user is browsing the Web and finds a link on Internet
telephony that points to ITU's home page, which is http://www.itu.org/home/index.html.
Let us trace the steps that occur when this link is selected.
1. The browser determines the URL (by seeing what was selected).
2. The browser asks DNS for the IP address of www.itu.org.
3. DNS replies with 156.106.192.32.
4. The browser makes a TCP connection to port 80 on 156.106.192.32.
5. It then sends over a request asking for file /home/index.html.
6. The www.itu.org server sends the file /home/index.html.
7. The TCP connection is released.
8. The browser displays all the text in /home/index.html.
9. The browser fetches and displays all images in this file.
give up after seeing the first page, how many look at two pages, and so on.
Cookies have also been misused. In theory, cookies are only supposed to go back to the originating site, but hackers
have exploited numerous bugs in the browsers to capture cookies not intended for them. Since some e-commerce
sites put credit card numbers in cookies, the potential for abuse is clear.
can be seen from Fig. 7-26(a), the head is bracketed by the <head> and </head> tags and
the body is bracketed by the <body> and </body> tags. The strings inside the tags are
called directives. Most HTML tags have this format, that is they use, <something> to mark
the beginning of something and </something> to mark its end. Most browsers have a menu
item VIEW SOURCE or something like that. Selecting this item displays the current page's
HTML source, instead of its formatted output.
Figure 7-26. (a) The HTML for a sample Web page. (b) The formatted
page