You are on page 1of 14

Ans 1 a

A LAN is a high-speed data network that covers a relatively small geographic area. It
typically connects computers, printers, servers and other devices. LAN facilitates file
exchange between connected users, coñununication through email and internet,
development and deployment of web specific applications, etc., Since a LAN is generally
confined to a small area, it’s under a single management. Topology is an important
component of any LAN. This defines how the nodes! devices are connected over a LAN.
In general bus, ring and star topologies are employed in a
LAN.
The LAN implemented is an Ethernet with around 70 nodes as shown in the figure. The
total network is divided into 3 subnets. CAT-S (10 base T) UTP cable has been used to
connect the various devices of the LAN. The following peripherals have been used in the
LAN.
l.Hub
2. Router
3. Switch
The LAN environment consists mostly of PC’s working on Win XP and Win 98 SE
operating systems. Most of the printers are DeskJet and LaserJet. While the LAN is used
for file sharing, shared printer sharing etc.,

LAN Terminology
Bandwidth: Refers to the capacity of a transmission medium. The range of frequencies
supported by a given device is referred as its bandwidth.
Client/Node: A device in a network which requests some service to be performed by
another device in the network.
Hub: A device used to concentrate incoming data from multiple nodes onto a common
network medium.
Network Interface Card: An interface to the network. This implements the Media Access
Control mechanism and protocol layers uyd by a node that is connected to the network.
Network Segment: A portion of a network set apart from other network sections by a
router. Each network segment supports a single-medium access protocol and a limited
bandwidth.
Router: A device that limits traffic between two network segments based on a preset
standard, such as network address. Useful for segmenting networks containing different
protocols.
Switch: Switches examine each packet and process it accordingly rather than simply
repeating the signal to all ports. Switches map the Ethernet addresses of the nodes
residing on each network segment and then allowonly the necessary traffic to pass
through the switch. Most switches are self-learning.

Ans 1 b
The Ethernet implemented is shown in fig I. The 3 subnets are interconnected suing a
router. Each subnet contains approximately 24 computers including servers. All the
computers are connected by means of a Hub. All the three hub has uplink port connected
to the LAN router.
As the LAN is spanning very short area, it does not require any repeater as it does not
exceed the limit imposed by Ethernet on maximum segment length. Also all the PCs are
connected through a hub and that segment is connected to other segment via a router so
bridge is not used.

Ans 1 c 1
Ans. Repeaters : Repeaters The number of nodes on a network and the length of cable
used influence the quality of communication on the network Attenuation Natural
degradation of a transmitted signal over distance Repeaters work against attenuation by
repeating signals that they receive on a network. On analog networks, devices that boost
the signal are called amplifiers These devices do not have the same signal regeneration
capabilities as repeaters because they must maintain the shape of the received signal
Therefore, noise tends to amplified with the signal.
Bridges : Bridges Operate at the Data Link layer of the OSI model Filters traffic between
network segments by examining the destination MAC address Based on this destination
MAC address, the bridge either forwards or discards the frame When a client sends a
broadcast frame to the entire network, the bridge will always forward the frame.
Because bridges do more than repeaters by viewing the MAC addresses, the extra
processing makes them slower than repeaters Bridges forward broadcast frames
indiscriminately, so they do not filter broadcast traffic Bridges are more expensive than
repeaters.
Bridges can extend a network by acting as a repeater Bridges can reduce network traffic
on a segment by subdividing network conmmnications Bridges increase the available
-bandwidth to individual nodes because fewer nodes share a collision domain Bridges
reduce the likelihood of network collisions Some bridges connect networks using
different media types and architectures.
Because bridges forward broadcast traffic can be a major disadvantage on a network
during a broadcast storm Broadcast storm Excessive broadcast messages to every host on
the network, launched by multiple computers

Ans 1 c ii
Ans. Bridges and switches are data communications devices that operate principally at
Layer 2 of the OSI reference model. As such: they are widely referred to as data link
layer devices.Bridges became commercially available in the early I 980s. At the time of
their introduction, bridges connected and enabled packet forwarding between
homogeneous networks. More recently, bridging between different networks has also
been defined and standardized.Several kinds of bridging have proven important as
internetworking devices. Transparent bridging is found primarily in Ethernet
environments, while source-route bridging occurs primarily in Token Ring environments.
Translational bridging provides translation between the formats and transit principles of
different media types (usually Ethernet and Token Ring). Finally, source-route transparent
bridging combines the algorithms of pansparent bridging and source-route bridging to
enable communication in mixed Ethernet/Token Ring environments.
Today; switching technology has emerged as the evolutionary heir to bridging-based
internetworking solutions. Switching implementations now dominate applications in
which bridging techiologies were implemented in prior network designs. Superior
throughput performance, higher port density, lower per-port cost, and greater flexibility
have contributed to the emergence of switches as repladement technology for bridges and
as complements to routing technology.
Switch is intelligent device compare to bridge.
A witeh can do everything a bridge does, but more efficiently. In addition, it is able to
create
VLANS which essentially allows you to run separate networks without having to use a
router.
Bridges do not support that.
Ans 1 c iii
Router
A router is used to route data packets between two networks. It reads the information in
each packet to tell where it is going. If it is destined for an immediate network it has
access to, it will strip the outer packet, readdress the packet to the proper ethernet
address, and transmit it on that network. If it is destined for another network and must be
sent to another router, it will re-package the outer packet to be received by the next router
and send it to the next router. The section on routing explains the theory behind this and
how routing tables are used to hap determine packet destinations. Routing occurs at the
network layer of the 051 model. They can connect networks with different architectures
such as Token Ring and Ethernet. Although they can transform information at the data
link level, routers cannot transform information from one data format such as TCP/IP to
another such as IPX/SPX. Routers do not send broadcast packets or corrupted packets. If
the routing table does not indicate the proper address of a packet, the packet is discarded.

Bridge
A bridge reads the outermost section of data on the data packet, to tell where the message
is going. It reduces the traffic on other netvork segments, since it does not seiid all
packets. Bridges can be programmed to reject packets from particular networks. Bridging
occurs at the data link layer of the 051 model, which means the bridge cannot read IP
addresses, but only the outermost hardware address of the packet. In our case the bridge
can read the ethernet data which gives the hardware address of the destination address,
not the IP address. Bridges forward all broadcast messages. Only a special bridge called a
translation bridge will allow two networks of different architectures to be connected.
Bridges do not normally allow connection of networks with different architectures. The
hardware address is also called the MAC (media access control) address. To determine
the network segment a MAC address belongs to, bridges use one of:
> Transparent Bridging - They build a table of addresses (bridging table) as they receive
packets. If the address is not in the bridging table; the packet is forwarded to all segments
other than the one it came from. This type of bridge is used on ethernet networks.
> Source route bridging - The source c6mputer provides path information inside the
packet. This is used on Token Ring networks

Ans 2 a
Since not all stations are within radio range of each other, transmissions going on in one
part of a cell may not be received elsewhere in the same cell. In this example, station C is
transmitting to station B. If A senses the channel, it will not hear anything and falsely
conclude that it may now start transmitting to B.
problem
In addition, there is the inverse problem, the exposed station problem, illustrated in Fig.
1(b). Here B wants to send to C so it listens to the channel. When it hears a transmission,
it falsely concludes that it thay not send to C, even though A may be transmitting to D
(not shown). In addition, most radios are half duplex, meaning that they cannot transmit
and listen for noise bursts at the same time on a single frequency. As a result of these
problems, 802.11 does not use CSMA/CD, as Ethernet does.

Ans 2 b
Since not all stations are within radio range of each other, transmissions going on in one
part of
cell may not be received elsewhere in the same cell. In this example, station C is
transmitting to station B. If A senses the channel, it will not hear anything and falsely
conclude that it may now start transmitting to B.
In addition, there is the inverse problem, the exposed station problem, illustrated in Fig.
1(b). Here B wants to send to C so it listens to the channel. When it hears a transmission,
it falsely concludes that it may not send to C, even though A may be transmitting to D
(not shown). In addition, most radios are half duplex, meaning that they cannot transmit
and listen for ndise bursts at the same time on a single frequency. As a result of these
problems, 802.11 does not use CSMAICD, as Ethernet does.
To deal with this problem, 802.11 supports two modes of operation. The first, called DCF
(Distributed Coordination Function), does not use any kind of central control (in that
respect, similar to Ethernet). The other, called PCF (Point Coordination Function), uses
the base station to control all activity in its cell. All implementations must support DCF
but PCF is optional.
When DCF is employed, 802.11 uses a protocol called CSMA/CA (CSMA with Collision
Avoidance). In this protocol, both physical channel sensing and virtual channel sensing
are used. Two methods of operation are supported by CSMAICA. In the first method,
when a station wants to transmit, it senses the channel. If it is idle, it just starts
transmitting. It does not sense the channel while transmitting but emits its entire frame,
which may well be destroyed at the receiver due to interference there. If the channel is
busy, the sender defers until it goes idle and then starts transmitting. If a collision occurs,
the colliding stations wait a random time, using the Ethernet binary exponential backoff
algorithm, and then try again later.
The other mode of CSMAJCA operation is based on MACAW and uses virtual channel
sensing, as illustrated in Fig. 2. In this example, A wants to send to B. C is a station
within range of A (and possibly within range of B, but that does not matter). D is a station
within range of B but not within range of A.
The protocol starts when A decides it wants to send data to B. It begins by sending an
RTS frame to B to request permission to send it a frame..When B receives this request, it
may decide to grant permission, in which case it sends a CTS frame back. Upon receipt
of the CTS, A now sends its frame and starts an ACK timer. Upon correct receipt of the
data frame, B responds with an ACK frame, terminating the exchange. If As ACK timer
expires before the ACK gets back to it, the whole protocol is run again. -
Now let us consider this exchange from the viewpoints of C and D. C is within range of
A, so it may receive the RTS frame. If it does, it realizes that someone is going to send
data soon, so for the good of all it desists from transmitting anything until the exchange is
completed. From the information provided in the RTS request, it can estimate how long
the sequence will take, including the final ACK, so it asserts a kind of virtual channel
busy for itself, indicated by NAy (Network Allocation Vector) in Fig. 2. D does not hear
the RTS, but it does hear the CTS, so it also asserts the NAy signal for itself. Note that the
NAV signals are not transmitted; they are just internal reminders to keep quiet for a
certain period of time.

Ans 2 c i

Similarity

• IP and UD? both are connectionlss protocol


• They do not provide reliability guarantee
• No Quality of Service (QoS) guarantee is provided by either of the protocol
• Both protocols are suitable for applications requiring to transfer real time data,

Differences

• IP operate at Network layer while UDP operates at Transport layer.


• UDP packets are carried in IP packets but reverse is not possible.
• Main function of IP includes routing, congestion control, subnet management and it
identifies a host in the internet while UDP is responsible for process to process delivery
of packets.

Ans 2 c ii
Ant VoTP is a real-time service. For real-time properties to be guaranteed to be met, a
networt with QoS must be used to provide fixed delay and bandwidth. It has already been
said that IP cannot provide this. This then presents a choice. If IP is a requirement, which
transport layer should be used to provide a system that is most likely to meet real-time
constraints.
As TCP provides features such as congestion control, it would be the preferred protocol
to use. Unfortunately due to the fact that TCP is a reliable service, delays will be
introduced whenever a bit error or packet loss occurs. This delay is caused by
retransmission of the broken packet, along with any successive packets that may have
already been sent. This can be a large source ofjitter.
Combined, TCP raises jitter to an unacceptable level rendering TCP unusable for real-
time services. Voice communication has the advantage of not requiring a completely
reliable transport level. The loss of a packet or bit error will often only introduce a click
or a minor break into the output.
For these reasons most VoW applications use UDP for the voic data transmission. UDP is
a 1hia1ayexon top-of-IP that provides a-way ty auiuug multiple programs running on a
single machine. UDP also inherits all of the properties of IP that 1DP attempts to hide.
UDP is therefore also a packet based, connectionless, best-effort service. It is up to the
application to split data into packets, and provide any necessary error checking that is
required.
Because of this, UDP allows the fatest and most simple way of transmitting data to the
receiver. There is no interference in the stream of data that can be possibly avoided. This
provides the way for an application to get as close to meeting; real-time constraints as
possible.
UDP however provides no congestion control systems. A congeste4 link that is only
running TCP will be approximately fair to all users. When UDP data is intrcduced into
this link, there is no requirement for the UDP data rates to back off, forcing the rethaining
TCP connections to back off even further.
Advantages of UD?
I) UDP does not need the overhead required to detect reliability.
2) t does not need to maintain the unexpected deception of a data flow.
3) UDP requires less processing at the transmitting and receiving of hosts
4) It is simple to use for a network.
5) The operating system does not need to maintain UDP connections information.

Ans 2 c iii
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are two
protocols that run on the forth layer of OSI layers. There are many advantages of using
TCP over UDP. TCP as we know is a connection based protocol, meaning that a
connection needs to be setup before the transfer of data can start. To be able to do that
TCP has been designed with the 3-way handshake system. In this system a user who
wants to send data initializes the connection and is acknowledged by the receiving end.
Once acknowledged, the sender acknowledges the Acknowledgement, thus completing
the 3-way handshake. In this way, TCP can establish a connection.
TCP is a reliable protocol, meaning that the data that is sent is reached by the receiving
party, which is not an entity in UDP. Data packets that are lost are resent again, if the
connection fails then the data is re-requested, thus making sure that data is received at the
other end.
TCP enables data to be received in an ordered way, meaning if 5 data packets are sent,
then data packet 1 should be received before data packet 2. This doesn’t happen in UDP
which is a connection less and works on the principle of shoot the data. The working
principle of UDP is to send the dat? without taking care whether it reaches its destination
or not. The TCP protocol is considered to be a complete protocol and therefore is used
many times over in systems than the unreliable UDP.

Ans 3
The code listing for Dijkstra’s shortest path algorithm is as shown below.
DIJXSTRA.CPP
#include<stdio.h>
#inchtde<conio.h>
mt n,dist[8][8]; struct st
mt pred; mt In; char label;
}state[IO];
struct st *p=&state[o1; void main()
mt t,n,k,j,i,min,node,dis,start,end,path[ 1O clrscrQ;
prmntg”Enter no of nodes”); scanf(”%d”,&n);
for(i=l ;i<n;i++)
printf(”Enter the no of connectives for %d node”,i);
scanf(”%d”,&j);
for(k=1 ;k<j;k++)
printf(”Enter the node’); scant{”%d”,&node); prmntl{”Enter distance”);
scang”%d”,&dis);
dist[i][node]dis;
}
prmntg”Enter the name of starting node”); scanf{”%d”,&start);
prmntg”Enter the name of ending node”); scanf(”%d”,&end);
for(&state[Oj;p<&state[n];p++)
p->pred- I; p->labelE’t’; p->1n10000;
tstart; state[t].1n0; state[tJ.label=’p’; k= 1;
do
{
for(i= I ;icn;i++)
ifldist[kJ[iJ!=O && state[i].label’t’)
{
ifstate[k].ln + dist[k][iJ<state[i].ln)
state[iJ.predk;
state[i].1n=tate[kJ .ln+dist[kl [ii;
}
}
k I;
miw40000;
for(i=1 ;i<n;i++)
igstate[iJ.label==t && state[i].ln<min)
min=state[iJ.ln;
ki;
state[k].label=p;
} while(k!n); do
{path[i++]k
k=state(k].pred;
} while(k>1);
printf(”%d,min); for(j=l j<i;j++)
pnntf(”%d”,path[jj);
getchQ;
}

Ans 4 a

• Manchester encoding
• Differential Manchester Encoding
• Bipolar Encoding
• NRZ encoding

Ans 4 b
When too many packets are present in (a part of) the subnet, performance degrades. This
situation is called congestion. When the number of packets dumped into the subnet by the
hosts is within its carrying capacity, they are all delivered (except for a few that are
afflicted with transmission errors) and the number delivered is proportional to the number
sent. However, as traffic increases too far, the routers are no longer able to cope and they
begin losing packets. This tends to make matters worse. At very high traffic, performance
collapses completely and almost no packets are delivered. Congestion can be brought on
by several factors. If all of a sudden, streams of packets begin arriving on three or four
input lines and all need the same output line, a queue will build up. If there is insufficient
memory to hold all of them, packets will be lost. t
The Leaky Bucket Algorithm -
Imagine a bucket with a small hole in the bottom, as illustrated in Fig. 1(a). No matter the
rate at which water enters the bucket, the outflow is at a constant rate, 1, when there is
any water iii the bucket and zero when the bucket is empty. Also, once the bucket is full,
any additional water entering it spills over the sides and is lost

The same idea can be applied to packets, as shown in Fig. 1(b). Conceptually, each host is
connected to the network by an interface containing a leaky bucket, that is, a fmite
internal queue. If a packet arrives at the queue when it is full, the packet is discarded. In
other words, if one or more processes within the host try to send a packet when the
maximum number is already queued,
the new packet is unceremoniously discarded. This arrangement can be built into the
hardware interface or simulated by the host operating system. This algorithm is called the
leaky bucket algorithm:
The host is allowed to put one packet per clock tick onto the network. This mechanism
turns an uneven flow of packets from the user proqgsses inside the host into an even flow
of packets onto the network, smoothing out bursts and greatly reducing the chances of
ãongestion.
Main drawback of its is, the leaky bucket algorithm enforces a rigid output pattern at the
average rate, no matter how bursty the traffic is. For many applications, it is better to
allow the output to speed up somewhat when large bursts arrive, so a more flexible
algorithm is needed, preferably one that never loses data. One such algorithm is the token
bucket algorithm. In this algorithm, the leaky bucket holds tokens, generated by a clock
at the rate of one token every AT sec. For a packet to be transmitted, it must èapture and
destroy one token.
The token bucket algorithm provides a different kind of traffic shaping than that of the
leaky bucket algorithm. The leaky bucket algorithm does not allow idle hosts to save up
permission to send large bursts later. The token bucket algorithm does allow saving, up to
the maximum size• of the bucket, n. This property means that bursts of up to n packets
can be sent at once, allowing some burstiness in the output stream and giving faster
response to sudden bursts of input.
Another difference between the two algorithms is that the token bucket algorithm throws
away tokens (i.e., transmission capacity) when the bucket fills up but never discards
packets. In contrast, the leaky bucket algorithm discards packets when the bucket fills up.
Here, too, a minor variant is possible, in which each token represents the right to send not
one packet, but k bytes. A packet can only be transmitted if enough tokens are available
to cover its length in bytes. Fractional tokens are kept for future use.
The implementation of the basic token bucket algorithm is just a variable that counts
tokens. The counter is incremented by one every AT and decremented by one whenever a
packet is sent. When the counter hits zero, no packets may be sent. In the byte-count
variant, the counter is incremented by k bytes every AT and decremented by the length of
each packet sent.A potential problem with the token bucket algorithm is that it allows
large bursts again, even though the maximum burst interval can be regulated by careful
selection of p and M. It is frequently desirable to reduce the peak rate, but without going
back to the low value of the original leaky bucket.
One way to get smoother traffic is to insert a leaky bucket after the token bucket. The rate
of the leaky bucket should be higher thap the token bucket’s p but lower than the
maximum rate of the network
Ans 5

Variants of DES’
A technique that is sometimes used to make DES stronger is called whitening. It consists
of XORing a random 64-bit key with each plaintext block before feeding it into DES and
then XORing a second 64-bit key with the resulting ciphertext before transmitting it.
Whitening can easily be removed by running the reverse operations (if the receiver has
the two whitening keys). Since this technique effectively adds more bits to the key length,
it makes exhaustive seawh of the key space much more time consuming. Note that the
same whitening key is used for each block (i.e., there is only one whitening key).
Triple DES
In triple DES two keys and three stages are used. In the first stage, the plaintext is
encrypted using
DES in the usual way with K1. In the second stage, DES is run in decryption mode, using
K2 as the
key. Finally, another DES encryption is done with K1. It is illustrated in fig.2

You might also like