computer network introduction - e-wing digital · 2020. 5. 15. · by computer network we mean an...
TRANSCRIPT
COMPILED BY LOKENDRA KUMAR TIWARI
1
COMPUTER NETWORK
Introduction
The concept of Network is not new. In simple terms it means an interconnected set of some
objects. For decades we are familiar with the Radio, Television, railway, Highway, Bank and
other types of networks. In recent years, the network that is making significant impact in our
day-to-day life is the Computer network. By computer network we mean an interconnected set
of autonomous computers. The term autonomous implies that the computers can function
independent of others. However, these computers can exchange information with each other
through the communication network system. Computer networks have emerged as a result of
the convergence of two technologies of this century- Computer and Communication as shown in
Fig. below. The consequence of this revolutionary merger is the emergence of a integrated
system that transmit all types of data and information.
Evolution of Computer Network
COMPILED BY LOKENDRA KUMAR TIWARI
2
DATA COMMUNICATIONS
When we communicate, we are sharing information. This sharing can be local or remote.
Between individuals, local communication usually occurs face to face, while remote
communication takes place over distance. The term telecommunication, which includes
telephony, telegraphy, and television, means communication at a distance (tele is Greek for
"far").
The word data refers to information presented in whatever form is agreed upon by the parties
creating and using the data.
Data communications are the exchange of data between two devices via some form of
transmission medium such as a wire cable. For data communications to occur, the
communicating devices must be part of a communication system made up of a combination of
hardware (physical equipment) and software (programs). The effectiveness of a data
communications system depends on four fundamental characteristics: delivery, accuracy,
timeliness, and jitter.
Delivery. The system must deliver data to the correct destination.
Accuracy. The system must deliver the data accurately.
Timeliness. The system must deliver data in a timely manner.
Jitter. Jitter refers to the variation in the packet arrival time.
COMPONENTS.
A data communications system has five components.
Message. The message is the information (data) to be communicated.
COMPILED BY LOKENDRA KUMAR TIWARI
3
Sender. The sender is the device that sends the data message.
Receiver. The receiver is the device that receives the message.
Transmission medium. The transmission medium is the physical path by which a message
travels from sender to receiver.
Protocol. A protocol is a set of rules that govern data communications.
Data Flow
Communication between two devices can be simplex, half-duplex, or full-duplex
Simplex
In simplex mode, the communication is unidirectional, as on a one-way street. Only one of the two
devices on a link can transmit; the other can only receive.
Keyboards and traditional monitors are examples of simplex devices. The keyboard can only
introduce input; the monitor can only accept output. The simplex mode can use the entire capacity of
the channel to send data in one direction.
COMPILED BY LOKENDRA KUMAR TIWARI
4
Half-Duplex
In half-duplex mode, each station can both transmit and receive, but not at the same time.
When one device is sending, the other can only receive, and vice versa
The half-duplex mode is like a one-lane road with traffic allowed in both directions. When cars
are traveling in one direction, cars going the other way must wait. In a half-duplex transmission,
the entire capacity of a channel is taken over by whichever of the two devices is transmitting at
the time. Walkie-talkies and CB (citizens band) radios are both half-duplex systems.
Full-Duplex
In full-duplex mode(also called duplex), both stations can transmit and receive simultaneously.
One common example of full-duplex communication is the telephone network. When two people
are communicating by a telephone line, both can talk and listen at the same time.
What is a Network?
Tanenbaum defines network as „interconnected collection of autonomous computers‟. Two
computers are said to be interconnected if they are capable of exchanging information. Central
to this definition is the fact that computers are autonomous. This means that no computer on the
network can start, stop, or control another.
Evolution of Networking
Evolution of Networking started way back in 1969 by the development of first network called
ARPANET, which led to the development of Internet.
ARPANET
The seed of today’s Internet were planted in 1969, when US Department of Defense sponsored
a project named ARPANET (acronym for Advance Research Project Agency NETwork). The
goal of this project was to connect computer at different Universities and U.S. defense/defence.
Soon the engineers, scientists, students and researchers who were part of this system, began
exchanging data and messages on it. ARPANET started with handful of computers but it
expanded rapidly. In mid 80’s, another federal agency, the National Science Foundation,
created a new, high-capacity network called NSFnet, which is more capable than ARPANET.
COMPILED BY LOKENDRA KUMAR TIWARI
5
NSFnet allowed only the academic research on its network and not any kind of private business
on it. So many private companies build their own networks, which were later interconnected
along with ARPANET and NSFnet to form Internet.
It was the Inter Networking i.e., linking of these two and some other networks( i.e. ARPANET,
NSFnet and some private networks) that was named Internet.
TYPES OF NETWORK
Local Area Network (LAN)
LAN is usually privately owned and links the devices in a single office, building or campus of up
to few kilometers in size. These are used to share resources (may be hardware or software
resources) and to exchange information. LANs are distinguished from other kinds of networks
by three categories: their size, transmission technology and topology.
LANs are restricted in size, which means that their worst-case transmission
time is bounded and known in advance. Hence this is more reliable as compared to MAN and
WAN. Knowing this bound makes it possible to use certain kinds of design that would not
otherwise be possible. It also simplifies network management.
COMPILED BY LOKENDRA KUMAR TIWARI
6
LAN typically used transmission technology consisting of single cable to which all machines are
connected. Traditional LANs run at speeds of 10 to 100 Mbps (but now much higher speeds can
be achieved). The most common LAN topologies are bus, ring and star.
Metropolitan Area Networks (MAN)
MAN is designed to extend over the entire city. It may be a single network as a cable TV
network or it may be means of connecting a number of LANs into a larger network so that
resources may be shared. For example, a company can use a MAN to connect the LANs in all
its offices in a city. MAN is wholly owned and operated by a private company or may be a
service provided by a public company.
Metropolitan Area Networks (MAN)
Wide Area Network (WAN)
WAN provides long-distance transmission of data, voice, image and information over large
geographical areas that may comprise a country, continent or even the whole world. In contrast
COMPILED BY LOKENDRA KUMAR TIWARI
7
to LANs, WANs may utilize public, leased or private communication devices, usually in
combinations, and can therefore span an unlimited number of miles..
Wide Area Network
Comparison between LAN MAN and WAN
COMPILED BY LOKENDRA KUMAR TIWARI
8
NETWORK TOPOLOGIES
Topology refers to the way in which the network of computers is connected. Each topology is
suited to specific tasks and has its own advantages and disadvantages. The choice of topology
is dependent upon type and number of equipment being used, planned applications and rate of
data transfer required, response time, and cost.
Topology can be defined as the geometrically interconnection pattern by which the stations
(nodes/computers) are connected using suitable transmission media
There are four basic topologies mesh, star, bus, and ring.
Mesh Topology
In this topology each node or station is connected to every other station.The key characteristics
of this topology are as follows:
Key Characteristic
Fully Connected.
Robust-Highly reliable
Not Flexible
Poor expandability
COMPILED BY LOKENDRA KUMAR TIWARI
9
Two nodes are connected by dedicated point-point links between them. So the total number
of links to connect n nodes = n(n-1)/2. Media used for the connection (links) can be twisted
pair, co-axial cable or optical fiber.
Mesh topology is not flexible and has poor expandability as to add new node n links have to
be laid because that new node has to be connected to each of the existing nodes via
dedicated link. For the same reason the cost of cabling will be very high for a larger area.
And due to these reasons this topology is rarely used in practice.
Bus Topology
In Bus Topology, all stations attach through appropriate hardware interfacing known as a
tap, directly to a linear transmission medium, or bus. Full-duplex operation between the
station and the tap allows data to be transmitted onto the bus and received from the bus. A
transmission from any station propagates the length of the medium in both directions and
can be received by all other stations. At each end of the bus there is a terminator, which
absorbs any signal, preventing reflection of signal from the endpoints. If the terminator is not
present, the endpoint acts like a mirror and reflects the signal back causing interference and
other problems.
COMPILED BY LOKENDRA KUMAR TIWARI
10
Key Characteristics of this topology are: Flexible
Expandable
Moderate Reliability
Moderate performance
STAR Topology
In the star topology, each station is directly connected to a common central node as shown in
Fig. below. Typically, each station attaches to a central node, referred to as the star coupler, via
two point-to-point links, one for transmission and one for reception.
Key Features.
High Speed
Very Flexible
Very Reliable
High Maintainability
Ring topology
In 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, i.e., the
ring topology connects workstations in a closed loop. Each terminal is connected to two
other terminals (the next and the previous), with the last terminal being connected to the
first. Data is transmitted around the ring in one direction only; each station passing on the
data to the next station till it reaches its destination.
COMPILED BY LOKENDRA KUMAR TIWARI
11
COMPILED BY LOKENDRA KUMAR TIWARI
12
Synchronous and Asynchronous Transmission
Transmission of digital data through a transmission medium can be performed either in serial or
in parallel mode. In the serial mode, one bit is sent per clock tick, whereas in parallel mode
multiple bits are sent per clock tick. There are two subclasses of transmission for both the serial
and parallel modes
Parallel Transmission
Parallel transmission involves grouping several bits, say n, together and sending all the n bits at
a time. Figure below shows how parallel transmission occurs for n = 8. This can be
accomplishes with the help of eight wires bundled together in the form of a cable with a
connector at each end. Additional wires, such as request (req) and acknowledgement (ack) are
required for asynchronous transmission.
Primary advantage of parallel transmission is higher speed, which is achieved at the expense of
higher cost of cabling. As this is expensive for longer distances, parallel transmission is feasible
only for short distances.
COMPILED BY LOKENDRA KUMAR TIWARI
13
Parallel mode of communication with n = 8
Serial Transmission
In serial transmission one bit follows another, so we need only one communication channel
rather than n to transmit data between two communicating devices
Serial Transmission The advantage of serial over parallel transmission is that with only one communication channel,
serial transmission reduces the cost of transmission over parallel by roughly a factor of n.
There are two basic approaches for serial communication to achieve synchronization of data
transfer between the source-destination pair. These are referred to as – asynchronous and
synchronous. In the first case, data are transmitted in small sizes, say character by character,
to avoid timing problem and make data transfer self-synchronizing. However, it is not very
efficient because of large overhead. To overcome this problem, synchronous mode is used. In
synchronous mode, a block with large number of bits can be sent at a time. However, this
requires tight synchronization between the transmitter and receiver clocks.
COMPILED BY LOKENDRA KUMAR TIWARI
14
Asynchronous Transmission In asynchronous communication, small, fixed-length words (usually 8 bits long) are transferred
without any clock line or clock is recovered from the signal itself. Each word has a start bit
(usually as a 0) before the first data bit of the word and a stop bit (usually as a 1) after the last
data bit of the word, as shown in Fig. below. By this method, each byte is increased in size to at
least 10 bits, of which 8 bits is information and 2 bits or more are signals to the receiver. In
addition, the transmission of each byte may then be followed by a gap of varying duration. This
gap can be represented either by an idle channel or by a stream of additional stop bits.
The start and stop bits and the gap alert the receiver to the beginning and end of each byte and
allow it to synchronize with the data stream. This mechanism is called asynchronous because,
at the byte level, the sender and receiver do not have to be synchronized.
Character or word oriented format for asynchronous mode
Data units sent with variable gap sent in asynchronous mode
Advantages of Asynchronous Communication
Asynchronous transmission is simple, inexpensive and is ideally suited for transmitting small frames
at irregular intervals (e.g., Data entry from a keyboard).
COMPILED BY LOKENDRA KUMAR TIWARI
15
As each individual character is complete in itself, if a character is corrupted during transmission, its
successor and predecessor will not be affected.
This mode of data communication, however, suffers from high overhead incurred in data
transmission. Data must be sent in multiples of the data length of the word, and the two or more bits
of synchronization overhead compared to the relatively short data length causes the effective data
rate to be rather low. For example, 11 bits are required to transmit 8 bits of data. In other words, baud
rate (number of signal elements) is higher than data rate.
Synchronous Transmission In synchronous communication the whole block of data bits is transferred at once, instead of
one character at a time. Here, transmission begins at a predetermined regular time instant. A
sync signal is used to tell the receiving station that a new frame is arriving and to synchronize
the receiving station.
Sync signals; generally utilize a bit pattern that cannot appear elsewhere in the messages,
ensuring that they will always be distinct and easy for the receiver to recognise. As the
transmitter and receiver remain in synchronization for the duration of the transmission, frames
can be of longer length.
The transmitter uses an algorithm to calculate a CRC value that summarizes the entire value of
data bits. This CRC value is appended to the data frame. The receiver uses the same algorithm,
recalculates the CRC and compares the CRC in the frame to the value that it has calculated. If
these values match then, it is sure that the frame was transmitted without error.
COMPILED BY LOKENDRA KUMAR TIWARI
16
The advantage of synchronous transmission is speed. With no extra bits or gaps to introduce at
the sending end and remove at the receiving end, and, by extension, with fewer bits to move
across the link, synchronous transmission is faster than asynchronous transmission.
Synchronous transmission is more useful for high-speed applications such as the transmission
of data from one computer to another.
COMPILED BY LOKENDRA KUMAR TIWARI
17
TRANSMISSION MEDIA
Transmission media can be defined as physical path between transmitter and receiver in a data
transmission system. And it may be classified into two types
Guided: Transmission capacity depends critically on the medium, the length, and whether the
medium is point-to-point or multipoint (e.g. LAN). Examples are co-axial cable, twisted pair, and
optical fiber.
Unguided: provides a means for transmitting electro-magnetic signals. Example wireless
transmission.
Guided transmission media Twisted-Pair Cable
One of the oldest and still most common transmission media is twisted pair. A twisted pair
consists of two insulated copper wires, typically about 1 mm thick. The wires are twisted
together in a helical form, just like a DNA molecule. Twisting is done because two parallel wires
constitute a fine antenna. When the wires are twisted, the waves from different twists cancel
COMPILED BY LOKENDRA KUMAR TIWARI
18
out, so the wire radiates less effectively (Twisting decreases the cross-talk interference between
adjacent pairs in a cable).
Characteristics:
Twisted-pair can be used for both analog and digital communication. The data rate that can be
supported over a twisted-pair is inversely proportional to the square of the line length. Maximum
transmission distance of 1 Km can be achieved for data rates up to 1 Mb/s. For analog voice
signals, amplifiers are required about every 6 Km and for digital signals, repeaters are needed
for about 2 Km. To reduce interference, the twisted pair can be shielded with metallic braid. This
type of wire is known as Shielded Twisted-Pair (STP) and the other form is known as
Unshielded Twisted-Pair (UTP).
The most common application of the twisted pair is the telephone system. Nearly all telephones
are connected to the telephone company (telco) office by a twisted pair.
Twisted pair Cable.
COAXIAL CABLE
Coaxial cable (known to its many friends as just ''coax'' and pronounced ''co-ax''), has better
shielding than twisted pairs, so it can span longer distances at higher speeds.
Coaxial cable (or coax) carries signals of higher frequency ranges than those in twisted pair
cable, in part because the two media are constructed quite differently instead of having two
wires, a coaxial cable consists of a stiff copper wire as the core, surrounded by an insulating
material. The insulator is encased by a cylindrical conductor, often as a closely-woven braided
mesh. The outer conductor is covered in a protective plastic sheath.
COMPILED BY LOKENDRA KUMAR TIWARI
19
Coaxial Cable Standards
Coaxial cables are categorized by their radio government (RG) ratings. Each RG number
denotes a unique set of physical specifications, including the wire gauge of the inner conductor,
the thickness and type of the inner insulator, the construction of the shield, and the size and
type of the outer casing
Categories of Coaxial cable.
Advantages.
The data transmission characteristics of coaxial cables are considerably better than
those of twisted-pair cables.
The coaxial cables can be used for broadband transmission i.e., several channels can
be transmitted simultaneously (as with cable TV).
Offer higher bandwith.
Disadvantages
Expensive compared to twisted pair cables.
Coaxial cables are not compatible with twisted pair cables.
COMPILED BY LOKENDRA KUMAR TIWARI
20
FIBRE OPTICS
In fiber optic technology, the medium consists of a hair-width strand of silicon or glass, and the
signal consists of pulses of light. For instance, a pulse of light means ``1'', lack of pulse means
``0''. It has a cylindrical shape and consists of three concentric sections: the core, the cladding,
and the jacket.
(b)
The core, innermost section consists of a single solid dielectric cylinder of diameter d1 and of
refractive index n1. The core is surrounded by a solid dielectric cladding of refractive index n2
that is less than n1. As a consequence, the light is propagated through multiple total internal
reflection. The core material is usually made of ultra pure fused silica or glass and the cladding
COMPILED BY LOKENDRA KUMAR TIWARI
21
is either made of glass or plastic. The cladding is surrounded by a jacket made of plastic. The
jacket is used to protect against moisture, abrasion, crushing and other environmental hazards.
Three components are required:
1. Fiber medium: Current technology carries light pulses for tremendous distances (e.g., 100s
of kilometers) with virtually no signal loss.
2. Light source: typically a Light Emitting Diode (LED) or laser diode. Running current through
the material generates a pulse of light.
3. A photo diode light detector, which converts light pulses into electrical signals.
Advantages:
Very high data rate, low error rate. 1000 Mbps (1 Gbps) over distances of kilometers
common. Error rates are so low they are almost negligible.
Difficult to tap, which makes it hard for unauthorized taps as well. This is responsible for
higher reliability of this medium.
Not susceptible to electrical interference (lightning) or corrosion (rust).
Greater repeater distance than coax.
Disadvantages:
Difficult to tap. It really is point-to-point technology. In contrast, tapping into coax is trivial.
No special training or expensive tools or parts are required.
One-way channel. Two fibers needed to get full duplex (both ways) communication.
COMPILED BY LOKENDRA KUMAR TIWARI
22
Unguided Transmission
Unguided transmission is used when running a physical cable (either fiber or copper) between
two end points is not possible. For example, running wires between buildings is probably not
legal if the building is separated by a public street.
Radio Waves.
Although there is no clear-cut demarcation between radio waves and microwaves,
electromagnetic waves ranging in frequencies between 3 kHz and 1 GHz are normally called
radio waves; waves ranging in frequencies between 1 and 300 GHz are called microwaves.
However, the behavior of the waves, rather than the frequencies, is a better criterion for
classification.
Radio waves, for the most part, are omnidirectional. When an antenna transmits radio waves,
they are propagated in all directions. This means that the sending and receiving antennas do
not have to be aligned. A sending antenna sends waves that can be received by any receiving
antenna.
Applications
The omnidirectional characteristics of radio waves make them useful for multicasting, in which
there is one sender but many receivers. AM and FM radio, television, maritime radio, cordless
phones, and paging are examples of multicasting.
COMPILED BY LOKENDRA KUMAR TIWARI
23
Radio waves
Microwaves
Electromagnetic waves having frequencies between I and 300 GHz are called microwaves.
Microwaves are unidirectional. When an antenna transmits microwave waves, they can be
narrowly focused. This means that the sending and receiving antennas need to be aligned. The
unidirectional property has an obvious advantage. A pair of antennas (mounted on tower) can be
aligned without interfering with another pair of aligned antennas.
The higher the tower the greater the range. With a 100-m high tower, distance of 100 km
between towers is feasible. The microwave transmission is a line of sight transmission.
COMPILED BY LOKENDRA KUMAR TIWARI
24
SWITCHING TECHNIQUES
When there are many devices, it is necessary to develop suitable mechanism for
communication between any two devices. One alternative is to establish point-to-point
communication between each pair of devices using mesh topology. However, mesh topology
is impractical for large number of devices, because the number of links increases exponentially
(n(n-1)/2, where n is the number of devices) with the number of devices. A better alternative is
to use switching techniques leading to switched communication network. In the switched
network methodology, the network consists of a set of interconnected nodes, among which
information is transmitted from source to destination via different routes, which is controlled by
the switching mechanism. The end devices that wish to communicate with each other are called
stations. The switching devices are called nodes. Some nodes connect to other nodes and
some are to connected to some stations. Key features of a switched communication network are
given below:
Network Topology is not regular. Uses FDM or TDM for node-to-node communication.
There exist multiple paths between a source-destination pair for better network reliability.
The switching nodes are not concerned with the contents of data.
Their purpose is to provide a switching facility that will move data from node to node until
they reach the destination.
Basic model of a switched communication network
COMPILED BY LOKENDRA KUMAR TIWARI
25
The switching performed by different nodes can be categorized into the following three types:
Circuit Switching
Packet Switching
Message Switching
Circuit switching Technique
Communication via circuit switching implies that there is a dedicated communication path
between the two stations. The path is a connected through a sequence of links between
network nodes. On each physical link, a logical channel is dedicated to the connection. Circuit
switching is commonly used technique in telephony, where the caller sends a special message
with the address of the callee (i.e. by dialling a number) to state its destination. It involved the
following three distinct steps see fig.
Circuit Establishment: To establish an end-to-end connection before any transfer of data. Some
segments of the circuit may be a dedicated link, while some other segments may be shared.
Data transfer:
Transfer data is from the source to the destination.
The data may be analog or digital, depending on the nature of the network.
The connection is generally full-duplex.
Circuit disconnect: Terminate connection at the end of data transfer.
Signals must be propagated to deallocate the dedicated resources.
Circuit Switching technique
COMPILED BY LOKENDRA KUMAR TIWARI
26
Thus the actual physical electrical path or circuit between the source and destination host must
be established before the message is transmitted. This connection, once established, remains
exclusive and continuous for the complete duration of information exchange and the circuit
becomes disconnected only when the source wants to do so.
Public switched telephone network (PSTN) is an example of circuit-switched network.
Q-2. Mention the key advantages and disadvantages of circuit switching technique. Ans: Advantages: After path is established, data communication without delay. Very suitable for continuous traffic. It establishes a dedicated path. No overhead after call setup. it is transparent and data passes in order. Disadvantages: Provide initial delay for setting up the call. Inefficient for bursty traffic. Data rate should be same because of fixed bandwidth. When load increases, some calls may be blocked. Q-3. Why data communication through circuit switching is not efficient? Ans: In data communication, traffic between terminal and server are not continuous. Sometimes more data may come or sometimes there is no data at all. Circuit switching is not efficient because of its fixed bandwidth.
Message Switching In this switching method, a different strategy is used, where instead of establishing a dedicated
physical line between the sender and the receiver, the message is sent to the nearest directly
connected switching node. This node stores the message, checks for errors, selects the best
available route and forwards the message to the next intermediate node.
COMPILED BY LOKENDRA KUMAR TIWARI
27
The line becomes free again for other messages, while the process is being continued in some
other nodes. Due to the mode of action, this method is also known as store-and-forward
technology where the message hops from node to node to its final destination. Each node
stores the full message, checks for errors and forwards it.
In this switching technique, more devices can share the network bandwidth, as compared with
circuit switching technique. Temporary storage of message reduces traffic congestion to some
extent. Higher priority can be given to urgent messages, so that the low priority messages are
delayed while the urgent ones are forwarded faster. Through broadcast addresses one
message can be sent to several users. Last of all, since the destination host need not be active
when the message is sent, message switching techniques improve global communications.
However, since the message blocks may be quite large in size, considerable amount of storage
space is required at each node to buffer the messages. A message might occupy the buffers for
minutes, thus blocking the internodal traffic.
COMPILED BY LOKENDRA KUMAR TIWARI
28
Example: Telegram, not use any more.
Packet Switching
The basic approach is not much different from message switching. It is also based on the same
‘store-and-forward’ approach. However, to overcome the limitations of message switching,
messages are divided into subsets of equal length called packets. This approach was
developed for long-distance data communication (1970) and it has evolved over time. In packet
switching approach, data are transmitted in short packets (few Kbytes). A long message is
broken up into a series of packets as shown in Fig below. Every packet contains some control
information in its header, which is required for routing and other purposes.
A message is divided into a number of equal length short packets
Packet-switching networks place a tight upper limit on block size, allowing packets to be
buffered in router main memory instead of on disk. By making sure that no user can monopolize
any transmission line very long (milliseconds), packet-switching networks are well suited for
handling interactive traffic.
Main difference between Packet switching and Circuit Switching is that the communication lines
are not dedicated to passing messages from the source to the destination. In Packet Switching,
different messages (and even different packets) can pass through different routes, and when
there is a "dead time" in the communication between the source and the destination, the lines
can be used by other sources.
COMPILED BY LOKENDRA KUMAR TIWARI
29
COMPILED BY LOKENDRA KUMAR TIWARI
30
BASIC CONCEPT OF LAYERING
Network architectures define the standards and techniques for designing and building
communication systems for computers and other devices. In the past, vendors developed their
own architectures and required that other vendors conform to this architecture if they wanted to
develop compatible hardware and software. There are proprietary network architectures such as
IBM's SNA (Systems Network Architecture) and there are open architectures like the OSI (Open
Systems Interconnection) model defined by the International Organization for Standardization.
The previous strategy, where the computer network is designed with the hardware as the main
concern and software is afterthought, no longer works. Network software is now highly
structured.
To reduce the design complexity, most of the networks are organized as a series of layers or
levels, each one build upon one below it. The basic idea of a layered architecture is to divide the
design into small pieces. Each layer adds to the services provided by the lower layers in such a
manner that the highest layer is provided a full set of services to manage communications and
run the applications. The benefits of the layered models are modularity and clear interfaces, i.e.
open architecture and comparability between the different providers' components.
Open System Interconnection Reference Model
The Open System Interconnection (OSI) reference model describes how information from a
software application in one computer moves through a network medium to a software
application in another computer. The OSI reference model is a conceptual model composed of
seven layers, each specifying particular network functions. The model was developed by the
International Standards Organization (ISO) in 1984, and it is now considered the primary
architectural model for inter-computer communications.
The model is called the ISO OSI (Open Systems Interconnection) Reference Model because it
deals with connecting open systems—that is, systems that are open for communication with
other systems.
The OSI Reference Model includes seven layers:
The seven layers of the OSI reference model can be divided into two categories: upper layers
and lower layers.
The upper layers of the OSI model deal with application issues and generally are implemented
only in software.
COMPILED BY LOKENDRA KUMAR TIWARI
31
Functions of the OSI Layers.
The Physical Layer
The physical layer is concerned with transmission of raw bits over a communication channel. It
specifies the mechanical, electrical and procedural network interface specifications and the
physical transmission of bit streams over a transmission medium connecting two pieces of
communication equipment. In simple terms, the physical layer decides the following:
Number of pins and functions of each pin of the network connector (Mechanical)
Signal Level, Data rate (Electrical)
Whether simultaneous transmission in both directions
Establishing and breaking of connection
Deals with physical transmission
The physical layer is responsible for movements of individual bits from one hop (node)
to the next.
COMPILED BY LOKENDRA KUMAR TIWARI
32
The Data Link Layer
The goal of the data link layer is to provide reliable, efficient communication between adjacent
machines connected by a single communication channel. Specifically:
Group the physical layer bit stream into units called frames. Note that frames are nothing more
than ``packets'' or ``messages''. By convention, we shall use the term ``frames’’ when
discussing DLL packets. Its called FRAMING
Error control. The data link layer adds reliability to the physical layer by adding mechanisms to
detect and retransmit damaged or lost frames. It also uses a mechanism to recognize duplicate
frames. Error control is normally achieved through a trailer added to the end of the frame.
Flow control prevents a fast sender from overwhelming a slower receiver. For example, a
supercomputer can easily generate data faster than a PC can consume it.
Access control. When two or more devices are connected to the same link, data link layer
protocols are necessary to determine which device has control over the link at any given time.
Framing, Flow Control, Error Control and Access Control are main function of DLL
Network Layer
The basic purpose of the network layer is to provide an end-to-end communication capability in
contrast to machine-to-machine communication provided by the data link layer. This end-to-end
is performed using two basic approaches known as connection-oriented or connectionless
network-layer services.
The network layer establishes the route between the sending and receiving stations. The unit of
data at the network layer is called a packet.
Main Functions of Network Layer
Routing
Congestion and deadlock control
Internetworking (A path may traverse different networking technologies)
The network layer is responsible for translating logical addresses, or names, into physical
addresses.
The main device found at the Network layer is a router.
COMPILED BY LOKENDRA KUMAR TIWARI
33
NOTE: If two systems are connected to the same link, there is usually no need for a network
layer. However, if the two systems are attached to different networks (links) with connecting
devices between the networks (links), there is often a need for the network layer to accomplish
source-to-destination delivery.
The network layer is responsible for the delivery of individual packets from the source
host to the destination host. (Routing)
Transport Layer
The basic function of the transport layer is to accept data from above, 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. it ensures that data is successfully sent and received between two computers.
The lower data link layer (layer 2) is only responsible for delivering packets from one node to
another. Thus, if a packet gets lost in a router somewhere in the enterprise Internet, the
transport layer will detect that. It ensures that if a 12MB file is sent, the full 12MB is received.
Main Functions of Transport Layers are
Service-point addressing. Computers often run several programs at the same time. For this
reason, source-to-destination delivery means delivery not only from one computer to the next
but also from a specific process (running program) on one computer to a specific process
(running program) on the other. The transport layer header must therefore include a type of
address called a service-point address (or port address). The network layer gets each packet
to the correct computer; the transport layer gets the entire message to the correct process on
that computer.
Segmentation and reassembly
Connection control. The transport layer can be either connectionless or connection oriented.
Flow control. Like the data link layer, the transport layer is responsible for flow control.
However, flow control at this layer is performed end to end rather than across a single link.
Error control. Like the data link layer, the transport layer is responsible for error control.
However, error control at this layer is performed process-to process rather than across a
single link. The sending transport layer makes sure that the entire message arrives at the
receiving transport layer without error (damage, loss, or duplication). Error correction is
usually achieved through retransmission.
The transport layer is responsible for the delivery of a message from one process to
another.
COMPILED BY LOKENDRA KUMAR TIWARI
34
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 at the same time), and synchronization (check pointing long transmissions to allow
them to continue from where they were after a crash).
The session layer is responsible for dialog control and synchronization
Presentation Layer
This layer is concerned with Syntax and Semantics of the information transmitted, unlike other
layers, which are interested in moving data reliably from one machine to other. Few of the
services that Presentation layer provides are:
Translation: Translates the data in the bits/ so that it may be transferred using suitable
transmission medium.
Encryption. To carry sensitive information, a system must be able to ensure privacy.
Encryption means that the sender transforms the original information to another form and
sends the resulting message out over the network. Decryption reverses the original process to
transform the message back to its original form.
Compression. Data compression reduces the number of bits contained in the information. Data
compression becomes particularly important in the transmission of multimedia such as text,
audio, and video.
The presentation layer is responsible for translation, compression, and encryption.
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 using HTTP. The server then sends the page back. Other application
protocols are used for file transfer, electronic mail etc..
COMPILED BY LOKENDRA KUMAR TIWARI
35
The application layer is responsible for providing services to the user. i.e
SMTP,TELNET,HTTP
COMPILED BY LOKENDRA KUMAR TIWARI
36
Introduction of Repeaters, Bridges, Switch and Routers
LANs do not normally operate in isolation. They are connected to one another or to the
Internet. To connect LANs, or segments of LANs, we use connecting devices.
Connecting devices can operate in different layers of the Internet model.
Repeaters
A repeater is a device that operates only in the physical layer. Signals that carry
information within a network can travel a fixed distance before attenuation endangers
the integrity of the data. A repeater receives a signal and, before it becomes too weak
or corrupted, regenerates the original bit pattern. The repeater then sends the refreshed
signal. A repeater can extend the physical length of a LAN.
A repeater does not actually connect two LANs; it connects two segments of the same
LAN. The segments connected are still part of one single LAN.
Important features of a repeater are as follows:
A repeater connects different segments of a LAN A repeater forwards every frame it receives A repeater is a regenerator, not an amplifier It can be used to create a single extended LAN
COMPILED BY LOKENDRA KUMAR TIWARI
37
Bridges
The device that can be used to interconnect two separate LANs is known as a bridge. It is commonly used to connect two similar or dissimilar LANs A bridge operates in both the physical and the data link layer. As a physical layer device, it regenerates the signal it receives. As a data link layer device, the bridge can check the physical (MAC) addresses (source and destination) contained in the frame. A bridge has filtering capability. It can check the destination address of a frame and decide if the frame should be forwarded or dropped. If the frame is to be forwarded, the decision must specify the port. A bridge has a table that maps addresses to ports. As shown below.
Important features of Bridge. A bridge operates both in physical and data-link layer A bridge uses a table for filtering/routing A bridge does not change the physical (MAC) addresses in a frame
COMPILED BY LOKENDRA KUMAR TIWARI
38
Information flow through Bridge
Routers
A router is a three-layer device that routes packets based on their logical addresses (host-to-
host addressing). A router normally connects LANs and WANs in the Internet and has a routing
table that is used for making decisions about the route. The routing tables are normally dynamic
and are updated using routing protocols.
Routers connecting independent LANs and WANs
COMPILED BY LOKENDRA KUMAR TIWARI
39
A router differs from bridge in a way that former uses logical addresses and the latter uses
physical address.
Steps Data is send to router The router determines the destination address (using routing table) and forward it to the next step in the journey and so on….. The data reached its destination
Switches Switches are similar to bridges in that both route on frame addresses. In fact, many people uses
the terms interchangeably. The main difference is that a switch is most often used to connect
individual computers, as shown in fig below. As a consequence, when host A wants to send a
frame to host B, the bridge gets the frame but just discards it. In contrast, the switch must
actively forward the frame from A to B because there is no other way for the frame to get there.
Since each switch port usually goes to a single computer, switches must have space for many
more line cards than do bridges intended to connect only LANs. Each line card provides buffer
space for frames arriving on its ports. Since each port is its own collision domain, switches
never lose frames to collisions. However, if frames come in faster than they can be
retransmitted, the switch may run out of buffer space and have to start discarding frames.
COMPILED BY LOKENDRA KUMAR TIWARI
40
TCP / IP
TCP / IP is an abbreviation for Transmission Control Protocol / Internet Protocol, is an industry-
standard protocol suite for wide area networks (WANs) developed in the 1970s and 1980s by
US DOD. TCP / IP is a routable protocol that is suitable for connecting dissimilar systems
(Microsoft Windows and UNIX) in heterogeneous networks, and it is the protocol of world wide
network known as the internet.
TCP/IP is composed of two major parts: TCP (Transmission Control Protocol) at the transport
layer and IP (Internet Protocol) at the network layer. TCP is a connection-oriented protocol that
passes its data to IP, which is a connectionless one. TCP sets up a connection at both ends and
guarantees reliable delivery of the full message sent. TCP tests for errors and requests
retransmission if necessary, because IP does not.
An alternative protocol to TCP within the TCP/IP suite is UDP (User Datagram Protocol), which
does not guarantee delivery. Like IP, it is also connectionless, but very useful for real-time voice
and video, where it doesn’t matter if a few packets get lost
The TCP/IP reference model.
COMPILED BY LOKENDRA KUMAR TIWARI
41
Physical and Data Link Layer (Host-to-Network Layer)
At the physical and data link layers, TCPIIP does not define any specific protocol. It supports all
the standard and proprietary protocols. A network in a TCPIIP internetwork can be a local-area
network or a wide-area network.
Network Layer
At the network layer (or, more accurately, the internetwork layer), TCP/IP supports the
Internetworking Protocol. IP, in turn, uses four supporting protocols: ARP, RARP, ICMP, and
IGMP.
Transport Layer
Traditionally the transport layer was represented in TCP/IP by two protocols: TCP and UDP. IP
is a host-to-host protocol, meaning that it can deliver a packet from one physical device to
another. UDP and TCP are transport level protocols responsible for delivery of a message from
a process (running program) to another process.
Application Layer
The application layer in TCP/IP is equivalent to the combined session, presentation, and
application layers in the OSI model. Many protocols are defined at this layer eg. Telnet, FTP,
SMTP etc.
ADDRESSING
Four levels of addresses are used in an internet employing the TCP/IP protocols: physical (link)
addresses, logical (IP) addresses, port addresses, and specific addresses.
COMPILED BY LOKENDRA KUMAR TIWARI
42
Specific Address
Port Address
Logical Address
Physical Address
Classful IP Address/ IP AddressIPv4 Addresses (IP Addresses)
An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a
device (for example, a computer or a router) to the Internet.
IPv4 addresses are unique. They are unique in the sense that each address defines one, and
only one, connection to the Internet. Two devices on the Internet can never have the same
address at the same time.
Address Space
A protocol such as IPv4 that defines addresses has an address space. An address space is the
total number of addresses used by the protocol. If a protocol uses N bits to define an address,
the address space is 2N because each bit can have two different values (0 or 1) and N bits can
have 2N values.
IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296 (more
than 4 billion). This means that, theoretically, if there were no restrictions, more than 4 billion
devices could be connected to the Internet.
COMPILED BY LOKENDRA KUMAR TIWARI
43
Examples
Change the following IPv4 addresses from binary notation to dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
Solution
We replace each group of 8 bits with its equivalent decimal number (see Appendix B) and add
dots for separation.
a. 129.11.11.239
b. 193.131.27.255
Find the class of each address.
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111
Solution
a. The first bit is O. This is a class A address.
b. The first 2 bits are 1; the third bit is O. This is a class C address.
COMPILED BY LOKENDRA KUMAR TIWARI
44
c. The first byte is 14 (between 0 and 127); the class is A.
d. The first byte is 252 (between 240 and 255); the class is E.
TCP (Transmission Control Protocol)
TCP is an internet protocol suite’s main transport layer protocol. It also provides addressing
services at the network layer.
TCP works in conjunction with IP to move packets through the internetwork. TCP assigns a
connection ID (port to each virtual circuit. It also provides message fragmentation and
reassemble using sequence numbering. Error checking is enhanced through TCP
acknowledgement.
TCP Three way handshake
COMPILED BY LOKENDRA KUMAR TIWARI
45
UDP (User Datagram Protocol)
The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol. It
does not add anything to the services of IP except to provide process-to process communication
instead of host-to-host communication. Also, it performs very limited error checking.
If UDP is so powerless, why would a process want to use it? With the disadvantages come
some advantages. UDP is a very simple protocol using a minimum of overhead. If a process
wants to send a small message and does not care much about reliability, it can use UDP.
Sending a small message by using UDP takes much less interaction between the sender and
receiver than using TCP.
Example
An application that uses UDP this way is DNS (the Domain Name System), In brief, a program
that needs to look up the IP address of some host name, for example, www.cs.berkeley.edu,
can send a UDP packet containing the host name to a DNS server. The server replies with a
UDP packet containing the host's IP address. No setup is needed in advance and no release is
needed afterward. Just two messages go over the network
COMPILED BY LOKENDRA KUMAR TIWARI
46
INTERNET
The Internet is the largest network the world has ever seen. Thousands of millions of people use
it everyday. Technically the -Internet can be defined as a Transmission Control Protocol/Internet
Protocol (TCP/IP)-bound network of networks using standard protocols for communication.
Protocols are the rules that all the networks use to understand each other.
Client-Server Architecture
The Client-Server Architecture is based on the principle where the client computer requests for
some data and the data are sent by the server computer through the network. The concept of
client/server computing has particular importance on the Internet because most of the
programmes are built using this design. A server is a programme that “serves” (or delivers)
something, usually information, to a client programme. A server usually runs on a computer that
is connected to a network. The size of that network is not important in the client/server concept -
it could be a small local area network or the global Internet.
The advantage of this type of design is that a server has to store the information in one format:
which could be accessed by various clients working on multiple platforms and located at
different places. In the client/server model, multiple client programmes share the services of a
common server programme. Both client programmes and server programmes are often part of a
larger programme or application.
In the case of the Internet, the Web browser is a client programme that requests services from a
Web server. The server is designed to interact with client programmes so that people using the
system can determine whether the information they want is there, and if so, have it sent.
COMPILED BY LOKENDRA KUMAR TIWARI
47
Internet Addressing
Each host computer on the Internet has its own unique address. To identify a host on the Internet,
three addressing systems have been evolved: A numerical system called IP addressing, a
hierarchical naming system called the Domain Name System, and an addressing system called
URLs, which are used for identifying sites on the web.
IP address : Each computer has a unique numerical address, such as 194.170.32.23
Domain name : Each computer must have a unique name, such as www.hct.ac.ae
Uniform Resource Locator : Address of file(s) to be accessible from a host computer
Domain Name System
An Internet service that translates domain names into IP addresses. Because domain names
are alphabetic, they're easier to remember. The Internet however, is really based on IP
addresses. Every time you use a domain name, therefore, a DNS service must translate the
name into the corresponding IP address. For example, the domain name www.example.com
must translate to 198.105.232.4.
COMPILED BY LOKENDRA KUMAR TIWARI
48
So a “System which maps domain names (e.g. www.google.co.in) to their corresponding
IP‟s (e.g. 202.101.1.123) is known as domain name system.”
The essence of DNS is the invention of a hierarchical, domain-based naming scheme and a
distributed database system for implementing this naming scheme. It is primarily used for
mapping host names and e-mail destinations to IP addresses but can also be used for other
purposes. DNS is defined in RFCs 1034 and 1035.
Very briefly, the way DNS is used is as follows. To map a name onto an IP address, an
application program calls a library procedure called the resolver ( eg. gethostbyname,), passing
it the name as a parameter. The resolver sends a UDP packet to a local DNS server, which then
looks up the name and returns the IP address to the resolver, which then returns it to the caller.
Armed with the IP address, the program can then establish a TCP connection with the
destination or send it UDP packets.
The DNS Name Space
The Internet is divided into over 200 top-level domains, where each domain covers many hosts.
Each domain is partitioned into subdomains, and these are further partitioned, and so on. All
these domains can be represented by a tree, as shown in fig below. The leaves of the tree
represent domains that have no subdomains (but do contain machines, of course). A leaf domain
may contain a single host, or it may represent a company and contain thousands of hosts.
COMPILED BY LOKENDRA KUMAR TIWARI
49
The top-level domains come in two flavors: generic and countries. The original generic domains
were com (commercial), edu (educational institutions), gov (the U.S. Federal Government), int
(certain international organizations), mil (the U.S. armed forces), net (network providers), and
org (nonprofit organizations).
The country domains include one entry for every country, as defined in ISO 3166. E.g. .in(India),
.us (United State). Etc.
In November 2000, ICANN approved four new, general-purpose, top-level domains, namely, biz
(businesses), info (information), name (people's names), and pro (professions, such as doctors
and lawyers). In addition, three more specialized top-level domains were introduced at the
request of certain industries. These are aero (aerospace industry), coop (co-operatives), and
museum (museums). Other top-level domains will be added in the future.
COMPILED BY LOKENDRA KUMAR TIWARI
50
INTRANET INTERNET & EXTRANET INTRANET
An intranet is a private computer network that uses Internet protocols, network connectivity to
securely share part of an organization's information or operations with its employees.
Sometimes the term refers only to the most visible service, the internal website. The same
concepts and technologies of the Internet such as clients and servers running on the Internet
protocol suite are used to build an intranet. HTTP and other Internet protocols are commonly
used as well, such as FTP. There is often an attempt to use Internet technologies to provide
new interfaces with corporate "legacy" data and information systems.
Briefly, an intranet can be understood as "a private version of the Internet," or as a version of
the Internet confined to an organization.
INTERNET
The Internet is a worldwide, publicly accessible series of interconnected computer networks that
transmit data by packet switching using the standard Internet Protocol (IP). It is a "network of
networks" that consists of millions of smaller domestic, academic, business, and government
networks, which together carry various information and services, such as electronic mail, online
chat, file transfer, and the interlinked Web pages and other documents of the World Wide Web.
EXTRANET
The Extranet is a portion of an organisations Intranet that is made accessible to authorized
outside users without full access to entire organisations' intranet.