Handout 2
Handout 2
Islamabad
Multiplexing
When two communicating nodes are connected through a media, it generally happens that
bandwidth of media is several times greater than that of the communicating nodes. Transfer of a
single signal at a time is both slow and expensive. The whole capacity of the link is not being
utilized in this case. This link can be further exploited by sending several signals combined into
one. This combining of signals into one is called multiplexing.
2. Time Division Multiplexing (TDM): This is possible when data transmission rate of the
media is much higher than that of the data rate of the source. Multiple signals can be
1|Page
transmitted if each signal is allowed to be transmitted for a definite amount of time.
These time slots are so small that all transmissions appear to be in parallel.
1. Synchronous TDM: Time slots are preassigned and are fixed. Each source is
given it's time slot at every turn due to it. This turn may be once per cycle, or
several turns per cycle ,if it has a high data transfer rate, or may be once in a no.
of cycles if it is slow. This slot is given even if the source is not ready with data.
So this slot is transmitted empty.
2. Asynchronous TDM: In this method, slots are not fixed. They are allotted
dynamically depending on speed of sources, and whether they are ready for
transmission.
2|Page
Network Topologies
A network topology is the basic design of a computer network. It is very much like a map of a
road. It details how key network components such as nodes and links are interconnected. A
network's topology is comparable to the blueprints of a new home in which components such as
the electrical system, heating and air conditioning system, and plumbing are integrated into the
overall design. Taken from the Greek work "Topos" meaning "Place," Topology, in relation to
networking, describes the configuration of the network; including the location of the
workstations and wiring connections. Basically it provides a definition of the components of a
Local Area Network (LAN). A topology, which is a pattern of interconnections among nodes,
influences a network's cost and performance. There are three primary types of network
topologies which refer to the physical and logical layout of the Network cabling. They are:
1. Star Topology: All devices connected with a Star setup communicate through a central
Hub by cable segments. Signals are transmitted and received through the Hub. It is the
simplest and the oldest and all the telephone switches are based on this. In a star
topology, each network device has a home run of cabling back to a network hub, giving
each device a separate connection to the network. So, there can be multiple connections
in parallel.
3|Page
Advantages
Disadvantages
o Broadcasting and multicasting is not easy because some extra functionality needs
to be provided to the central hub
o If the central node fails, the whole network goes down; thus making the switch
some kind of a bottleneck
o Installation costs are high because each node needs to be connected to the central
switch
2. Bus Topology: The simplest and one of the most common of all topologies, Bus consists
of a single cable, called a Backbone, that connects all workstations on the network using
a single line. All transmissions must pass through each of the connected devices to
complete the desired request. Each workstation has its own individual signal that
identifies it and allows for the requested data to be returned to the correct originator. In
the Bus Network, messages are sent in both directions from a single point and are read by
the node (computer or peripheral on the network) identified by the code with the
message. Most Local Area Networks (LANs) are Bus Networks because the network will
continue to function even if one computer is down. This topology works equally well for
either peer to peer or client server.
4|Page
The purpose of the terminators at either end of the network is to stop the signal being
reflected back.
Advantages
Disadvantages
o Trouble shooting and error detection becomes a problem because, logically, all
nodes are equal
o Less secure because sniffing is easier
o Limited in size and speed
3. Ring Topology: All the nodes in a Ring Network are connected in a closed circle of
cable. Messages that are transmitted travel around the ring until they reach the computer
that they are addressed to, the signal being refreshed by each node. In a ring topology, the
network signal is passed through each network card of each device and passed on to the
next device. Each device processes and retransmits the signal, so it is capable of
supporting many devices in a somewhat slow but very orderly fashion. There is a very
nice feature that everybody gets a chance to send a packet and it is guaranteed that every
node gets to send a packet in a finite amount of time.
5|Page
Advantages
o Broadcasting and multicasting is simple since you just need to send out one
message
o Less expensive since less cable footage is required
o It is guaranteed that each host will be able to transmit within a finite time interval
o Very orderly network where every device has access to the token and the
opportunity to transmit
o Performs better than a star network under heavy network load
Disadvantages
Generally, a BUS architecture is preferred over the other topologies - ofcourse, this is a very
subjective opinion and the final design depends on the requirements of the network more than
anything else. Lately, most networks are shifting towards the STAR topology. Ideally we would
like to design networks, which physically resemble the STAR topology, but behave like BUS or
RING topology.
6|Page
Aloha Protocols
History
The Aloha protocol was designed as part of a project at the University of Hawaii. It provided
data transmission between computers on several of the Hawaiian Islands using radio
transmissions.
Communications was typically between remote stations and a central sited named
Menehune or vice versa.
All message to the Menehune were sent using the same frequency.
When it received a message intact, the Menehune would broadcast an ack on a distinct
outgoing frequency.
The outgoing frequency was also used for messages from the central site to remote
computers.
All stations listened for message on this second frequency.
Pure Aloha
One serious drawback here is that, you dont know whether what you are sending has been
received properly or not (so as to say, "whether you've been heard and understood?"). To resolve
this, in Pure Aloha, when one node finishes speaking, it expects an acknowledgement in a finite
amount of time - otherwise it simply retransmits the data. This scheme works well in small
networks where the load is not high. But in large, load intensive networks where many nodes
may want to transmit at the same time, this scheme fails miserably. This led to the development
of Slotted Aloha.
7|Page
Slotted Aloha
This is quite similar to Pure Aloha, differing only in the way transmissions take place. Instead of
transmitting right at demand time, the sender waits for some time. This delay is specified as
follows - the timeline is divided into equal slots and then it is required that transmission should
take place only at slot boundaries. To be more precise, the slotted-Aloha makes the following
assumptions:
In this way, the number of collisions that can possibly take place is reduced by a huge margin.
And hence, the performance become much better compared to Pure Aloha. collisions may only
take place with nodes that are ready to speak at the same time. But nevertheless, this is a
substantial reduction.
In both slotted and pure ALOHA, a node's decision to transmit is made independently of the
activity of the other nodes attached to the broadcast channel. In particular, a node neither pays
attention to whether another node happens to be transmitting when it begins to transmit, nor
stops transmitting if another node begins to interfere with its transmission. As humans, we have
human protocols that allow allows us to not only behave with more civility, but also to decrease
the amount of time spent "colliding" with each other in conversation and consequently increasing
8|Page
the amount of data we exchange in our conversations. Specifically, there are two important rules
for polite human conversation:
1. Listen before speaking: If someone else is speaking, wait until they are done. In the
networking world, this is termed carrier sensing - a node listens to the channel before
transmitting. If a frame from another node is currently being transmitted into the channel,
a node then waits ("backs off") a random amount of time and then again senses the
channel. If the channel is sensed to be idle, the node then begins frame transmission.
Otherwise, the node waits another random amount of time and repeats this process.
2. If someone else begins talking at the same time, stop talking. In the networking world,
this is termed collision detection - a transmitting node listens to the channel while it is
transmitting. If it detects that another node is transmitting an interfering frame, it stops
transmitting and uses some protocol to determine when it should next attempt to transmit.
It is evident that the end-to-end channel propagation delay of a broadcast channel - the time it
takes for a signal to propagate from one of the the channel to another - will play a crucial role in
determining its performance. The longer this propagation delay, the larger the chance that a
carrier-sensing node is not yet able to sense a transmission that has already begun at another
node in the network.
This is the simplest version CSMA protocol as described above. It does not specify any collision
detection or handling. So collisions might and WILL occur and clearly then, this is not a very
good protocol for large, load intensive networks.
So, we need an improvement over CSMA - this led to the development of CSMA/CD.
In this protocol, while transmitting the data, the sender simultaneously tries to receive it. So, as
soon as it detects a collission (it doesn't receive its own data) it stops transmitting. Thereafter, the
node waits for some time interval before attempting to transmit again. Simply put, "listen while
you talk". But, how long should one wait for the carrier to be freed? There are three schemes to
handle this:
9|Page
3. p-Persistent: Even if a sender finds the carrier to be idle, it uses a probabilistic
distribution to determine whether to transmit or not. Put simply, "toss a coin to decide". If
the carrier is idle, then transmission takes place with a probability p and the sender waits
with a probability 1-p. This scheme is a good trade off between the Non-persistent and 1-
persistent schemes. So, for low load situations, p is high (example: 1-persistent); and for
high load situations, p may be lower. Clearly, the value of p plays an important role in
determining the performance of this protocol. Also the same p is likely to provide
different performance at different loads.
CSMA/CD doesn't work in some wireless scenarios called "hidden node" problems. Consider a
situation, where there are 3 nodes - A, B and C communicating with each other using a wireless
protocol. Morover, B can communicate with both A and C, but A and C lie outside each other's
range and hence can't communicate directly with each other. Now, suppose both A and C want to
communicate with B simultaneously. They both will sense the carrier to be idle and hence will
begin transmission, and even if there is a collision, neither A nor C will ever detect it. B on the
other hand will receive 2 packets at the same time and might not be able to understand either of
them. To get around this problem, a better version called CSMA/CA was developed, specially
for wireless applications.
10 | P a g e