Computer Networks Notes 3 - TutorialsDuniya PDF
Computer Networks Notes 3 - TutorialsDuniya PDF
COM
Computer Networks
Notes
Download TutorialsDuniya
App from PlayStore
DU Programs: https://www.tutorialsduniya.com/programs
TutorialsDuniya App: http://bit.ly/TutorialsDuniyaApp
C++ Tutorial: https://www.tutorialsduniya.com/cplusplus
Java Tutorial: https://www.tutorialsduniya.com/java
JavaScript Tutorial: https://www.tutorialsduniya.com/javascript
Python Tutorial: https://www.tutorialsduniya.com/python
Kotlin Tutorial: https://www.tutorialsduniya.com/kotlin
JSP Tutorial: https://www.tutorialsduniya.com/jsp
Visit TUTORIALSDUNIYA.COM for Notes, Tutorials, Programs, Question Papers
UNIT -I
Introduction to Computer Networks
1.1 Data Communication: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.
m
Computer Network: A computer network is a set of computers connected together for the
purpose of sharing resources. The most common resource shared today is connection to the
Internet. Other shared resources can include a printer or a file server. The Internet itself can
co
be considered a computer network.
1.1.1 Components:
a.
A data communications system has five components.
iy
un
1. Message. The message is the information (data) to be communicated. Popular forms of
sD
3. Receiver. The receiver is the device that receives the message. It can be a computer,
workstation, telephone handset, television, and so on.
ri
4. Transmission medium. The transmission medium is the physical path by which a message
travels from sender to receiver. Some examples of transmission media include twisted-pair wire,
to
agreement between the communicating devices. Without a protocol, two devices may be
connected but not communicating, just as a person speaking French cannot be understood by a
person who speaks only Japanese.
Information today comes in different forms such as text, numbers, images, audio, and video.
Text:
In data communications, text is represented as a bit pattern, a sequence of bits (Os or Is).
Different sets of bit patterns have been designed to represent text symbols. Each set is called a
m
code, and the process of representing symbols is called coding. Today, the prevalent coding
system is called Unicode, which uses 32 bits to represent a symbol or character used in any
co
language in the world. The American Standard Code for Information Interchange (ASCII),
developed some decades ago in the United States, now constitutes the first 127 characters in
Unicode and is also referred to as Basic Latin.
a.
Numbers:
iy
Numbers are also represented by bit patterns. However, a code such as ASCII is not used
to represent numbers; the number is directly converted to a binary number to simplify
mathematical operations. Appendix B discusses several different numbering systems.
un
Images:
Images are also represented by bit patterns. In its simplest form, an image is composed of
sD
a matrix of pixels (picture elements), where each pixel is a small dot. The size of the pixel
depends on the resolution. For example, an image can be divided into 1000 pixels or 10,000
pixels. In the second case, there is a better representation of the image (better resolution), but
al
more memory is needed to store the image. After an image is divided into pixels, each pixel is
assigned a bit pattern. The size and the value of the pattern depend on the image. For an image
ri
made of only blackand- white dots (e.g., a chessboard), a I-bit pattern is enough to represent a
pixel. If an image is not made of pure white and pure black pixels, you can increase the size of
to
the bit pattern to include gray scale. For example, to show four levels of gray scale, you can use
2-bit patterns. A black pixel can be represented by 00, a dark gray pixel by 01, a light gray pixel
Tu
by 10, and a white pixel by 11. There are several methods to represent color images. One method
is called RGB, so called because each color is made of a combination of three primary colors: red,
green, and blue. The intensity of each color is measured, and a bit pattern is assigned to it.
Another method is called YCM, in which a color is made of a combination of three other primary
colors: yellow, cyan, and magenta.
Audio:
m
Video refers to the recording or broadcasting of a picture or movie. Video can either be
produced as a continuous entity (e.g., by a TV camera), or it can be a combination of images,
co
each a discrete entity, arranged to convey the idea of motion. Again we can change video to a
digital or an analog signal.
a.
1.1.3 Data Flow
Communication between two devices can be simplex, half-duplex, or full-duplex as shown in
iy
Figure un
sD
al
ri
to
Tu
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 (see Figure a). 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
m
to send data in one direction.
Half-Duplex:
co
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.
a.
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
iy
transmitting at the time. Walkie-talkies and CB (citizens band) radios are both half-duplex
systems.
un
The half-duplex mode is used in cases where there is no need for communication in both
directions at the same time; the entire capacity of the channel can be utilized for each direction.
Full-Duplex:
sD
In full-duplex both stations can transmit and receive simultaneously (see Figure c). The
full-duplex mode is like a tW<D-way street with traffic flowing in both directions at the same
time. In full-duplex mode, si~nals going in one direction share the capacity of the link: with
al
signals going in the other din~c~on. This sharing can occur in two ways: Either the link must
contain two physically separate t:nmsmissiIDn paths, one for sending and the other for receiving;
ri
or the capacity of the ch:arillilel is divided between signals traveling in both directions. One
common example of full-duplex communication is the telephone network. When two people are
to
communicating by a telephone line, both can talk and listen at the same time. The full-duplex
mode is used when communication in both directions is required all the time. The capacity of the
Tu
1.2 NETWORKS
A network is a set of devices (often referred to as nodes) connected by communication links. A
node can be a computer, printer, or any other device capable of sending and/or receiving data
generated by other nodes on the network.
1.2.1 Distributed Processing
m
Most networks use distributed processing, in which a task is divided among multiple computers.
Instead of one single large machine being responsible for all aspects of a process, separate
co
computers (usually a personal computer or workstation) handle a subset.
1.2.2 Network Criteria
A network must be able to meet a certain number of criteria. The most important of these are
a.
performance, reliability, and security.
Performance:
iy
Performance can be measured in many ways, including transit time and response
time.Transit time is the amount of time required for a message to travel from one device to
un
another. Response time is the elapsed time between an inquiry and a response. The performance
of a network depends on a number of factors, including the number of users, the type of
transmission medium, the capabilities of the connected hardware, and the efficiency of the
sD
software. Performance is often evaluated by two networking metrics: throughput and delay. We
often need more throughput and less delay. However, these two criteria are often contradictory.
If we try to send more data to the network, we may increase throughput but we increase the delay
al
catastrophe.
Security:
Tu
Network security issues include protecting data from unauthorized access, protecting data
from damage and development, and implementing policies and procedures for recovery from
breaches and data losses.
m
devices must be connected in some way to the same link at the same time. There are two possible
types of connections: point-to-point and multipoint. Point-to-Point
co
A point-to-point connection provides a dedicated link between two devices. The entire
capacity of the link is reserved for transmission between those two devices. Most point-to-point
a.
connections use an actual length of wire or cable to connect the two ends, but other options, such
as microwave or satellite links, are also possible. When you change television channels by
iy
infrared remote control, you are establishing a point-to-point connection between the remote
control and the television's control system.
un
Multipoint
A multipoint (also called multidrop) connection is one in which more than two specific
devices share a single link. In a multipoint environment, the capacity of the channel is shared,
sD
either spatially or temporally. If several devices can use the link simultaneously, it is a spatially
shared connection. If users must take turns, it is a timeshared connection.
al
ri
to
Tu
m
co
a.
iy
Mesh: In a mesh topology, every device has a dedicated point-to-point link to every other device.
un
The term dedicated means that the link carries traffic only between the two devices it connects.
To find the number of physical links in a fully connected mesh network with n nodes, we first
consider that each node must be connected to every other node. Node 1 must be connected to n - I
sD
nodes, node 2 must be connected to n – 1 nodes, and finally node n must be connected to n - 1
nodes. We need n(n - 1) physical links. However, if each physical link allows communication in
both directions (duplex mode), we can divide the number of links by 2. In other words, we can
al
Advantages:
1. The use of dedicated links guarantees that each connection can carry its own data load,
thus eliminating the traffic problems that can occur when links must be shared by
multiple devices.
2. A mesh topology is robust. If one link becomes unusable, it does not incapacitate the
m
entire system. Third, there is the advantage of privacy or security. When every message
travels along a dedicated line, only the intended recipient sees it. Physical boundaries
co
prevent other users from gaining access to messages. Finally, point-to-point links make
fault identification and fault isolation easy. Traffic can be routed to avoid links with
suspected problems. This facility enables the network manager to discover the precise
a.
location of the fault and aids in finding its cause and solution.
iy
1. Disadvantage of a mesh are related to the amount of cabling because every device must
be connected to every other device, installation and reconnection are difficult.
un
2. Second, the sheer bulk of the wiring can be greater than the available space (in walls,
ceilings, or floors) can accommodate. Finally, the hardware required to connect each link
(I/O ports and cable) can be prohibitively expensive.
sD
For these reasons a mesh topology is usually implemented in a limited fashion, for example, as a
backbone connecting the main computers of a hybrid network that can include several other
topologies.
al
Star Topology:
In a star topology, each device has a dedicated point-to-point link only to a central
ri
controller, usually called a hub. The devices are not directly linked to one another. Unlike a mesh
topology, a star topology does not allow direct traffic between devices. The controller acts as an
to
exchange: If one device wants to send data to another, it sends the data to the controller, which
then relays the data to the other connected device .
Tu
A star topology is less expensive than a mesh topology. In a star, each device needs only one link
and one I/O port to connect it to any number of others. This factor also makes it easy to install
and reconfigure. Far less cabling needs to be housed, and additions, moves, and deletions involve
only one connection: between that device and the hub.
Other advantages include robustness. If one link fails, only that link is affected. All other links
remain active. This factor also lends itself to easy fault identification and fault isolation. As long
as the hub is working, it can be used to monitor link problems and bypass defective links.
m
co
a.
iy
One big disadvantage of a star topology is the dependency of the whole topology on one single
point, the hub. If the hub goes down, the whole system is dead. Although a star requires far less
un
cable than a mesh, each node must be linked to a central hub. For this reason, often more cabling
is required in a star than in some other topologies (such as ring or bus).
Bus Topology:
sD
The preceding examples all describe point-to-point connections. A bus topology, on the
other hand, is multipoint. One long cable acts as a backbone to link all the devices in a network
al
ri
to
Nodes are connected to the bus cable by drop lines and taps. A drop line is a connection
running between the device and the main cable. A tap is a connector that either splices into the
Tu
main cable or punctures the sheathing of a cable to create a contact with the metallic core. As a
signal travels along the backbone, some of its energy is transformed into heat. Therefore, it
becomes weaker and weaker as it travels farther and farther. For this reason there is a limit on the
number of taps a bus can support and on the distance between those taps.
Advantages of a bus topology include ease of installation. Backbone cable can be laid along the
most efficient path, then connected to the nodes by drop lines of various lengths. In this way, a
bus uses less cabling than mesh or star topologies. In a star, for example, four network devices in
the same room require four lengths of cable reaching all the way to the hub. In a bus, this
redundancy is eliminated. Only the backbone cable stretches through the entire facility. Each
m
drop line has to reach only as far as the nearest point on the backbone.
Disadvantages include difficult reconnection and fault isolation. A bus is usually designed to be
co
optimally efficient at installation. It can therefore be difficult to add new devices. Signal
reflection at the taps can cause degradation in quality. This degradation can be controlled by
limiting the number and spacing of devices connected to a given length of cable. Adding new
a.
devices may therefore require modification or replacement of the backbone.
In addition, a fault or break in the bus cable stops all transmission, even between devices on the
iy
same side of the problem. The damaged area reflects signals back in the direction of origin,
creating noise in both directions.
un
Bus topology was the one of the first topologies used in the design of early local area networks.
Ethernet LANs can use a bus topology, but they are less popular.
Ring Topology In a ring topology, each device has a dedicated point-to-point connection with
sD
only the two devices on either side of it. A signal is passed along the ring in one direction, from
device to device, until it reaches its destination. Each device in the ring incorporates a repeater.
When a device receives a signal intended for another device, its repeater regenerates the bits
al
10
A ring is relatively easy to install and reconfigure. Each device is linked to only its immediate
neighbors (either physically or logically). To add or delete a device requires changing only two
connections. The only constraints are media and traffic considerations (maximum ring length and
number of devices). In addition, fault isolation is simplified. Generally in a ring, a signal is
circulating at all times. If one device does not receive a signal within a specified period, it can
m
issue an alarm. The alarm alerts the network operator to the problem and its location.
However, unidirectional traffic can be a disadvantage. In a simple ring, a break in the ring
co
(such as a disabled station) can disable the entire network. This weakness can be solved by using
a dual ring or a switch capable of closing off the break. Ring topology was prevalent when IBM
introduced its local-area network Token Ring. Today, the need for higher-speed LANs has made
a.
this topology less popular. Hybrid Topology A network can be hybrid. For example, we can have
a main star topology with each branch connecting several stations in a bus topology as shown in
iy
Figure un
sD
al
ri
to
Tu
11
DU Programs: https://www.tutorialsduniya.com/programs
TutorialsDuniya App: http://bit.ly/TutorialsDuniyaApp
C++ Tutorial: https://www.tutorialsduniya.com/cplusplus
Java Tutorial: https://www.tutorialsduniya.com/java
JavaScript Tutorial: https://www.tutorialsduniya.com/javascript
Python Tutorial: https://www.tutorialsduniya.com/python
Kotlin Tutorial: https://www.tutorialsduniya.com/kotlin
JSP Tutorial: https://www.tutorialsduniya.com/jsp
Visit TUTORIALSDUNIYA.COM for Notes, Tutorials, Programs, Question Papers
m
and exchange information. LANs are distinguished from other kinds of networks by three
characteristics:
co
(1) Their size,
(2) Their transmission technology, and
(3) Their topology.
a.
LANs are restricted in size, which means that the worst-case transmission time is bounded and
iy
known in advance. Knowing this bound makes it possible to use certain kinds of designs that
would not otherwise be possible. It also simplifies network management. LANs may use a
un
transmission technology consisting of a cable to which all the machines are attached, like the
telephone company party lines once used in rural areas. Traditional LANs run at speeds of 10
Mbps to 100 Mbps, have low delay (microseconds or nanoseconds), and make very few errors.
sD
Newer LANs operate at up to 10 Gbps Various topologies are possible for broadcast LANs.
Figure1 shows two of them. In a bus (i.e., a linear cable) network, at any instant at most one
machine is the master and is allowed to transmit. All other machines are required to refrain from
al
sending. An arbitration mechanism is needed to resolve conflicts when two or more machines
want to transmit simultaneously. The arbitration mechanism may be centralized or distributed.
ri
IEEE 802.3, popularly called Ethernet, for example, is a bus-based broadcast network with
decentralized control, usually operating at 10 Mbps to 10 Gbps. Computers on an Ethernet can
to
transmit whenever they want to; if two or more packets collide, each computer just waits a
random time and tries again later.
Tu
12
A second type of broadcast system is the ring. In a ring, each bit propagates around on its own,
not waiting for the rest of the packet to which it belongs. Typically, each bit circumnavigates the
entire ring in the time it takes to transmit a few bits, often before the complete packet has even
been transmitted. As with all other broadcast systems, some rule is needed for arbitrating
simultaneous accesses to the ring. Various methods, such as having the machines take turns, are
m
in use. IEEE 802.5 (the IBM token ring), is a ring-based LAN operating at 4 and 16 Mbps. FDDI
is another example of a ring network.
co
Metropolitan Area Network (MAN):
Metropolitan Area Network:
A metropolitan area network, or MAN, covers a city. The best-known example of a MAN is the
a.
cable television network available in many cities. This system grew from earlier community
antenna systems used in areas with poor over-the-air television reception. In these early systems,
iy
a large antenna was placed on top of a nearby hill and signal was then piped to the subscribers'
houses. At first, these were locally-designed, ad hoc systems. Then companies began jumping
un
into the business, getting contracts from city governments to wire up an entire city. The next step
was television programming and even entire channels designed for cable only. Often these
channels were highly specialized, such as all news, all sports, all cooking, all gardening, and so
sD
on. But from their inception until the late 1990s, they were intended for television reception only.
To a first approximation, a MAN might look something like the system shown in Fig. In this
figure both television signals and Internet are fed into the centralized head end for subsequent
al
distribution to people's homes. Cable television is not the only MAN. Recent developments in
high-speed wireless Internet access resulted in another MAN, which has been standardized as
ri
IEEE 802.16.
to
Tu
13
m
A wide area network, or WAN, spans a large geographical area, often a country or continent. It
contains a collection of machines intended for running user (i.e., application) programs. These
co
machines are called as hosts. The hosts are connected by a communication subnet, or just subnet
for short. The hosts are owned by the customers (e.g., people's personal computers), whereas the
communication subnet is typically owned and operated by a telephone company or Internet
a.
service provider. The job of the subnet is to carry messages from host to host, just as the
telephone system carries words from speaker to listener.
iy
Separation of the pure communication aspects of the network (the subnet) from the application
aspects (the hosts), greatly simplifies the complete network design. In most wide area networks,
un
the subnet consists of two distinct components: transmission lines and switching elements.
Transmission lines move bits between machines. They can be made of copper wire, optical fiber,
or even radio links. In most WANs, the network contains numerous transmission lines, each one
sD
connecting a pair of routers. If two routers that do not share a transmission line wish to
communicate, they must do this indirectly, via other routers. When a packet is sent from one
router to another via one or more intermediate routers, the packet is received at each intermediate
al
router in its entirety, stored there until the required output line is free, and then forwarded. A
subnet organized according to this principle is called a store-and-forward or packet-switched
ri
subnet. Nearly all wide area networks (except those using satellites) have store-and-forward
subnets. When the packets are small and all the same size, they are often called cells.
to
message into packets, each one bearing its number in the sequence. These packets are then
injected into the network one at a time in quick succession. The packets are transported
individually over the network and deposited at the receiving host, where they are reassembled
into the original message and delivered to the receiving process. A stream of packets resulting
from some initial message is illustrated in Fig.
14
In this figure, all the packets follow the route ACE, rather than ABDE or ACDE. In some
networks all packets from a given message must follow the same route; in others each packed is
routed separately. Of course, if ACE is the best route, all packets may be sent along it, even if
each packet is individually routed.
m
co
a.
iy
Fig.3.1: A stream of packets from sender to receiver.
Not all WANs are packet switched. A second possibility for a WAN is a satellite system. Each
un
router has an antenna through which it can send and receive. All routers can hear the output from
the satellite, and in some cases they can also hear the upward transmissions of their fellow
routers to the satellite as well. Sometimes the routers are connected to a substantial point-to-point
sD
subnet, with only some of them having a satellite antenna. Satellite networks are inherently
broadcast and are most useful when the broadcast property is important.
al
business as well as the way we spend our leisure time. Count the ways you've used the Internet
recently. Perhaps you've sent electronic mail (e-mail) to a business associate, paid a utility bill,
to
read a newspaper from a distant city, or looked up a local movie schedule-all by using the
Internet. Or maybe you researched a medical topic, booked a hotel reservation, chatted with a
Tu
fellow Trekkie, or comparison-shopped for a car. The Internet is a communication system that
has brought a wealth of information to our fingertips and organized it for our use.
15
A Brief History
A network is a group of connected communicating devices such as computers and printers. An
internet (note the lowercase letter i) is two or more networks that can communicate with each
other. The most notable internet is called the Internet (uppercase letter I), a collaboration of more
than hundreds of thousands of interconnected networks. Private individuals as well as various
m
organizations such as government agencies, schools, research facilities, corporations, and
libraries in more than 100 countries use the Internet. Millions of people are users. Yet this
co
extraordinary communication system only came into being in 1969.
In the mid-1960s, mainframe computers in research organizations were standalone devices.
Computers from different manufacturers were unable to communicate with one another. The
a.
Advanced Research Projects Agency (ARPA) in the Department of Defense (DoD) was
interested in finding a way to connect computers so that the researchers they funded could share
iy
their findings, thereby reducing costs and eliminating duplication of effort.
In 1967, at an Association for Computing Machinery (ACM) meeting, ARPA presented its ideas
un
for ARPANET, a small network of connected computers. The idea was that each host computer
(not necessarily from the same manufacturer) would be attached to a specialized computer,
called an inteiface message processor (IMP). The IMPs, in tum, would be connected to one
sD
another. Each IMP had to be able to communicate with other IMPs as well as with its own
attached host. By 1969, ARPANET was a reality. Four nodes, at the University of California at
Los Angeles (UCLA), the University of California at Santa Barbara (UCSB), Stanford Research
al
Institute (SRI), and the University of Utah, were connected via the IMPs to form a network.
Software called the Network Control Protocol (NCP) provided communication between the hosts.
ri
In 1972, Vint Cerf and Bob Kahn, both of whom were part of the core ARPANET group,
collaborated on what they called the Internetting Projec1. Cerf and Kahn's landmark 1973 paper
to
outlined the protocols to achieve end-to-end delivery of packets. This paper on Transmission
Control Protocol (TCP) included concepts such as encapsulation, the datagram, and the functions
Tu
of a gateway. Shortly thereafter, authorities made a decision to split TCP into two protocols:
Transmission Control Protocol (TCP) and Internetworking Protocol (lP). IP would handle
datagram routing while TCP would be responsible for higher-level functions such as
16
segmentation, reassembly, and error detection. The internetworking protocol became known as
TCPIIP.
The Internet Today
The Internet has come a long way since the 1960s. The Internet today is not a simple hierarchical
structure. It is made up of many wide- and local-area networks joined by connecting devices and
m
switching stations. It is difficult to give an accurate representation of the Internet because it is
continually changing-new networks are being added, existing networks are adding addresses, and
co
networks of defunct companies are being removed. Today most end users who want Internet
connection use the services of Internet service providers (lSPs). There are international service
providers, national service providers, regional service providers, and local service providers. The
a.
Internet today is run by private companies, not the government. Figure 1.13 shows a conceptual
(not geographic) view of the Internet.
iy
un
sD
al
ri
to
Tu
17
m
specialized companies. There are many national ISPs operating in North America; some of the
most well known are SprintLink, PSINet, UUNet Technology, AGIS, and internet Mel. To
co
provide connectivity between the end users, these backbone networks are connected by complex
switching stations (normally run by a third party) called network access points (NAPs). Some
national ISP networks are also connected to one another by private switching stations called
a.
peering points. These normally operate at a high data rate (up to 600 Mbps).
Regional Internet Service Providers:
iy
Regional internet service providers or regional ISPs are smaller ISPs that are connected
to one or more national ISPs. They are at the third level of the hierarchy with a smaller data rate.
un
Local Internet Service Providers:
Local Internet service providers provide direct service to the end users. The local ISPs
can be connected to regional ISPs or directly to national ISPs. Most end users are connected to
sD
the local ISPs. Note that in this sense, a local ISP can be a company that just provides Internet
services, a corporation with a network that supplies services to its own employees, or a nonprofit
organization, such as a college or a university, that runs its own network. Each of these local
al
simply send bit streams to each other and expect to be understood. For communication to occur,
the entities must agree on a protocol. A protocol is a set of rules that govern data
communications. A protocol defines what is communicated, how it is communicated, and when
it is communicated. The key elements of a protocol are syntax, semantics, and timing.
18
o Syntax. The term syntax refers to the structure or format of the data, meaning the order
in which they are presented. For example, a simple protocol might expect the first 8 bits of data
to be the address of the sender, the second 8 bits to be the address of the receiver, and the rest of
the stream to be the message itself.
o Semantics. The word semantics refers to the meaning of each section of bits. How is a
m
particular pattern to be interpreted, and what action is to be taken based on that interpretation?
For example, does an address identify the route to be taken or the final destination of the
co
message?
o Timing. The term timing refers to two characteristics: when data should be sent and
how fast they can be sent. For example, if a sender produces data at 100 Mbps but the receiver
a.
can process data at only 1 Mbps, the transmission will overload the receiver and some data will
be lost.
iy
Standards
Standards are essential in creating and maintaining an open and competitive market for
un
equipment manufacturers and in guaranteeing national and international interoperability of data
and telecommunications technology and processes. Standards provide guidelines to
manufacturers, vendors, government agencies, and other service providers to ensure the kind of
sD
o De facto. Standards that have not been approved by an organized body but have been
adopted as standards through widespread use are de facto standards. De facto standards are often
ri
established originally by manufacturers who seek to define the functionality of a new product or
technology.
to
o De jure. Those standards that have been legislated by an officially recognized body are
de jure standards.
Tu
19
m
co
a.
iy
un
sD
al
of tasks.
At the Sender Site
to
Let us first describe, in order, the activities that take place at the sender site.
o Higher layer. The sender writes the letter, inserts the letter in an envelope, writes the
Tu
20
m
The OSI model (minus the physical medium) is shown in Fig. This model is based on a proposal
developed by the International Standards Organization (ISO) as a first step toward international
co
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 systems—that is, systems that are open
a.
for communication with other systems.
The OSI model has seven layers. The principles that were applied to arrive at the seven layers
iy
can be briefly summarized as follows:
1. A layer should be created where a different abstraction is needed.
un
2. Each layer should perform a well-defined function.
3. The function of each layer should be chosen with an eye toward defining internationally
standardized protocols.
sD
4. The layer boundaries should be chosen to minimize the information flow across the interfaces.
5. The number of layers should be large enough that distinct functions need not be thrown
together in the same layer out of necessity and small enough that the architecture does not
al
become unwieldy.
ri
to
Tu
21
m
co
a.
iy
un
.
Fig.4: The OSI reference model
sD
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.
The Data Link Layer:
ri
The main task of the data link layer is to transform a raw transmission facility into a line that
to
appears free of undetected transmission errors to the network layer. 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 transmits the frames sequentially. If the service is reliable, the receiver
Tu
22
m
can be highly dynamic, being determined anew for each packet, to reflect the current network
load.
co
If too many packets are present in the subnet at the same time, they will get in one another's way,
forming bottlenecks. The control of such congestion also belongs to the network layer. More
generally, the quality of service provided (delay, transit time, jitter, etc.) is also a network layer
a.
issue.
When a packet has to travel from one network to another to get to its destination, many problems
iy
can arise. The addressing used by the second network may be different from the first one. The
second one may not accept the packet at all because it is too large. The protocols may differ, and
un
so on. It is up to the network layer to overcome all these problems to allow heterogeneous
networks to be interconnected. In broadcast networks, the routing problem is simple, so the
network layer is often thin or even nonexistent.
sD
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. The transport layer also
ri
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 error-free point-to-point
to
channel that delivers messages or bytes in the order in which they were sent. However, other
possible kinds of transport service are the transporting of isolated messages, with no guarantee
Tu
about the order of delivery, and the broadcasting of messages to multiple destinations. The type
of service is determined when the connection is established.
The transport layer is a true end-to-end layer, all the way from the source to the destination. In
other words, a program on the source machine carries on a conversation with a similar program
on the destination machine, using the message headers and control messages. In the lower layers,
23
the protocols are between each machine and its immediate neighbours, and not between the
ultimate source and destination machines, which may be separated by many routers.
m
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
co
at the same time), and synchronization (check pointing long transmissions to allow them to
continue from where they were after a crash).
The Presentation Layer:
a.
The presentation layer is concerned with the syntax and semantics of the information transmitted.
In order to make it possible for computers with different data representations to communicate,
iy
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
un
and allows higher-level data structures (e.g., banking records), to be defined and exchanged.
The Application Layer:
The application layer contains a variety of protocols that are commonly needed by users. One
sD
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
al
model were,
1. To connect multiple networks together so that they appear as a single network.
Tu
24
3. Transport Layer
4. Application Layer
Application Layer
Transport Layer
Internet Layer Host-to-
m
Network Layer
Host-to-Network Layer:
co
The TCP/IP reference model does not really say much about what happens here, except to point
out that the host has to connect to the network using some protocol so it can send IP packets to it.
This protocol is not defined and varies from host to host and network to network.
a.
Internet Layer:
This layer, called the internet layer, is the linchpin that holds the whole architecture together. Its
iy
job is to permit hosts to inject packets into any network and have they travel independently to the
destination (potentially on a different network). They may even arrive in a different order than
un
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.
sD
The internet layer defines an official packet format and protocol called IP (Internet Protocol).
The job of the internet layer is to deliver IP packets where they are supposed to go. Packet
routing is clearly the major issue here, as is avoiding congestion. For these reasons, it is
al
reasonable to say that the TCP/IP internet layer is similar in functionality to the OSI network
layer. Fig. shows this correspondence.
ri
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.
Tu
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 fragments 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
25
to make sure a fast sender cannot swamp a slow receiver with more messages than it can handle.
m
co
a.
iy
Fig.1: The TCP/IP reference model.
un
The second protocol in this layer, UDP (User Datagram Protocol), is an unreliable,
connectionless protocol for applications that do not want TCP's sequencing or flow control and
wish to provide their own. It is also widely used for one-shot, client-server-type request-reply
sD
queries and applications in which prompt delivery is more important than accurate delivery, such
as transmitting speech or video. The relation of IP, TCP, and UDP is shown in Fig.2. Since the
model was developed, IP has been implemented on many other networks.
al
ri
to
Tu
26
DU Programs: https://www.tutorialsduniya.com/programs
TutorialsDuniya App: http://bit.ly/TutorialsDuniyaApp
C++ Tutorial: https://www.tutorialsduniya.com/cplusplus
Java Tutorial: https://www.tutorialsduniya.com/java
JavaScript Tutorial: https://www.tutorialsduniya.com/javascript
Python Tutorial: https://www.tutorialsduniya.com/python
Kotlin Tutorial: https://www.tutorialsduniya.com/kotlin
JSP Tutorial: https://www.tutorialsduniya.com/jsp
Visit TUTORIALSDUNIYA.COM for Notes, Tutorials, Programs, Question Papers
m
there. The file transfer protocol provides a way to move data efficiently from one machine to
another. Electronic mail was originally just a kind of file transfer, but later a specialized protocol
co
(SMTP) was developed for it. Many other protocols have been added to these over the years: the
Domain Name System (DNS) for mapping host names onto their network addresses, NNTP, the
protocol for moving USENET news articles around, and HTTP, the protocol for fetching pages
a.
on the World Wide Web, and many others.
iy
Comparison of the OSI and TCP/IP Reference Models:
The OSI and TCP/IP reference models have much in common. Both are based on the
un
concept of a stack of independent protocols. Also, the functionality of the layers is roughly
similar. For example, in both models the layers up through and including the transport layer are
there to provide an end-to-end, network-independent transport service to processes wishing to
sD
communicate. These layers form the transport provider. Again in both models, the layers above
transport are application-oriented users of the transport service. Despite these fundamental
similarities, the two models also have many differences Three concepts are central to the OSI
al
model:
1. Services.
ri
2. Interfaces.
3. Protocols.
to
Probably the biggest contribution of the OSI model is to make the distinction between these three
concepts explicit. Each layer performs some services for the layer above it. The service
Tu
definition tells what the layer does, not how entities above it access it or how the layer works. It
defines the layer's semantics.
A layer's interface tells the processes above it how to access it. It specifies what the parameters
are and what results to expect. It, too, says nothing about how the layer works inside.
27
Finally, the peer protocols used in a layer are the layer's own business. It can use any protocols it
wants to, as long as it gets the job done (i.e., provides the offered services). It can also change
them at will without affecting software in higher layers.
The TCP/IP model did not originally clearly distinguish between service, interface, and protocol,
although people have tried to retrofit it after the fact to make it more OSI-like. For example, the
m
only real services offered by the internet layer are SEND IP PACKET and RECEIVE IP
PACKET.
co
As a consequence, the protocols in the OSI model are better hidden than in the TCP/IP model
and can be replaced relatively easily as the technology changes. Being able to make such
changes is one of the main purposes of having layered protocols in the first place. The OSI
a.
reference model was devised before the corresponding protocols were invented. This ordering
means that the model was not biased toward one particular set of protocols, a fact that made it
iy
quite general. The downside of this ordering is that the designers did not have much experience
with the subject and did not have a good idea of which functionality to put in which layer.
un
Another difference is in the area of connectionless versus connection-oriented communication.
The OSI model supports both connectionless and connection-oriented communication in the
network layer, but only connection-oriented communication in the transport layer, where it
sD
counts (because the transport service is visible to the users). The TCP/IP model has only one
mode in the network layer (connectionless) but supports both modes in the transport layer, giving
the users a choice. This choice is especially important for simple request-response protocols.
al
ri
to
Tu
m
gateway between the network and end communication protocol, which allows connection of
user. hosts over a network.
co
2. In OSI model the transport layer 2. In TCP/IP model the transport layer does not
guarantees the delivery of packets. guarantees delivery of packets. Still the TCP/IP
model is more reliable.
a.
3. Follows vertical approach. 3. Follows horizontal approach.
iy
4. OSI model has a separate
un 4. TCP/IP does not have a separate Presentation
Presentation layer and Session layer. layer or Session layer.
7. OSI is a reference model around which 7. TCP/IP model is, in a way implementation of the
the networks are built. Generally it is OSI model.
to
8. Network layer of OSI model provides 8. The Network layer in TCP/IP model provides
both connection oriented and connectionless service.
connectionless service.
9. OSI model has a problem of fitting the 9. TCP/IP model does not fit any protocol
protocols into the model.
10. Protocols are hidden in OSI model 10. In TCP/IP replacing protocol is not easy.
and are easily replaced as the technology
changes.
11. OSI model defines services, 11. In TCP/IP, services, interfaces and protocols are
interfaces and protocols very clearly and not clearly separated. It is also protocol dependent.
makes clear distinction between them. It
m
is protocol independent.
co
12. It has 7 layers 12. It has 4 layers
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
DU Programs: https://www.tutorialsduniya.com/programs
TutorialsDuniya App: http://bit.ly/TutorialsDuniyaApp
C++ Tutorial: https://www.tutorialsduniya.com/cplusplus
Java Tutorial: https://www.tutorialsduniya.com/java
JavaScript Tutorial: https://www.tutorialsduniya.com/javascript
Python Tutorial: https://www.tutorialsduniya.com/python
Kotlin Tutorial: https://www.tutorialsduniya.com/kotlin
JSP Tutorial: https://www.tutorialsduniya.com/jsp
Visit TUTORIALSDUNIYA.COM for Notes, Tutorials, Programs, Question Papers
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
DU Programs: https://www.tutorialsduniya.com/programs
TutorialsDuniya App: http://bit.ly/TutorialsDuniyaApp
C++ Tutorial: https://www.tutorialsduniya.com/cplusplus
Java Tutorial: https://www.tutorialsduniya.com/java
JavaScript Tutorial: https://www.tutorialsduniya.com/javascript
Python Tutorial: https://www.tutorialsduniya.com/python
Kotlin Tutorial: https://www.tutorialsduniya.com/kotlin
JSP Tutorial: https://www.tutorialsduniya.com/jsp
Visit TUTORIALSDUNIYA.COM for Notes, Tutorials, Programs, Question Papers
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
DU Programs: https://www.tutorialsduniya.com/programs
TutorialsDuniya App: http://bit.ly/TutorialsDuniyaApp
C++ Tutorial: https://www.tutorialsduniya.com/cplusplus
Java Tutorial: https://www.tutorialsduniya.com/java
JavaScript Tutorial: https://www.tutorialsduniya.com/javascript
Python Tutorial: https://www.tutorialsduniya.com/python
Kotlin Tutorial: https://www.tutorialsduniya.com/kotlin
JSP Tutorial: https://www.tutorialsduniya.com/jsp
Visit TUTORIALSDUNIYA.COM for Notes, Tutorials, Programs, Question Papers
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
UNIT-IV
m
- In broadcast network, the key issue is how to share the channel among
co
several users.
- Ex a conference call with five people
a.
-Broadcast channels are also called as multi-access channels or random access
channels.
iy
-Multi-access channel belong to a sublayer at the DL layer called the MAC sublayer.
The Channel Allocation problem: un
a) Static channel allocation in LANs & MANs
i) FDM ii) TDM
sD
Drawbacks: -1) Channel is wasted if one or more stations do not send data.
2) If users increases this will not support.
al
ii) CSMA
CSMA/CA
Tu
Pure ALOHA
-1970’s Norman Abramson end his colleagues devised this method, used ground –based
radio broad costing. This is called the ALOHA system.
-The basic idea, many users are competing for the use of a single shared channel.
-There are two versions of ALOHA: Pure and Slotted.
-Pure ALOHA does not require global time synchronization, where as in slotted ALOHA
m
the time is divided into discrete slots into which all frames must fit.
-Let users transmit whenever they have data to be sent.
co
-There will be collisions and all collided frames will be damaged.
-Senders will know through feedback property whether the frame is destroyed or not by
listening channel.
a.
[-With a LAN it is immediate, with a satellite, it will take 270m sec.]
-If the frame was destroyed, the sender waits random amount of time and again sends
iy
the frame.
-The waiting time must be random otherwise the same frame will collide over and over.
un
USER
sD
A
al
B
ri
C
to
Tu
TIME
m
-Let the ‘Frame time’ denotes the time required to transmit one fixed length frame.
-Assume that infinite populations of users are generating new frames according to
co
possion distribution with mean N frames per frame time.
-If N>1 users are generating frames at a higher rate than the channel can handle.
-For reasonable throughput 0<N<1.
a.
-In addition to new frames, the station also generates retransmission of frames.
-Old and new frames are G per frame time.
iy
-G> N
-At low load there will be few collisions, so G ~ N
un
-Under all loads, the throughput S = GPo, where Po is the probability that a frame does not
suffer a collision.
-A frame will not suffer a collision if no other frames are sent with one frame time of its
sD
start.
-Let ‘t’ be the time required to send a frame.
-If any other user has generated a frame between time to and to+t, the end of that frame
will collide with the beginning of the shaded frame.
al
-Similarly, any other frame started b/w to+t and to+2t will bump into the end of the shaded
frame.
ri
-The probability that ‘k’ frames are generated during a given frame time is given by the
possion distribution:
to
Pr[k] = G ek -G
k!
-The probability of zero frames is just e -G
Tu
-In an interval two frame times long, the mean number at frames generated is 2G.
-The probability at no other traffic being initiated during the entire vulnerable period is
given by
Po = e -2G
S= Ge -2G
[S=GPo]
The Maximum through put occurs at G=0.5 with S=1/2e = 0.184
The channel utilization at pure ALOHA =18%.
Collides Collides
with the
m
with the
start of the t end of the
shaded shaded
frame frame
co
to+t to+2t
to
to+3t Time
a.
Vulnerable
iy
un
S (throughput per frame time)
sD
0.184
al
-G
Pure ALOHA : S = Ge
ri
0.5 1.0
to
Slotted ALOHA
-In 1972, Roberts’ devised a method for doubling the capacity of ALOHA system.
-In this system the time is divided into discrete intervals, each interval corresponding to
one frame.
-One way to achieve synchronization would be to have one special station emit a pip at
the start of each interval, like a clock.
-In Roberts’ method, which has come to be known as slotted ALOHA, in contrast to
Abramson’s pure ALOHA; a computer is not permitted to send whenever a carriage return
is typed.
-Instead, it is required to wait for the beginning of the next slot.
m
-Thus the continuous pure ALOHA is turned into a discrete one.
-Since the vulnerable period is now halved, the of no other traffic during the same slot as
co
-G
our test frame is e which leads to
S = Ge –G
- At G=1, slotted ALOHA will have maximum throughput.
a.
- So S=1/e or about 0.368, twice that of pure ALOHA.
- The channel utilization is 37% in slotted ALOHA.
iy
CarrierSense MultipleAccess Protocols un
Protocols in which stations listen for a carrier (transmission) and act accordingly are
called carries sense protocols.
Persistent CSMA
sD
When a station has data to send, it first listens to the channel to see if any one else is
transmitting at that moment. If the channel is busy, the station waits until it become idle.
When the station detects an idle channel, it transmits a frame. If a collision occurs, the
al
station waits a random amount of time and starts all over again. The protocol is called 1-
persistent also because the station transmits with a probability of 1 when it finds the
ri
channel idle.
The propagation delay has an important effect on the performance of the protocol. The
to
longer the propagation delay the worse the performance of the protocol.
Even if the propagation delay is zero, there will be collisions. If two stations listen the
Tu
channel, that is idle at the same, both will send frame and there will be collision.
m
With persistent CSMA, what happens if two stations become active when a third station is
co
busy? Both wait for the active station to finish, then simultaneously launch a packet,
resulting a collision. There are two ways to handle thisproblem.
a) P-persistent CSMA b) exponential backoff.
a.
P-persistent CSMA
iy
The first technique is for a waiting station not to launch a packet immediately when the
un
channel becomes idle, but first toss a coin, and send a packet only if the coin comes up
heads. If the coin comes up tails, the station waits for some time (one slot for slotted
CSMA), then repeats the process. The idea is that if two stations are both waiting for the
sD
medium, this reduces the chance of a collision from 100% to 25%. A simple
generalization of the scheme is to use a biased coin, so that the probability of sending a
packet when the medium becomes idle is not 0.5, but p, where 0< p < 1. We call such a
al
scheme P-persistent CSMA. The original scheme, where p=1, is thus called 1-persitent
CSMA.
ri
Exponential backoff
to
The key idea is that each station, after transmitting a packet, checks whether the packet
transmission was successful. Successful transmission is indicated either by an explicit
Tu
acknowledgement from the receiver or the absence of a signal from a collision detection
circuit. If the transmission is successful, the station is done. Otherwise, the station
retransmits the packet, simultaneously realizing that at least one other station is also
contending for the medium. To prevent its retransmission from colliding with the other
station’s retransmission, each station backs off (that is, idles) for a random time chosen
from the interval
m
CSMA/CA
In many wireless LANS, unlike wired LANS, the station has no idea whether the packet
co
collided with another packet or not until it receives an acknowledgement from receiver. In
this situation, collisions have a greater effect on performance than with CSMA/CD, where
colliding packets can be quickly detected and aborted. Thus, it makes sense to try to
a.
avoid collisions, if possible. CSMA/CA is basically p-persistence, with the twist that when
the medium becomes idle, a station must wait for a time called the interframe spacing or
iy
IFS before contending for a slot. A station gets a higher priority if it is allocated smaller
inter frame spacing.
un
When a station wants to transmit data, it first checks if the medium is busy. If it is, it
continuously senses the medium, waiting for it to become idle. When the medium
becomes idle, the station first waits for an interframe spacing corresponding to its priority
sD
level, then sets a contention timer to a time interval randomly selected in the range
[0,CW], where CW is a predefined contention window length. When this timer expires, it
al
transmits a packet and waits for the receiver to send an ack. If no ack is received, the
packet is assumed lost to collision, and the source tries again, choosing a contention
ri
timer at random from an interval twice as long as the one before(binary exponential
backoff). If the station senses that another station has begun transmission while it was
to
waiting for the expiration of the contention timer, it does not reset its timer, but merely
freezer it, and restarts the countdown when the packet completes transmission. In this
way, stations that happen to choose a longer timer value get higher priority in the next
Tu
round of contention.
Collision-Free Protocols
A Bit-Map Protocol
In the basic bit-map method, each contention period consists of exactly N slots. If station
0 has a frame to send, it transmits a 1 bit during the zeroth slot. No other station is
allowed to transmit during this slot. Regardless of what station 0 does, station 1 gets the
opportunity to transmit a 1during slot 1, but only if it has a frame queued. In general,
station j may announce the fact that it has a frame to send by inserting a 1 bit into slot j.
after all N slots have passed by, each station has complete knowledge of which stations
with to transmit.
m
8 Contention slots 8 Contention slots
Frames
co
0 1 2 3 4 56 7 0123456 7
1 1 1 1 3 7 1 1 1 5
a.
iy
The basic bit-map protocol un
Since everyone agrees on who goes next, there will never be any collisions. After the last
ready station has transmitted its frame, an event all stations can easily monitor, another N
bit contention period is begun. If a station becomes ready just after its bit slot has passed
sD
by, it is out of luck and must remain silent until every station has had a chance and the bit
map has come around again. Protocols like this in which the desire to transmit is
broadcast before the actual transmission are called reservation protocols.
al
Binary Countdown
A problem with the basic bit-map protocol is that the overhead is 1 bit per station. A
ri
station wanting to use the channel now broadcasts its address as a binary bit string,
starting with the high-order bit. All addresses are assumed to be the same length. The
to
bits in each address position from different stations are BOOLEAN ORed together. We
will call this protocol binary countdown. It is used in Datakit.
Tu
As soon as a station sees that a high-order bit position that is 0 in its address has been
overwritten with a 1, it gives up. For example, if station 0010,0100,1001, and 1010 are all
trying to get the channel, in the first bit time the stations transmit 0,0,1, and 1,
respectively. Stations 0010 and 0100 see the 1 and know that a higher-numbered station
is competing for the channel, so they give up for the current round. Stations 1001 and
1010 continue.
The next bit is 0, and both stations continue. The next bit is 1, so station 1001 gives up.
The winner is station 1010, because it has the highest address. After winning the bidding,
it may now transmit a frame, after which another bidding cycle starts.
The binary countdown protocol. A dash indicates silence
Bit time
0123
m
0010 0 - --
co
0100 0 - --
1001 100-
a.
1010 1 0 10
iy
Result 1 0 10
un
Stations 0010 Station 1001
and 0100 see sees this 1
this 1 and give and givesup
up
sD
called Ethernet through which electromagnetic radiation was once thought to propagate.
Xerox DEC and Intel came with another standard for 100 Mbps Ethernet. This differs from
ri
old one that it runs at speeds from 1 to 10 Mbps on various media. The second difference
between these two is in one header (802.3 length field is used for packet type in
to
Ethernet).
Tu
802.3
m
10Base5, 10Base2 10 Broad 36
co
10Base-T, 1Base5
100 Base-T
802.3 Cabling
a.
Five types of cabling are commonly used, 10Base5 cabling called thick Ethernet, came
first. It resembles a yellow garden hose, with markings every 2.5 m to show where the
iy
taps go. Connections to it are generally made using vampire taps, in which a pin is
carefully forced halfway into the coaxial cable’s core. The notation 10Base5 means that it
un
operates at 10 Mbps, uses baseband signaling, and can support segments of up to 500m.
The second cable type was 10Base2 or thin Ethernet, which, in contrast to the garden-
to
hose-like thick Ethernet, bends easily. Connections to it are made using industry standard
BNC connectors to form T-junctions, rather than using vampire taps. These are easier to
Tu
use and more reliable. Thin Ethernet is much cheaper and easier to install, but it can run
for only 200m and can handle only 30 machines per cable segment.
Cable breaks, bad taps, or loose connectors can be detected by a devise called time
domain reflectometry.
For 10Base5, a transceiver is clamped securely around the cable so that its tap makes
contact with the inner core. The transceiver contains the electronics that handle carrier
detection and collision detection. When a collision is detected, the transceiver also puts a
special invalid signal on the cable to ensure that all other transceivers also realize that a
collision has occurred.
The transceiver cable terminates on an interface board inside the computer. The interface
board contains a controller chip that transmits frames to, and receives frames from, the
transceiver. The controller is responsible for assembling the data into the proper frame
format, as well as computing checksums on outgoing frames and verifying them on
m
incoming frames.
With 10Base2, the connection to the cable is just a passive BNC T-junction connector.
co
The transceiver electronics are on the controller board, and each station always has its
own transceiver.
With 10Base-T, there is no cable at all, just the hub (a box full of electronics). Adding or
a.
removing a station is simple in this configuration, and cable breaks can be detected
easily. The disadvantage of 10Base-T is that the maximum cable run from the hub is only
iy
100m, may be 150m if high-quality (category 5) twisted pairs are used. 10Base-Tis
becoming steadily more popular due to the ease of maintenance. 10Base-F, which uses
un
fiber optics. This alternative is expensive due to the cost of the connectors and
terminators, but it has excellent noise immunity and is the method of choice when running
between buildings or widely separated hubs.
sD
Each version of 802.3 has a maximum cable length per segment. To allow larger
networks, multiple cables can be connected by repeaters. A repeater is a physical layer
device. It receives, amplifies, and retransmits signals in both directions. As far as the
al
contain multiple cable segments and multiple repeaters, but no two transceivers may be
more than 2.5km apart and no path between any two transceivers any traverse more than
to
four repeaters.
Tu
A BB
C
Trap
m
D
co
Backbone
A B C D
a.
Repeater
iy
802.3 uses Manchester Encoding and differential Manchester Encoding
un
Bit stream 1 0 0 0 0 1 0 1 1 1 1
sD
Binary encoding
al
Manchester encoding
ri
to
Bytes
7 1 2 or 6 2 or 6 2 0-1500 0-46 4
Destination Source
Preamble Data Pad Checksum
address address
m
Start of frame Length of
delimiter data field
co
The 802.3 MAC sub layer protocol:
I) Preamble:
a.
Each frame start with a preamble of 7 bytes each containing a bit pattern 10101010.
II) Start of frame byte:
iy
It denotes the start of the frame itself. It contains 10101011.
III) Destination address:
un
This gives the destination address. The higher order bit is zero for ordinary address and
1for group address (Multi casting). All bits are 1s in the destination field frame will be
delivered to all stations (Broad casting).
sD
The 46 thbit (adjacent to the high-order bit) is used to distinguish local from global
addresses.
IV) Length field:
al
This tells how many bytes are present in the data field from 0 to 1500.
V) Data field:
ri
Valid frame must have 64 bytes long from destination to checksum. If the frame size less
than 64 bytes pad field is used to fill out the frame to the minimum size.
Tu
VII) Checksum:
It is used to find out the receiver frame is correct or not. CRC will be used here.
DU Programs: https://www.tutorialsduniya.com/programs
TutorialsDuniya App: http://bit.ly/TutorialsDuniyaApp
C++ Tutorial: https://www.tutorialsduniya.com/cplusplus
Java Tutorial: https://www.tutorialsduniya.com/java
JavaScript Tutorial: https://www.tutorialsduniya.com/javascript
Python Tutorial: https://www.tutorialsduniya.com/python
Kotlin Tutorial: https://www.tutorialsduniya.com/kotlin
JSP Tutorial: https://www.tutorialsduniya.com/jsp
Visit TUTORIALSDUNIYA.COM for Notes, Tutorials, Programs, Question Papers
m
Switched Ethernet:
- 10 Base-T Ethernet is a shared media network.
co
- The entire media is involved in each transmission.
- The HUB used in this network is a passive device. (not intelligent).
- In switched Ethernet the HUB is replaced with switch. Which is a active device
a.
(intelligent )
Fast Ethernet
iy
un
100 Base_x
sD
Gigabit Ethernet
to
Tu
m
17 20
Broadband Logical ring
14
coaxial cable
co
a.
This station not
currently in the
iy
19 logical ring
13 11 7
Direction of
okNencam
This standard, 802.4, describes a LtA lleodtio
a ntoken bus. Physically, the token bus is a
un
linear or tree-shaped cable onto which the stations are attached. Logically, the stations
are organized into a ring, with each station knowing the address of the station to its “left”
and “right.” When the logical ring is initialized, the highest numbered station may send
sD
the first frame. After it is done, it passes permission to its immediate neighbor by sending
the neighbor a special control frame called a token. The token propagates around the
al
logical ring, with only the token holder being permitted to transmit frames. Since only one
station at a time holds the token, collisions do not occur.
ri
Since the cable is inherently a broadcast medium, each station receives each frame,
discarding those not addressed to it. When a station passes the token, it sends a token
to
frame specifically addressed to its logical neighbor in the ring, irrespective of where that
station is physically located on the cable. It is also worth noting that when stations are first
powered on, they will not be in the ring, so the MAC protocol has provisions for adding
Tu
stations to, and deleting stations from, the ring. For the physical layer, the token bus uses
the 75-ohm broadband coaxial cable used for cable television. Both single and dual-cable
systems are allowed, with or without head-ends.
Destination Source
Data Checksum
address address
Frame control
Start of delimiter End
delimiter
Preamble
m
The frame control field is used to distinguish data frames from control frames. Fro data
frames, it carries the frame’s priority. It can also carry an indicator requiring the
co
destination station to acknowledge correct or incorrect receipt of the frame.
For control frames, the frame control field is used to specify the frame type.
a.
The allowed types include token passing and various ring maintenance frames,
including the mechanism for letting new stations enter the ring, the mechanism for
iy
allowing stations to leave the ring, and so on.
un
Connecting devices
sD
Connecting
devices
al
Networking Internetworking
ri
devices devices
to
Application Application
Presentation Presentation
Session Session
Transport Transport
m
Network Network
co
Data link Data link
Bridge
Physical Physical
Repeate
a.
Bridges
iy
LANS can be connected by devices called bridges, which operate in the data link layer.
Bridges do not examine the network layer header and can thus copy IP, IPX, and OSI
un
packets equally well.
The various reasons why the bridges are used.
1) Many university and corporate departments have their own LANS, primarily to connect
sD
their own personal computers, workstations, and servers. Since the goals of the various
departments differ, different departments choose different LANS, without regard to what
other departments are doing. Sooner or later, there is a need for interaction, so bridges
al
are needed.
2) The organization may be geographically spread over several buildings separated by
ri
considerable distances. It may be cheaper to have separate LANS in each building and
connect them with bridges and infrared links than to run a single coaxial cable over the
to
entire site.
3) It may be necessary to split what is logically a single LAN into separate LANS to
Tu
accommodate the load. Putting all the workstations on a single LAN- the total bandwidth
needed is far too high. Instead multiple LANS connected by bridges are used.
4) In some situations, a single LAN would be adequate in terms of the load, but the
physical distance between the most distant machines is too great (e.g., more than 2.5km
for 802.3). Even if laying the cable is easy to do, the network would not work due to the
excessively long round-trip delay. Only solution is to partition the LAN and install bridges
between the segments.
5) There is the matter of reliability. On a single LAN, a defective node that keeps
outputting a continuous stream of garbage will cripple the LAN. Bridges can be inserted at
critical places, to prevent a single node which has gone berserk from bringing down the
entire system.
m
6) And last, bridges can contribute to the organization’s security. By inserting bridges at
various places and being careful not to forward sensitive traffic, it is possible to isolate
co
parts of the network so that its traffic cannot escape and fall into the wrong hands.
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
DU Programs: https://www.tutorialsduniya.com/programs
TutorialsDuniya App: http://bit.ly/TutorialsDuniyaApp
C++ Tutorial: https://www.tutorialsduniya.com/cplusplus
Java Tutorial: https://www.tutorialsduniya.com/java
JavaScript Tutorial: https://www.tutorialsduniya.com/javascript
Python Tutorial: https://www.tutorialsduniya.com/python
Kotlin Tutorial: https://www.tutorialsduniya.com/kotlin
JSP Tutorial: https://www.tutorialsduniya.com/jsp
Visit TUTORIALSDUNIYA.COM for Notes, Tutorials, Programs, Question Papers
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
m
co
a.
iy
un
sD
al
ri
to
Tu
DU Programs: https://www.tutorialsduniya.com/programs
TutorialsDuniya App: http://bit.ly/TutorialsDuniyaApp
C++ Tutorial: https://www.tutorialsduniya.com/cplusplus
Java Tutorial: https://www.tutorialsduniya.com/java
JavaScript Tutorial: https://www.tutorialsduniya.com/javascript
Python Tutorial: https://www.tutorialsduniya.com/python
Kotlin Tutorial: https://www.tutorialsduniya.com/kotlin
JSP Tutorial: https://www.tutorialsduniya.com/jsp