Вы находитесь на странице: 1из 34

CS2363-Computer Networks

1.1

Define computer network.


Computer network is a connection of autonomous computers and network devices for:
Resource sharing (data/devices) in an efficient manner
Communication amongst them.
Compare simplex and duplex communication with example.
In simplex mode, the communication is unidirectional (Eg: keyboard, monitor).
In half-duplex mode, each station can both transmit and receive, but not simultaneously
(Eg. walkie-talkie).
In full-duplex (also called duplex), both stations can transmit and receive simultaneously
(Eg. telephone network).

List the criteria based on which a network can be assessed.


Performance is based on its throughput (no. of packets delivered) and delay.
Reliability is how much the network is fault tolerant.
Security includes preventing unauthorized access and recovery from breaches.
What are the two types of line configuration?
A point-to-point connection provides a dedicated link between two nodes.
In a multipoint connection, more than two nodes share a single link, i.e., bandwidth is
shared amongst the nodes.

State any two topologies in which a network can be organized.

Mesh

Star

Bus

Ring

Mesh: Each device has a dedicated point-to-point link to every other device. It is robust
and secure. Installation is difficult and expensive n(n-1) link for n node.
Star: Each device has a dedicated point-to-point link only to a central controller called a
hub. All communication goes via the hub. It is less expensive and robust. A failure in the
hub makes the network non-functional. Eg; LAN
Bus: It is multi-point and signal gets weak as it travels through the long cable that acts as
backbone. A fault in the bus stops the entire transmission
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.2

Ring: Each device has a dedicated point-to-point connection with the devices on either
side of it. A break in the ring can disable the entire network due to unidirectional traffic.
Classify LAN, WAN, MAN, SAN and Internetwork.
Local Area Network (LAN) is privately owned and links the devices in a single office,
building, or campus. The LAN size is limited to a few kilometers. A LAN will use only
one type of transmission medium. The speed of LAN is in the range 101000 Mbps.
Wide Area Network (WAN) provides long-distance transmission of data, image, audio,
and video over large geographic areas that may comprise a country / continent.
Metropolitian Area Network (MAN) is a network with a size between a LAN and a
WAN. It normally covers the area inside a town or a city. It is designed for customers
who need a high-speed connectivity to the Internet, and have endpoints spread over a city
or part of city.
When two or more independent networks are connected, it becomes an internetwork or
internet.
Storage area network (SAN) is confined to a single room and connect the various
components of a large computing system. For example, fiber channel is used to connect
high-performance computing systems to storage servers.
List the advantages of layering.
It decomposes the problem of building a network into more manageable components.
It provides a more modular design. To add a new service, then it is only needed to modify
the functionality at one layer, reusing the functions at all the other layers.
Uses abstraction to hide complexity of network from application.
Define protocol.
The abstract objects that make up the layers of a network system are called protocols.
Each protocol defines two different interfaces.
o Service interface that specifies the set of operations
o Peer-to-peer interface for messages to be exchanged amongst peers
Protocol is a set of rules that govern communications between devices.
What is a protocol graph?
The suite of protocols that make up a network system is represented as a protocol graph.
The nodes correspond to protocols and edges represent a depends-on relation.
Define network architecture.
Set of rules governing form and content of protocol graph is called network architecture.
Network architecture guides the design and implementation of computer networks.
Two commonly used architecture are
o OSI Architecture
o Internet or TCP/IP architecture
What purpose do header and trailer serve?
A layer communicates control information to its peer, instructing it how to handle the
message when it is received by attaching a header in front of the message.
The trailer usually contains error control information.
A header/trailer is a small data structure consists of a few bytes.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.3

Brief the terms unicast, multicast and broadcast.


The different types of addressing are unicast (one-to-one communication), multicasting
(communicating to all members of a group) and broadcast (sending to all nodes on the network).
What is encapsulation.
As data passes through a layer, it attaches its header and then passes it to the next layer.
For the next layer, the data and header of the previous layer is encapsulated as a unit.
It then attaches its header and passes to the next layer and so on.
Discuss in detail about the layers of OSI model with a neat diagram.
The ISO defined a common way to connect computers, called the Open Systems
Interconnection (OSI) architecture. (eg. public X.25 network).
It defines partitioning of network functionality into seven layers.
The bottom three layers, i.e., physical, data link and network are implemented on all
nodes on the network including switches.

Physical Layer
It coordinates the functions required to carry a bit stream over a physical medium.
Representation of bitsTo be transmitted, bits must be encoded into signals, electrical or
optical. The physical layer defines the type of encoding.
Data rateIt defines the transmission rate (number of bits sent per second).
Physical topologyIt defines how devices are connected (mesh, star, ring, bus or hybrid)
to make a network.
Transmission modeThe physical layer also defines the direction of transmission
between two devices: simplex, half-duplex, or full-duplex

Data Link Layer


The data link layer transforms a raw transmission facility to a reliable link.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.4

FramingThe bit stream is divided into manageable data units called frames.
Physical addressingA header is added to contain physical address of sender and
receiver of the frame.
Flow controlIf receiving rate is less than the transmission rate, data link layer imposes
a flow control mechanism to avoid overwhelming the receiver.
Error controlRedundant information is added as trailer to detect and retransmit
damaged/lost frames and to recognize duplicate frames.
Access controlWhen two or more devices are connected to the same link, link layer
protocols determines which device has control over the link at any given time.

Network Layer
It is responsible for source-to-destination delivery of a data unit called packet.
Logical addressingThe packet is identified across the network using the logical
addressing system provided by network layer and is used to identify the end systems.
RoutingThe connecting devices (routers or switches) prepare routing table to send
packets to their destination.

Transport Layer
Transport layer is responsible for process-to-process delivery of the entire message.
Service-point addressingIt includes a service-point address or port address so that a
process from one computer communicates to a specific process on the other computer.
Segmentation and reassemblyA message is divided into transmittable segments, each
containing a sequence number. These numbers enable the transport layer to reassemble
the message correctly at the destination and to identify which were lost/corrupt.
Connection controlProtocols can be either connectionless or connection-oriented.

Session Layer
It establishes, maintains, and synchronizes interaction among communicating systems.
Dialog controlIt allows two systems to enter into a dialog and communication between
two processes to take place in either half-duplex / full-duplex mode.
SynchronizationThe session layer allows a process to add checkpoints to a stream of
data. In case of a crash data is retransmitted from the last checkpoint.
Bindingbinds together the different streams that are part of a single application. For
example, audio and video stream are combined in a teleconferencing application.
Presentation Layer
It is concerned with syntax and semantics of the information exchanged between peers.
TranslationBecause different computers use different encoding systems, the
presentation layer is responsible for interoperability between these encoding methods.
EncryptionTo carry sensitive information, a system ensures privacy by encrypting the
message before sending and decrypting at the receiver end.
CompressionData compression reduces the number of bits contained in the
information. It is particularly important in multimedia transmission.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.5

Application Layer
The application layer enables the user, whether human or software, to access the network.
It provides user interface and support for services such as electronic mail, remote file
access, shared database management and several types of distributed services.
Explain the layers of TCP/IP architecture in detail.

Features
Internet architecture is a four layered model, also known as TCP/IP architecture. It
evolved out of a packet-switched network called ARPANET.
TCP/IP does not enforce strict layering, i.e., applications are free to bypass transport
layer and can directly use IP or any of the underlying networks.
IP layer serves as focal point in the architecture.
o It defines a common method for exchanging packets to any type of network
o Segregates host-to-host delivery from process-to-process delivery.
For any protocol to be added to the architecture, it must also be accompanied by at least
one working implementation of the specification. Thus efficiency is ensured.
Layers
Subnetwork TCP/IP does not define any specific protocol for the lowest level.
o All standard and proprietary protocols such as Ethernet, FDDI, etc are supported.
o The protocols are generally implemented by a combination of hardware/software.
IP The major protocol in TCP/IP is Internetworking Protocol (IP).
o It supports the interconnection of multiple networking technologies into a logical
internetwork.
o It is an unreliable and connectionless protocol.
o IP sends data in packets called datagrams, each of which is transported separately
and independently.
o Other protocols supported in this layer are ARP, RARP, ICMP and IGMP.
Transport layer is responsible for delivery of a message from one process to another
process. The two protocols supported in this layer are:
o Transmission Control Protocol (TCP) for connection-oriented reliable bytestream channel.
o User Datagram Protocol (UDP) for connectionless unreliable datagram delivery
channel.
Application supports a wide range of protocols such as FTP, TFTP, Telnet (remote
login), SMTP, etc., that enables the interoperation of popular applications.

Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.6

Explain how framing is done using bit and byte oriented protocols.
Framing enables the message to reach the destination by adding physical address of
sender and destination.
When a message is divided into smaller frames, error affects only that small frame.
In fixed-size framing, there is no need for defining frame boundary.
In variable-size framing, receiver should be able to determine where a frame starts/ends.
BYTE-ORIENTED PROTOCOLS
. The two different approaches are sentinel and the byte-counting.
Sentinel approach
Binary Synchronous Communication (BISYNC) protocol developed by IBM.

SYN special synchronization bits indicating beginning of the frame


SOH special sentinel character that indicates start of header
Header contains physical address of source, destination and other information
STX special sentinel character that indicates start of text/body
ETX special sentinel character that indicates end of text/body
CRC 16-bit CRC code used to detect transmission error
Character stuffing
The problem with sentinel approach, is that the ETX character might appear in the data.
In such case, ETX is preceded with a DLE (data-link-escape) character.
If the data portion contains escape character, then it is preceded by another DLE.
The insertion of DLE character onto the data is known as character stuffing.
The receiver removes the additional escape characters and correctly interprets the frame.
If ETX field is corrupted, then it is known as framing error. Such frames are discarded.

Byte-Counting Approach
An alternative to detect end-of-frame is to include number of bytes in the frame body as
part of the frame header.
Digital Data Communication Message Protocol (DDCMP) uses the count approach.

The Count field specifies how many bytes are contained in the frames body.
If Count field is corrupted, then it is known as framing error. The receiver comes to know
of it when it comes across the SYN field of the next frame.

Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.7

BIT-ORIENTED PROTOCOL
The bit-oriented protocols such as High-Level Data Link Control (HDLC) view the frame
as a collection of bits. The frame format

The beginning and end of a frame has a distinguished bit sequence 01111110
Sequence is also transmitted when link is idle for synchronization
Bit Stuffing
To prevent occurrence of bit pattern 01111110 as part of frame body, bit stuffing is used.
In bit stuffing, if a 0 and five consecutive 1 bits are encountered, an extra 0 is added.
This extra stuffed bit is eventually removed from the data by the receiver.
The real flag 01111110 is not stuffed by the sender and is recognized by the receiver
If a bit such as 01111111 arrives, then an error has occurred and the frame is discarded.

Clock-based Framing
Synchronous Optical Network (SONET) standard is clock-based framing of fixed size.
SONET runs on the carrier's optical network and offers rich set of services.
A SONET STS-1 frame is arranged as nine rows of 90 bytes each, shown below

The first 3 bytes of each row are overhead, with the rest being available for data
The first 2 bytes of the frame contain a special bit pattern indicating start of frame.
Bit stuffing is not employed here
The receiver looks for the special bit pattern once in every 810 bytes. If not so, the frame
is discarded.
The overhead bytes of a SONET frame are encoded using NRZ encoding. To allow the
receiver to recover senders clock, the payload bytes are scrambled.
SONET supports the multiplexing of multiple low-speed links. The links range from
51.84 Mbps (STS-1) to 2488.32 Mbps (STS-48).
At STS-1 rates, a frame is 810 bytes long, while at STS-3 rates, each frame is 2430 bytes
long. The multiplexing of three STS-1 frame onto one STS-3 is shown
STS-N signal can being used to multiplex N STS-1 frames. The payload from STS-1
frames are linked together to form a STS-N payload, denoted as STS-Nc.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.8

How errors are introduced in the data?


Bit errors are introduced into frames because of electrical interference or thermal noise.
This interference can change the shape of the signal, i.e. bit inversion.
List the types of error with an example.
The two types of error are single-bit error and burst error
Single-bit error means that only 1 bit of a given data unit is changed. Single-bit errors are
the least likely type of error in serial data transmission.

Burst error means that 2 or more bits in the data unit have changed
The length of the burst is measured from the first corrupted bit to the last corrupted bit.

Differentiate error detection and error correction.


Error detection means using redundant information (parity bits) along with data to enable
the receiver detect whether the received data is corrupted or not. Examples are Two
dimensional parity, Internet checksum, CRC, etc. When an error is detected, the data is
discarded and a retransmission is done by the sender.
In error correction, the redundant bits are used to determine which bits are corrupted and
original data is restored by the receiver. Examples are Hamming code, Reed Solomon,
etc. No retransmission is required.
What is Vertical Redundancy Check (VRC)?
It is based on simple parity, which adds one extra bit to a 7-bit code.
The 8th bit is set to make number of 1s in the byte as even, otherwise 0.
It is used to detect all odd-number errors in the block.
0110011
01100110
0110001
01100011
What is Longitudinal Redundancy Check (LRC)?
The data bits are divided into equal segments and organized as a table.
Parity bit is computed for each column.
The resulting parity byte is appended and transmitted.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.9

Explain error detection methods in detail with example


Error detection is only to see if any error has occurred
A single-bit error or a burst error is immaterial
The basic idea behind any error detection scheme is to add redundant information to a
frame that can be used to determine if errors have been introduced.
An efficient system should have k redundant bits for n data bits such that k << n
Two-Dimensional Parity
Data is divided into seven byte segments.
Even parity is computed for all bytes (Vertical Redundancy Check).
Even parity is also calculated for each bit position across each of the bytes (Longitudinal
Redundancy Check).
Thus a parity byte for the entire frame, in addition to a parity bit for each byte is sent.

The receiver recomputes the row and column parities. If parity bits are correct, the frame
is accepted else discarded.
Two-dimensional parity catches all 1, 2 and 3-bit errors, and most 4-bit errors.
Internet Checksum
The 16-bit checksum is not used at the link layer but by the upper layer protocols (UDP).
Sender
The data is divided into 16-bit words.
The initial checksum value is 0.
All words (incl. checksum) are summed using one's complement arithmetic.
Carries (if any) are wrapped and added to the sum.
The complement of sum is known as checksum and is sent with data
Receiver
The message (including checksum) is divided into 16-bit words.
All words are added using one's complement addition.
The sum is complemented and becomes the new checksum.
If the value of checksum is 0, the message is accepted, otherwise it is rejected.

Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks
7
11
12
6
Initial Checksum
Sum
Carry
Sum
Checksum

Sender

1.10
0111
1011
1100
0110
0000
100100
10
0110
1001

Received Checksum
Sum
Carry
Sum
New Checksum

0111
1011
1100
0110
1001
101101
10
1111
0000

Receiver

Analysis
Checksum is well-suited for software implementation and is not strong as CRC.
If value of one word is incremented and another word is decremented by the same
amount, the errors are not detected because sum and checksum remain the same.
Cyclic Redundancy Check (CRC)
CRC developed by IBM uses the concept of finite fields.
A n bit message is represented as a polynomial of degree n - 1.
The message M(x) is represented as a polynomial by using the value of each bit in the
message as coefficient for each term. For eg., 10011010 represents x7 + x4 + x3+ x
For calculating a CRC, sender and receiver agree on a divisor polynomial, C(x) of degree
k such that k n 1
Sender
Multiply M(x) by xk i.e., append k zeroes. Let the modified poly be M'(x)
Divide M'(x) by C(x) using XOR operation. The remainder has k bits
Subtract the remainder from M'(x) using XOR, say T(x) and transmit T(x) with n + k bits.

Sender
Receiver
Receiver
Divide the received polynomial T(x) by C(x) as done in sender
If the remainder is non-zero then discard the frame
If zero, then no errors and redundant bits are removed to obtain data
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.11

Divisor Polynomial
The divisor polynomial C(x) should has the following error-detecting properties:
o All single-bit errors, as long as the xk and x0 terms have nonzero coefficients.
o Any burst error for which the length of the burst is less than k bits.
o Any odd number of errors, as long as C(x) contains the factor (x + 1)
The versions of C(x) widely used in link-level protocols are CRC-8, CRC-10, CRC-12,
CRC-16, CRC-CCITT and CRC-32.
CRC algorithm is implemented in hardware using a k-bit shift register and XOR gates.
CRC is widely used in networks such as LANs and WANs.

Define flow control.


Flow control is a set of procedures that tells the sender how much data it can transmit
before it must wait for an acknowledgment from the receiver.
It prevents a fast sender from overwhelming a slow receiver with frames.
Define acknowledgement.
An acknowledgment (ACK) is a small control frame that a protocol sends back to the
sender acknowledging the receipt of a frame.
Frames are delivered in a reliable manner using acknowledgement
What is automatic repeat request?
When a corrupt frame arrives at the receiver, it is discarded.
If the sender does not receive an acknowledgment within a specified period (timeout), it
retransmits the original frame. This is known as automatic repeat request (ARQ).
The two ARQ are Stop and Wait ARQ and Sliding Window ARQ
Explain various flow control mechanism or reliable transmission
Stop and Wait ARQ
The sender keeps a copy of the frame and then transmits it.
The sender waits for an acknowledgment before transmitting the next frame.
If acknowledgment does not arrive before timeout, the sender retransmits the frame.

Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.12

Scenarios
a) ACK is received before the timer expires. The sender sends the next frame.
b) The frame gets lost in transmission. Sender eventually times out and retransmits frame.
c) ACK frame gets lost. The sender eventually times out and retransmits the frame.
d) The sender times out soon before ACK arrives and retransmits the frame.
Sequence number
In scenarios (c) and (d), since the receiver has acknowledged the received frame, it treats
the arriving frame as the next one. This leads to duplicate frames.
To address duplicate frames, the header for a stop-and-wait protocol includes a 1-bit
sequence number (0 or 1) based on modulo-2 arithmetic.

Drawbacks
It allows the sender to have only one outstanding frame on the link at a time
Inefficient if the channel has a large bandwidth and the round-trip delay is long.
Sliding window
To improve efficiency, multiple frames must be in transition while waiting for an
acknowledgment. Sliding window protocol makes this possible.

The window defines range of sequence numbers for both sender and receiver to deal with.
The window position change (slides) due to transmission of frame and acknowledgement
Sender
The sender assigns a sequence number SeqNum to each frame.
A timer with each frame it transmits, and retransmits the frame on timeout.
It maintains three state variables:
o The send window size SWS gives the upper bound on the number of outstanding
frames that the sender can transmit.
o LAR denotes the sequence number of the last acknowledgment received.
o LFS denotes the sequence number of the last frame sent.
o The invariant LFS LAR SWS is always maintained
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.13

When an acknowledgment arrives, the sender moves LAR to the right, thereby allowing
the sender to transmit the subsequent frames.
The sender buffers up to SWS frames (for retransmission), until they are acknowledged.
Receiver
Similarly the receiver maintains three state variables:
o The receive window size RWS gives the upper bound on number of out-of-order
frames that the receiver is willing to accept.
o LAF denotes acceptable frame with the largest sequence number
o LFR denotes sequence number of the last frame received
o The invariant LAF LFR RWS is always maintained.

A frame numbered SeqNum is accepted if LFR < SeqNum LAF, otherwise discarded.
Frames can arrive out of order and may be buffered.
If all frames, say with sequence number
SeqNumToAck have arrived, the receiver
acknowledges frame SeqNumToAck. The variables updated are:
o LFR = SeqNumToAck
o LAF = LFR + RWS
Window size
SWS depend on how many frames are expected to be outstanding on the link. It is based
on delay bandwidth product.
RWS is either set to 1 or the value of SWS.
o If RWS = 1, then receiver does not buffer frames.
o If RWS = SWS, receiver buffers out-of-order frames, but does not acknowledge.
Example

Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.14

Lost/Corrupt frames
When frames are lost or corrupt, there is less data in transit, since the sender cannot
advance its window without an acknowledgement.
The receiver acknowledges a frame, only if all lower numbered frames have arrived. The
acknowledgement is cumulative.
The receiver buffers out of order frames but does not acknowledge.
It sends a negative acknowledgement (NAK) indicating to the sender to retransmit the
expected frame.
NAK speeds up retransmission of a frame before timer expires and improves performance.

Sequence Number
Sequence numbers are modulo 2m where m is the size of the sequence field in bits.
Sequence numbers wrap around and MaxSeqNum denotes number of available sequence
numbers.
To avoid the issue of identifying sequence numbers of different sets, SWS is defined as
SWS < (MaxSeqNum + 1) / 2
Advantages
It delivers frames reliably across an unreliable link using timeout and acknowledgement.
It preserves the order in which frames are transmitted. The receiver ensures that it does
not pass a frame to the upper layer until all lower numbered frames are passed.
It supports flow control. The receiver through acknowledgement informs the sender about
how many frames it can still receive.
Distinguish between Stop & Wait and Sliding window protocol.
Only one frame could be outstanding in Stop-and-Wait, whereas multiple frames can be
outstanding in sliding window, i.e., improved efficiency.
The Stop-and-Wait ARQ protocol is a special case of sliding window in which the send
window size is 1.
Frames are numbered as modulo-2m in sliding window whereas it is sequenced as
modulo-2 in stop and wait protocol.
What is concurrent logical channel?
When more than one logical channel is multiplexed onto a single point-to-point link is
known as concurrent logical channel.
Stop and wait is run on each of these logical channels.
The sender maintains 3-bit state information namely whether busy, sequence number of
next frame and sequence number of next frame expected.
When a node has frame to send, it is sent on the lowest idle channel.

Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.15

Explain the factors that affect performance of the network.


Bandwidth and Latency
Performance of a network is measured in terms of bandwidth and latency.
Bandwidth refers to number of bits that can be transmitted over the network within a
certain period of time (throughput).
Bandwidth also determines how long it takes to transmit each bit. For example, each bit
on a 1-Mbps link is 1s wide, while each bit on a 2-Mbps link is 0.5s wide

Bandwidth is also based on how many times the software that implements the channel has
to handle.
Latency refers to how long it takes for the message to travel to the other end (delay). It is
a factor of propagation delay, transmission time and queuing delay
Latency = Propagation + Transmit + Queue
Propagation = Distance / SpeedOfLight
Transmit = Size / Bandwidth
o Speed of light propagation varies on medium (2.3 108 m/s in copper, 2.0 108
m/s in optical fiber) and distance.
o Transmission time depends upon bandwidth and packet size
o Queuing delay occurs at switches and routers.
Round Trip Time (RTT) is a two-way latency.
For applications that have minimal data transfer, latency dominates performance and for
bulk data transfers, bandwidth dominates performance.
Delay Bandwidth Product

Consider a pipe, in which bandwidth is given by diameter and delay corresponds to


length of the pipe.
The delay bandwidth product specifies the number of bits in transit. It corresponds to
how much the sender should transmit before the first bit is received at the other end.
If receiver signals the sender to stop, it would still receive RTT bandwidth of data.
For example, for a cross-country fiber with 10 Gbps bandwidth, distance of 4000 km, the
RTT is 40 ms and RTT bandwidth is 400 Mb.
High Speed Networks
High speed networks enhances the bandwidth for applications but latency remains fixed.
For example, when a 1 MB file is transmitted over a 1 Mbps link takes 80 RTTs, whereas
the same file over a 1 Gbps links falls short of 1 RTT.
Effective end-to-end throughput that can be achieved is given as
Throughput = TransferSize / TransferTime
TransferTime includes latency as well as setup time. It is computed as
TransferTime = RTT + 1/Bandwidth TransferSize
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.16

Application Performance Needs


Applications generally require as much bandwidth provided by the network.
Some applications such as video, specify an upper limit on bandwidth required.
Video streams are generally compressed but the flow rate varies due to details,
compression algorithm used, etc. The average bandwidth could be determined, but
instantaneous bursty traffic should be accounted for.
In some cases, the latency varies from packet to packet, known as jitter. Suppose that the
packets being transmitted over the network contain video frames, the receiver will not be
able to display, if a frame arrives late. If the receiver knows the latency that packets may
experience, then it can delay playing first frame of the video. Thus jitter factor is
smoothened out by buffering.

Give the format of a PPP frame and explain its fields.

The Point-to-Point Protocol (PPP) is used to carry packets over point-to-point links.
The flag field contains special character 01111110
The protocol field is used for multiplexing.
The payload is 1500 bytes by default.
Discuss the properties of various links or physical medium used to transmit data.
Important link characteristic is the frequency and is measured in hertz.
Distance between the adjacent pair of maxima or minima of a wave measured in meters is
called wavelength.
Network links are implemented on either guided (wired) or unguided (wireless) media.
Guided Medium
The guided media is broadly classified into Twisted-pair, Coaxial and Fiber-optic cable
Twisted-Pair Cable
The least-expensive and most commonly-used transmission medium is twisted-pair.
The copper wires are twisted together to reduce the electrical interference.
Twisted-pair cables are either shielded (STP) or unshielded (UTP).
UTP cable is classified into categories (CAT 1-6). Common UTP connector used is RJ45.
UTP cable suffers from attenuation and need repeaters for long distance transmission.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.17

Coaxial Cable
Coaxial cable carries signals of higher frequency ranges but has higher attenuation.
Coaxial connectors such as BNC/ BNC-T connector, and BNC terminator are used.
Coaxial cables are categorized by their radio government (RG) ratings.
Coaxial cable is used to provide connection to user premises as it requires narrow
bandwidth and is cost-effective.
Fiber-Optic Cable
A fiber-optic cable transmits signals in the form of light and use property of reflection.
Fiber-optic supports two modes: multimode and single mode.
Attenuation is much lesser, supports higher bandwidth and longer transmission distance.
Fiber-optic cables are immune to interference and corrosive-resistant.
Two fiber-optic cables are required for duplex communication (light is unidirectional)
Cable
CAT-5 UTP
Thin-net coax
Thick-net coax
Multimode ber
Single-mode ber

Bandwidth
10100 Mbps
10100 Mbps
10100 Mbps
100 Mbps
0.110 Gbps

Max Distance
100m
200m
500m
2 km
40 km

Unguided Media
Unguided media transport signals through free space.
It can be broadly classified as Radio waves, Micro waves and Infrared.
Signals can travel through ground, sky or line-of-sight propagation.
The spectrum pertaining to radio waves and microwaves is divided into bands, regulated
by government authorities. It ranges from very low to extremely high frequency.

Radio Waves
The frequency range is 3 kHz 1 GHz.
Radio waves are omni-directional and are susceptible to interference by another.
Radio waves that propagate in the sky mode, can travel long distances and is used for
long-distance broadcasting such as AM radio.
Radio waves of low and medium frequencies can penetrate walls and used in FM radio,
maritime radio, cordless phone, paging, etc.
Microwaves
Microwaves have frequencies between 1 and 300 GHz.
Microwaves are unidirectional. Hence sending and receiving antennas should be aligned.
Microwave propagation is line-of-sight.
They are used in cellular phone networks, satellite networks, and wireless LANs.
Infrared
Infrared waves frequencies ranges from 300 GHz to 400 THz.
It can be used for short-range communication only within a closed space.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.18

IrDA has established standards for communication between devices such as keyboards,
mouse, PCs, and printers.
Infrared signals transmit through line of sight with very high data rate of transmission.
Last mile links
If two nodes to be connected are on opposite sides of the country/town, then last-mile
links that span from the home to a service provider is used. Some are:
Service
POTS
ISDN
xDSL

Bandwidth
28.856 Kbps
64128 Kbps
128 Kbps100 Mbps

Briefly explain the various encoding mechanisms


Binary data from the source host is encoded into signals so as to propagate over the link.
Network adaptor encodes bits into signals and is decoded at the other end
Encoding is the process of mapping bit 1 to a high signal and bit 0 to a low signal
respectively.
Various encoding schemes are NRZ, NRZI, Manchester and 4B/5B.
Non-Return to Zero (NRZ)
In NRZ, normal encoding is done, i.e. 1 as high signal and 0 as low signal.
Receiver keeps an average of signals received so far and uses it to distinguish incoming
signal.
Incoming signal lower than the average is decoded as 0, whereas those above are 1.
Consecutive 1s or 0s changes the average and hence becomes difficult to detect a
significant change in the incoming signal. This is known as baseline wander.
Frequent transitions from high to low and vice-versa are required for clock recovery.
Sender and receiver clock have to be precisely synchronized for correct decoding.
Non-Return to Zero Inverted (NRZI)
In NRZI, sender makes a transition from the current signal to encode a 1, otherwise it
stays at the current signal for 0.
NRZI solves the problem of consecutive 1s faced in NRZ, but consecutive 0s remain
unresolved.

Manchester
In Manchester, XOR of the clock and NRZ-encoded data is transmitted.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.19

0 is encoded as low-to-high transition and 1 is encoded as high-to-low transition.


The rate at which signals change is called baud rate. Manchester, doubles the rate of
signal transitions i.e., half baud rate.
Efficiency is 50% since the receiver has only half the time to detect each signal pulse.
4B/5B
In 4B/5B, extra bits are inserted to break sequence of long 0s and 1s.
Every 4 bits of data is encoded as a 5-bit code and transmitted, hence the name 4B/5B.
5-bit codes are selected in such a way that each one has no more than one leading 0 and
no more than two trailing 0s.
No pair of 5-bit codes results in more than three consecutive 0s.
Only 16 codes are used for data, others for special purposes such as line idle (11111),
line dead (00000), etc. Some 4B/5B codes are:
4-Bit Data
0000
0001
0101
1111

5-Bit Code
11110
01001
01011
11101

What is CSMA.
In Carrier Sense Multiple Access (CSMA), each station first checks state of the medium
using one of the persistence methods before sending.
The possibility of collision still exists because of propagation delay. When a station sends
a frame, it takes time for the first bit to reach every station.
Define persistent methods 1-persistent, non-persistent and P-persistent.
1-Persistent
When a station finds the line idle, sends its frame immediately (with probability 1).
This method has the highest chance of collision because two or more stations may find
the line idle and send frames immediately.
Non-persistent
When a station senses the line to be idle, it sends immediately.
If the line is not idle, it waits a random amount of time and then senses the line again.
Reduces collision since it is unlikely that stations will wait same amount of time and retry
Less efficient because the medium remains idle when there may be frames to send.
p-Persistent
This method is used if channel has time slots equal to propagation time.
Reduces collision and improves efficiency.
With probability p, station transmits frame, else waits for next time slot and checks again.
If the line is busy, back off procedure is adopted.
Explain IEEE 802.3 standard or Ethernet in detail.
Ethernet is standardized as IEEE 802.3
Standard Ethernet is the most successful LAN technology with a data rate of 10 Mbps.
It has evolved to Fast Ethernet (100 Mbps), Gigabit Ethernet (1 Gbps) and Ten-Gigabit
Ethernet (10 Gbps).
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.20

Physical Properties

Hosts are tapped on to the Ethernet segment, each at least 2.5 m apart.
Transceiver is responsible for transmitting/receiving frames and collision detection.
Protocol logic is implemented in the adaptor.
Ethernet can support a maximum of 1024 hosts.
Maximum length of ethernet is 2500 m.
Ethernet segments are connected using repeater.
Manchester encoding scheme is used and digital signaling (baseband) at 10 Mbps.
Various forms of Standard Ethernet are 10Base5, 10Base2, 10Base-T & 10Base-F.
o 10Base5 or Thick Ethernet uses thick coax cable (up to 500 m) with bus topology.
o 10Base2 or Thin Ethernet uses thin coax cable (up to 200 m) with bus topology.
o 10BaseT (Twisted-Pair) uses CAT-5 cable (up to 100 m) with star topology.
o 10BaseF (Fiber) uses fiber-optic cable (up to 2000 m) with star topology.
Access Protocol
Medium Access Control (MAC) regulates access to the shared Ethernet link.
Frame Format

Preamblecontains alternating 0s and 1s that alerts the receiving system and enables it
to synchronize its input timing.
Destination addresscontains physical address of the destination host.
Source addresscontains the physical address of the sender.
Type/LengthIt may contain either type of the upper layer protocol or frame length.
Datacarries data (461500 bytes) encapsulated from the upper-layer protocols.
CRCcontains error detection information (CRC-32).
Addressing
Each host on the Ethernet network has its own network interface card (NIC).
NIC provides a globally unique 6-byte physical address (in Hex for readability).
If LSB of the first byte in a destination address is 0, then it is unicast else multicast. In
broadcast address, all bits are 1s.
Transmitter
Ethernet is a working example of CSMA/CD.
Minimum frame length (64 bytes) is required for operation of CSMA/CD.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.21

Signals placed on the ethernet propagate in both directions and is broadcasted.


Ethernet is said to be a 1-persistent protocol. When the adaptor has a frame to send:
o If line is idle, it transmits the frame immediately.
o If line is busy, it waits for the line to go idle and then transmits immediately.
It is possible for two (or more) adaptors to begin transmitting at the same time.
o In such cases, frames collide
o A 96-bit runt frame (64-bit preamble + 32-bit jamming sequence) is sent and
transmission is aborted.
Retransmission is attempted after a back-off procedure (k 51.2s). After 16 attempts,
retransmission is given up.
Receiver
Each frame transmitted on an Ethernet is received by every adaptor on that network.
Adaptor accepts the frame with destination address if it matches its address, broadcast
address (all 1s), multicast address, if it's part of that multicast group.
Frames are discarded, if it is not meant for that host.
Accepts all frames, if configured to run in promiscuous mode.
Ethernet does not acknowledge received frames.
Analysis
Easy to administer, maintain and relataively inexpensive.
Produces better output only under lightly loaded conditions.
It is an unreliable medium.
Why the minimum frame length in Ethernet should be at least 64 bytes?
Consider the following worst case scenario in which hosts A and B are at either ends.

Host A begins transmitting a frame at time t.


It takes link latency d for the frame to reach host B. Thus, the first bit of As frame arrives
at B at time t + d.
Suppose an instant before host As frame arrives, B senses it idle line, host B begins to
transmit its own frame.
Bs frame will immediately collide with As frame, and this collision will be detected by
host B. Host B will send the 32-bit jamming sequence.
Host A will not know that the collision occurred until Bs frame reaches it at time t + 2d.
On a maximally configured Ethernet, round-trip delay is 51.2s, i.e., 512 bits (64 bytes).
List the function of a repeater?
A repeater is a device that connects LAN segments and extends length of the LAN.
A repeater reconstructs the received weak signal to its original strength and forwards it on
all outgoing segments.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.22

Utmost four repeaters can be placed between a pair of hosts.


It operates in the physical layer.
Explain in detail about token ring or IEEE 802.5
Token ring was developed by IBM and later became standard IEEE 802.5
Stations are connected in a ring-based topology.
A small frame called token circulates around the ring in a unidirectional way.

Physical Properties
Each station is connected to the ring using an electromechanical relay.
o When the station is healthy, relay is open and the station is included in the ring.
o If the station goes down, relay closes and the ring bypasses the station.
Multiple relays packed in a single unit is known as a multi-station access unit (MSAU).
MSAU makes it easy to add and remove stations from the network
Twisted-pair is widely used as physical medium with differential manchester encoding.
Maximum of 250 stations can be included in the ring with data rate of 4 / 16 Mbps.

Token Ring MAC


Frame Format

Start/End delimiter contains Manchester codes that indicates start/end of a frame


Access control includes 3 priority bits (P) and 3 reservation bits (R). The T bit indicates
whether the frame is token or data. M is monitor bit.
Frame control is a demux key that identifies the higher-layer protocol
Destination and Source address contains 6 bytes of source and destination address
Checksum is a 32-bit CRC used for error detection
Frame status Contains address recognized (A) and frame-copied (C) bits
Token frame is a 3-byte (24 bits) frame containing the first three fields.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.23

Frame Transmission
Adaptor contains a transmitter, receiver and data storage.
Station that has data to send seizes the token and transmits data frames.
Each station checks the data frame to see if it is the recipient, as frame passes through. If
so, it copies the frame before forwarding.
Eventually sender removes its data frame and inserts a new token onto the ring.

Token Holding Time (THT) specifies how long a station is allowed to hold the token
(default 10 ms).
Token Rotation Time (TRT) is the amount of time taken by the token to traverse the ring
TRT ActiveNodes THT + RingLatency
Reliable delivery is provided with recipient node sets A and C bit after copying the frame.
Token ring supports different levels of priority by 3-bit priority and reservation field.
o Station can seize the token, only if its frame priority token priority
o A station with higher priority frames to transmit than current frame can reserve
the next token.
o After transmitting priority frames, the station restores the original token priority.
Monitor
Token rings have one of the stations designated as a monitor.
Monitor watches for a passing token every TRT. If it fails to see, it inserts a new token.
Monitor periodically announces its presence with a special control message.
If a station fails to see monitor's message for some period, it transmits a claim frame
o If that token circulates back to itself, then the station becomes monitor.
o If more than one station competes to become monitor, then highest address wins.
Removes corrupt frames that circulate infinitely and inserts a token.
Checks for orphaned frames by using the M bit and is removed from the ring
Dead stations are detected by sending a beacon frame to the suspect destination..
Distinguish between early and delayed release?
The sender can insert the token back onto the ring immediately following its frame (early
release) or after the frame it transmits gets back to it (delayed release).
Early release allows better bandwidth utilization.

Early release
Vijai Anand

Delayed release
cseannauniv.blogspot.com

CS2363-Computer Networks

1.24

Compare Ethernet and Token ring.


There is bidirectional data flow in Ethernet, whereas in token ring it is unidirectional.
Medium in both Ethernet and Token ring is shared.
All stations see all frames in both Ethernet and Token ring.
Medium access by a station is controlled in Token ring, whereas in Ethernet it is random.
Discuss the various aspects of FDDI in detail.
Physical Properties
Fiber Distributed Data Interface (FDDI) network consists of two independent rings
primary and secondary, designed to transmit data in opposite directions.
The secondary ring is used to transmit data, only if the primary fails.
FDDI network is fault tolerant to a single link or station failure.

Normal operation

Failure of primary ring

Since dual rings are expensive, FDDI also allows stations to be connected to the network
by means of a single cable. Such stations are known as single attachment station (SAS).
Dual cable connected stations are called dual attachment stations (DAS).
A concentrator is used to attach several SAS to the dual ring.
Concentrator detects failure of any SAS and isolates it using optical bypass.

FDDI is a 100-Mbps network with fiber-optic cable being the physical medium.
FDDI network can have 500 stations with a max. distance of 2 km between stations.
FDDI uses 4B/5B encoding.
Network is limited up to 200 km of fiber (actually 100 km due to dual nature of ring).
FDDI MAC
Frame Transmission
A station after data transmission releases a new token immediately (early release).
Intended recipients set A and C bit after copying frame. E bit is set, if an error is detected.
FDDI has neither priority nor reservation mechanism to capture a token.

Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.25

Timed Token Algorithm


All stations agree to a Target Token Rotation Time (TTRT) to ensure that all stations get
an opportunity to transmit within a TTRT.
Each station measures the time between successive arrivals of token, say measured TRT.
If a station's measured TRT > TTRT,
o then token is late, and station does not transmit any data.
o otherwise the token is early and the station is allowed to transmit data.
FDDI defines two classes of traffic, synchronous (delay sensitive) and asynchronous
(throughput-based).
o A station is allowed to send synchronous data, irrespective of token arrival.
o A station can send asynchronous traffic, only when the token is early.
Token Maintenance
All stations on an FDDI monitor the ring to ensure that the token has not been lost.
Each station sets its valid transmission timer to 2.5 ms after seeing a data / token frame.
On timeout, the station transmits a claim frame with station's TTRT estimate.
When a station receives a claim frame, it compares TTRT claim with its own estimate
and whichever better is forwarded.
Write short notes on RPR.
Resilient Packet Ring (RPR) is standardized as IEEE 802.17
Like FDDI, RPR has two optic-fiber rings, but uses bandwidth of both rings during
normal operation
Buffer insertion technique is used in RPR, instead of token.
A node can transmit, when there are no other frames to be forwarded.
Incoming frames are buffered during its own frame transmission.
RPR supports three QoS classes:
o Class A provides low latency and low jitter (e.g., phone calls)
o Class B provides predictable latency and jitter (e.g., prerecorded multimedia)
o Class C provides a best-effort transport
RPR uses wrapping and steering mechanisms to recover from a link / node failure.
In steering, nodes adjacent to a link failure, steers the frames in another path to the
destination.
Compare the features of various rings.
Description
No. of rings
Physical medium
Vijai Anand

Token Ring
Single
Twisted-pair cable

FDDI
Double
Fiber-optic cable

RPR
Double
Fiber-optic cable
cseannauniv.blogspot.com

CS2363-Computer Networks

Encoding
Data rate
Max. stations
Inactive station / link
Attachment of
stations
Priority/Reservation
Token release
Ring maintained by

Manchester code
16 Mbps
250 stations
Electro-mechanical
relay
Multiple Station
Access Unit
Yes
Delayed release
Monitor

1.26

4B/5B code
100 Mbps
500 stations
Optical bypass

Wrapping and
steering

Concentrator
No
Early release
All stations

No token

Write short notes on Bluetooth


Bluetooth technology, standardized as IEEE 802.15.1 is a personal area network (PAN).
It is used for short-range wireless communication (maximum 10 m) between mobile
phones, PDAs, notebook and other peripheral devices.
Bluetooth operates in 2.45 GHz with data rate up to 2.1 Mbps
Bluetooth Special Interest Group has specified a set of profiles for a range of application.
Bluetooth network is known as piconet. A piconet can have up to eight stations, one of
which is called the master and the rest are called slaves.
Slaves do not directly communicate with each other, but via the master.
Bluetooth uses synchronous time division multiplexing (STDM), i.e., master transmits in
odd-numbered slots, whereas slave transmits to master in even-numbered slots.
Slaves in parked or inactive state cannot communicate, until it is activated by the master.
Maximum of 255 devices can be in parked state.

Piconet
Define spread spectrum.
In spread spectrum, the signal is spread over a wider frequency band to minimize
interference. The two types are frequency hopping and direct sequence.
In FHSS, signal is transmitted over a set of frequencies computed by a pseudorandom
generator. Receiver uses the same algorithm and seed, thereby are synchronized.
In DSSS for each data bit, the sender transmits the XOR of that bit and n random bits
selected by a pseudorandom number generator, known to the receiver also.
Only the intended receiver can interpret the signal. For other nodes, it appears as a noise.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.27

Explain the functioning of wireless LAN or IEEE 802.11 in detail


Wireless LAN or WLAN or WiFi is designed for use in a limited geographical area
(office, campus, building, etc).
Physical Properties
WLAN runs over physical media based on spread spectrum (frequency hopping over 79
1-MHz-wide frequency bandwidth and direct 11-bit chipping sequence).
802.11b runs in 2.4 GHz band with a data rate of 11 Mbps.
802.11a/g runs in 5-GHz band using orthogonal FDM with a max rate of 54 Mbps.
Commercial products support all three versions for compatibility.
Collision Avoidance
Collision detection is not feasible, since all nodes are not within the reach of each other.

Hidden Node

Exposed Node

Hidden Node
Suppose node B is sending data to A. At the same time, node C also wishes to send to A.
Since node B is not within the range of C, C finds the medium free and transmits to A.
Frames from nodes B and C sent to A collide with each other.
Thus nodes B and C are hidden from each other.
Exposed Node
Suppose node A is transmitting to node B and node C has some data to be sent to node D.
Node C finds the medium busy, since it hears the transmission from node A and refrains
from sending to node D, even though its transmission to D would not interfere.
Thus node C is exposed to transmission from node A to B
Multiple Access with Collision Avoidance (MACA)
In MACA, sender and receiver exchange short control frames to reserve access, so that
nearby nodes avoids transmission during duration of the data frame.
Control frames used to avoid collision are Request to Send (RTS) and Clear to Send (CTS).
Sender sends RTS frame to the receiver containing sender/receiver address and
transmission duration.
Nodes that receive RTS frame are close to sender and wait for CTS to be transmitted back.
Receiver acknowledges and sends a CTS frame containing sender address and duration.
Nodes that receive CTS remain silent for the upcoming data transmission.
Nodes that receive RTS but not CTS, is away from the receiver and is free to transmit.
Receiver sends an ACK frame to the sender after successfully receiving a data frame.
If RTS frames from two or more nodes collide, then they do not receive CTS. Each node
waits for a random amount of time and then tries to send RTS again (back-off procedure).
Distribution System
In wireless network, nodes are mobile and the set of reachable nodes change with time.
Mobile nodes are connected to a wired network infrastructure called access points (AP)
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.28

Access points are connected to each other by a distribution system (DS) such as ethernet.

Nodes communicate directly with each other if they are reachable (eg, A and C)
Communication between two nodes in different APs occurs via two APs (eg, A and E)
The technique for selecting an AP is called active scanning. It is done whenever a node
joins a network or switches over to another AP.
o The node sends a Probe frame.
o All APs within reach reply with a Probe Response frame.
o The node selects one of the APs and sends an Association Request frame.
o The AP replies with an Association Response frame
APs also periodically send a Beacon frame that advertises its features such as
transmission rate. This is known as passive scanning.
Frame Format

Control contains subfields that includes 6-bit frame type i.e., management, control
(RTS, CTS, ACK) or data, and pair of 1-bit fields ToDS and FromDS.
Duration specifies duration of frame transmission.
Addresses The four address fields depend on value of ToDS and FromDS subfields.
ToDS FromDS
0
0

Addr1
Destination

Destination

Receiving
AP
Receiving
AP

Addr2
Source
Sending
AP
Source
Sending
AP

Addr3

Addr4

Description
Sent directly
Frame is coming from
Source
a distribution system
Frame is going to a
Destination
distribution system
Frame is going from
Destination Source
one AP to another AP

Sequence Control defines sequence number of the frame to be used in flow control.
Payload contains a maximum of 2312 bytes.
CRC contains CRC-32 error detection sequence.
Compare the different wireless technologies.
Prominent wireless technologies are bluetooth, Wi-Fi, WiMAX and 3G cellular.

Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

IEEE standard
Link length
Bandwidth
Usage

Bluetooth
802.15.1
10 m
2.1 Mbps
Link a peripheral
to a notebook
computer

1.29

WiFi
802.11
100 m
54 Mbps
Link a notebook
computer to a
wired base

WiMax
802.16
10 km
70 Mbps
Link a building
to a wired tower

3G
Tens of km
384 Kbps
Link a cell phone
to a wired tower

What is a switch and its function?


A switch is a multi-input, multi-output device, receives packets on one of its links and
transmits them on one or more other links. This is known as switching or forwarding
Large networks can be built by interconnecting a number of switches.
Hosts are connected to the switch using point-to-point link.
Bring out the differences between circuit and packet switching.
Circuit switching
Packet switching
Source and destination host are physically No such physical connection exists
connected
Switching takes place at the physical layer
Switching takes place at network (datagram) or
data link layer (VCN)
Resources such as bandwidth, switch buffer & Resources are allocated on demand
processing time, are allocated in advance.
Resources remain allocated for the entire Resources can be reallocated when idle. i.e.,
duration of data communication.
improved efficiency.
There is no delay during data transfer.
Delay exists at each switch during data transfer
Data transferred between the two stations is a Data is transferred as discrete packets
continuous flow of signal
Example: Telephony
Example: Internet
Explain the different switching techniques in detail.
Datagram
Datagram is referred to as connectionless network, with switching done at network layer.
Message is divided into packets.
Resources such as bandwidth are not reserved for a packet but allocated on demand. The
lack of reservation creates delay.
Each packet is routed independently. Packets belonging to same message may travel
different paths to reach their destination.
Packets can arrive out of order or may also be dropped due to lack of resources.
A switch or link failure does not have adverse effect.
Routing table
Each switch has a routing table that contains destination address and output port.
When a switch examines a packet, the destination address is looked-up in the routing
table to determine the corresponding port, onto which the packet is forwarded.
Routing table is dynamic and is updated periodically.

Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.30

Routing table for Switch 2


Virtual Circuit Switching
A virtual-circuit network (VCN) is a connection-oriented model. A virtual connection
from source to the destination is established before any data is sent.
Each switch contains VC table with each entry containing incoming port, incoming VCI,
outgoing port and outgoing VCI.
A Virtual Circuit Identifier (VCI) uniquely identifies a connection. It is a small number
with link local scope. The incoming and outgoing VCI is always distinct.
The combination of a packet's VCI and the interface on which it was received, uniquely
identi es the virtual connection.
Connection state can be set either by the network administrator (permanent) or by the
hosts through signaling (switched).
VCN is implemented in the data link layer.

Setup Request

Acknowledgement

Setup Request
Switch 1 receives connection setup request frame from host A.
o It knows that frames for host B should be forwarded on port 3.
o The switch creates an entry in its VC table for the new connection with incoming
port=1 and outgoing port=3.
o Chooses an unused VCI for frames to host B, say 14 as incoming VCI.
o The outgoing VCI is unknown (left blank) and the frame is forwarded to switch 2.
Similarly entries are made at other switches as frame is forwarded to destination.
Destination B accepts the setup request frame, if it is ready to receive frames from host A.
Assigns an unused VCI, say 77, for frames that come from host A.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.31

Acknowledgment
Host B sends an acknowledgment to switch 3.
o The ACK frame carries source & destination addresses and chosen VCI by host B.
o Switch 3 uses this VCI, i.e., 77 as outgoing VCI and completes VC table entry.
Finally switch 1 sends an acknowledgment to source host A containing VCI as 14.
Source host A uses 14 as its outgoing VCI for data frames to be sent to destination B.
Source Routing
All information about network topology that is required to route a packet across the
network to the destination is provided by the source host.
Header contains ordered list of intermediate hosts, through which packet must traverse.
For each packet, the header carries a pointer to the current next port entry, with each
switch just updates the pointer.
Source routing can be used in both datagram and virtual circuit networks.

Define bridge.
Bridge is a two-layered switch used to forward frames between shared-media LANs such
as Ethernet.
A bridge is a multi-input, multi-output node between two LANs that runs in promiscuous
mode, accepts frames transmitted from either sides and forwards them to the other.
What is static bridge?
Bridge is configured with a forwarding table during setup by the administrator manually.
When a frame arrives, the bridge performs a look-up on the table.
Outgoing port for the destination is obtained and the frame is sent on that port.
The table must be updated manually when stations are added or removed.
Explain with an example how learning bridge builds its forwarding table dynamically.
Learning bridges builds forwarding table gradually by learning from frame movements.
The table is empty when the bridge boots up.
The bridge uses source address to add entries and destination address to forward frames.
The source address and incoming port is appended to the table, if an entry does not exist.
The table is looked up for destination address:
o If source and destination are from same LAN, then the frame is dropped, since
destination host would have already received the frame.
o If an entry exists, then frame is forwarded on the corresponding port.
o Otherwise, the frame is flooded on all other ports.
Learning process continues as bridge forwards frames and optimizes forwarding decision.
The table is discarded periodically and rebuilt.
Example
When station A sends a frame to station D:
o The bridge has no entry for either station D or A
o From source address, the bridge learns that station A is located on the LAN
connected to port 1, i.e., frames destined for A must be sent out through port 1.
o The bridge appends entry to the table and floods the frame on all other ports.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

Bridged network

1.32

Forwarding Table

When station E sends a frame to station A:


o The bridge has an entry for station A, so it forwards the frame only to port 1.
o It adds source address of the frame, i.e., E, to the table.
When station B sends a frame to station C:
o The bridge has no entry for station C.
o It floods the network and adds one more entry to the table.
Loop Problem
Learning bridge works fine as long as there is no loop.
Loops are formed when redundant bridges are introduced to improve reliability.
When loop exists, multiple copies of the frame exists as they are flooded by bridges.
IEEE 802.1 mandates bridges to use spanning tree algorithm to create loopless topology.
Explain the working of spanning tree algorithm with an example.
Extended LAN is represented as a graph, which may contain loops.
Spanning tree algorithm creates a sub-graph that has no loops, i.e., each LAN can be
reached from any other LAN through one path only.
Each bridge decides the ports on which it is willing to forward frames.
o Some ports are removed, reducing the extended LAN to an acyclic graph.
Spanning tree algorithm is dynamic, i.e., bridges reconfigure the spanning tree due to
some failure or additions or deletions.
Algorithm
Each bridge has a unique identifier.
Bridges exchange configuration message (Y, d, X) with each other, known as bridge
protocol data unit (BPDU) to decide on root/designated bridge, where:
o Y is id of the root bridge according to sending bridge.
o d is the distance in hops from sending bridge to root bridge.
o X is id of the bridge that is sending the message.
The system stabilizes in a while, with the selection of root bridge and designated bridges.
o Thereafter, root bridge alone generates configuration messages.
o The designated bridge forwards those messages.
Root Bridge
Initially each bridge considers itself to be the root and broadcasts configuration message
with distance 0.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.33

When a bridge receives a BDPU, it compares with its own. Discards its own and saves
the received BDPU, if the received BDPU has:
o a root with a smaller id.
o a root with an equal id but with a shorter distance.
o the root id and distance are equal, but the sending bridge has a smaller id.
Once a bridge receives a configuration message indicating that it is not the root, it
o Stops generation of its own messages
o Forwards messages from other bridges after incrementing distance-to-root field
Eventually, the bridge with the smallest id is selected as the root bridge.
The root bridge always floods frames on all ports.
Absence of periodical configuration message from root, forces bridges to repeat the
above process to elect a new root bridge and designated bridges.
Designated Bridge
All the bridges connected to a LAN elect a designated bridge.
Each bridge computes shortest path to the root and notes the port on the path.
Each LANs designated bridge is the one that is closest to the root.
If two or more bridges are equally close to root, then bridge with smallest id is chosen.
The designated bridge is responsible for forwarding frames to the root bridge.
When a bridge receives a configuration that indicates it is not the designated bridge for
that port, it stops sending messages over that port.
Example
The activity at node B3 using spanning tree algorithm is as follows:
o B3 receives (B2, 0, B2). B3 accepts B2 as root, since B2 is the lower id.
o B3 increments the distance advertised by B2 and sends (B2, 1, B3) towards B5.
o B2 accepts B1 as root because it has the lower id and sends (B1, 1, B2) to B3.
o B5 accepts B1 as root and sends (B1, 1, B5) to B3.
o B3 accepts B1 as root, and it notes that both B2 and B5 are closer to the root than it is.
o B3 stops forwarding messages on both its interfaces.
o B5 and B2 are chosen as the designated bridges for LAN A and C respectively.

Extended LAN with loop

Loop-less using Spanning tree algorithm

List the advantages of bridge.


It increases total bandwidth of the network. For eg, while a single Ethernet segment can
carry only 10 Mbps of total traffic, an Ethernet bridge can carry as much as 10n Mbps,
where n is the number of ports on the bridge.
Vijai Anand

cseannauniv.blogspot.com

CS2363-Computer Networks

1.34

Another advantage of bridge is separation of the collision domain as few stations contend
for access to the medium. Thus the probability of collision is reduced.
Networks can be connected without the end hosts having to run any additional protocols.
List the limitations of a bridge.
Bridges lack on issues of scalability and heterogeneity.
No provision to impose hierarchy on the extended LAN.
Bridges forward all broadcast frames, which is not liked in a large environment.
Bridges support networks that have the same address format. For example, ethernet and
token ring but not ethernet and ATM.
Write short notes on VLAN.
Virtual LAN (VLAN) increases the scalability of extended LAN.
VLAN partitions a single extended LAN into several separate LANs.
VLAN is defined as a local area network configured by software, not by physical wiring.
VLANs group stations belonging to one or more physical LANs into broadcast domains.
Stations in a VLAN communicate with one another as though they belonged to the same
physical segment. Each VLAN is a workgroup in the organization.
In VLAN, it is possible to change the logical topology without moving any wires or
changing any address. Changes are made in bridge configuration.
Each VLAN is assigned an identifier and packets can only travel from one segment to
another if both segments have the same identifier.
Example

Hosts W and X are configured as VLAN 100, hosts Y and Z as VLAN 200.
When a packet sent by host X arrives at bridge B2, the bridge inserts a VLAN header
between Ethernet header and its payload with VLAN ID as 100.
Bridge forwards the packet, only on interfaces that is part of VLAN 100.
Packet is forwarded to bridge B1, which forward the packet to host W but not to Y.
List the advantages using VLAN.
Cost and Time Reduction VLANs reduce the migration cost of stations going from one
group to another. Physical reconfiguration takes time and is costly.
Creating Virtual Work Groups VLANs can be used to create virtual work groups. This
can reduce traffic if the multicasting capability of IP was previously used.
Security In VLANs people belonging to the same group can send broadcast messages
with the guaranteed assurance that users in other groups will not receive these messages.

Vijai Anand

cseannauniv.blogspot.com

Вам также может понравиться