0% found this document useful (0 votes)
10 views55 pages

CNnnn m12

The syllabus outlines the Computer Networks course for Semester 5, focusing on data communication fundamentals, hardware and software interfaces, and various network protocols. It includes five modules covering topics such as network layers, data link protocols, routing algorithms, and application layers, with a mix of theoretical and practical teaching methods. The course aims to enhance students' analytical and problem-solving skills through collaborative and problem-based learning approaches.

Uploaded by

bhargavashegde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views55 pages

CNnnn m12

The syllabus outlines the Computer Networks course for Semester 5, focusing on data communication fundamentals, hardware and software interfaces, and various network protocols. It includes five modules covering topics such as network layers, data link protocols, routing algorithms, and application layers, with a mix of theoretical and practical teaching methods. The course aims to enhance students' analytical and problem-solving skills through collaborative and problem-based learning approaches.

Uploaded by

bhargavashegde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

SYLLABUS

COMPUTER NETWORKS Semester 5


Course Code 21CS52 CIE Marks 50
Teaching Hours/Week (L:T:P: S) 3:0:2:0 SEE Marks 50
Total Hours of Pedagogy 40 hours Theory + 20 hours practicals Total Marks 100
Credits 04 Exam Hours 3
Examination nature (SEE) Theory

Course objectives:
● Fundamentals of data communication networks.
● Software and hardware interfaces
● Application of various physical components and protocols
● Communication challenges and remedies in the networks.

Teaching-Learning Process (General Instructions)


These are sample Strategies, which teachers can use to accelerate the attainment of the various course
outcomes.
1. Lecturer method (L) need not to be only traditional lecture method, but alternative effective
teaching methods could be adopted to attain the outcomes.
2. Use of Video/Animation to explain functioning of various concepts.
3. Encourage collaborative (Group Learning) Learning in the class.
4. Ask at least three HOT (Higher order Thinking) questions in the class, which promotes critical
thinking.
5. Adopt Problem Based Learning (PBL), which fosters students’ Analytical skills, develop design
thinking skills such as the ability to design, evaluate, generalize, and analyze information
rather than simply recall it.
6. Introduce Topics in manifold representations.
7. Show the different ways to solve the same problem and encourage the students to come up
with their own creative ways to solve them.
8. Discuss how every concept can be applied to the real world - and when that's possible, it helps
improve the students' understanding.
MODULE-1 8 Hours
Introduction to networks: Network hardware, Network software, Reference models,

Physical Layer: Guided transmission media, Wireless transmission

Textbook 1: Ch.1.2 to 1.4, Ch.2.2 to 2.3


MODULE-2 8 Hours
The Data link layer: Design issues of DLL, Error detection and correction, Elementary data link
protocols, Sliding window protocols.

The medium access control sublayer: The channel allocation problem, Multiple access protocols.

Textbook 1: Ch.3.1 to 3.4, Ch.4.1 and 4.2


MODULE-3 8 Hours
The Network Layer: Network Layer Design Issues, Routing Algorithms, Congestion Control Algorithms,
QoS.

Textbook 1: Ch 5.1 to 5.4


MODULE-4 8 Hours

The Transport Layer: The Transport Service, Elements of transport protocols, Congestion control, The
internet transport protocols.

Textbook 1: Ch 6.1 to 6.4 and 6.5.1 to 6.5.7

MODULE-5 8 Hours
Application Layer: Principles of Network Applications, The Web and HTTP, Electronic Mail in the Intern et,
DNS—The Internet’s Directory Service.

Textbook 2: Ch 2.1 to 2.4


COMPUTER NETWORKS

Module-I
INTRODUCTION
❖ Computer Network: A collection of autonomous computers interconnected by a single technology. Two
computers are said to be interconnected if they are able to exchange information. The connection need not
be via a copper wire; fiber optics, microwaves, infrared and communication satellites can also be used.
Networks come in many sizes, shapes and forms, as we will see later. They are usually connected together
to make larger networks, for example Internet.

NETWORK HARDWARE
❖ There is no generally accepted taxonomy into which all computer networks fit, but two dimensions stand out
as important: transmission technology and scale.
❖ There are two transmission technologies: Broadcast links and Point-to-Point links.

❖ Point-to-point links connect individual pairs of machines. To go from the source to the destination on a
network made up of point-to-point links, short messages, called packets in certain contexts, may have to first
visit one or more intermediate machines.
❖ Often multiple routes of different lengths are possible, so finding good ones is important in point-to-point
networks.
❖ Point-to-point transmission with exactly one sender and exactly one receiver is sometimes called unicasting.
Example browsing a website.
❖ Broadcast links: single communication channel shared by all machines, example wireless network.

❖ An address field within each packet specifies the intended recipient. Upon receiving a packet, a machine checks
the address field. If the packet is intended for the receiving machine, that machine processes the packet; if the
packet is intended for some other machine, it is just ignored.
❖ Some broadcast systems also support transmission to a subset of the machines, which known as
multicasting.
COMPUTER NETWORKS

PANs (Personal Area Networks):


❖ Let devices communicate over the range of a person.
❖ For example, a wireless network that connects a computer with its peripherals, without using wireless,
thisconnection must be done with cables.
❖ So many new users have a hard time finding the right cables and plugging them into the right place.
❖ To help these users, some companies got together to design a short-range wireless network called
Bluetooth to connect these components without wires.
❖ The idea is that if your devices have Bluetooth, then you need no cables. You just put them down, turn
them on, and they work together. For many people, this ease of operation is a big plus.
❖ In the simplest form, Bluetooth networks use the master-slave paradigm of
❖ Fig. The system unit (the PC) is normally the master, talking to the mouse, keyboard, etc., as slaves. The
master tells the slaves what addresses to use, when they can broadcast, how long they can transmit, what
frequencies they can use, and so on.
❖ It connects a headset to a mobile phone without cords and it can allow your digital music player

LAN (Local Area Network):

❖ It is a privately owned network that operates within and nearby a single building like a home, office or factory.
4
COMPUTER NETWORKS

❖ When LANs are used by companies, they are called enterprise networks.
❖ Wireless LANs(IEEE 802.11) /Wireless Fidelity (WiFi): It is used in homes, older office buildings, cafeterias,
and other places where it is too much trouble to install cables.
❖ In these systems, every computer has a radio modem and an antenna that it uses to communicate with other
computers.

❖ An AP (Access Point), wireless router, or base station, relays packets between the wireless computers and also
between them and the Internet.
❖ Wireless LAN operates at a speed of 11 to 100’s Mbps.
❖ Wired LANs use a range of different transmission technologies. Most of them use copper wires, but some
use optical fiber. LANs are restricted in size, which means that the worst-case transmission time is bounded and
known in advance.
❖ Wired LANs run at speeds of 100 Mbps to 1 Gbps, have low delay and few errors. Newer LANs can operate
at up to 10 Gbps. It is just easier to send signals over a wire or through a fiber than through the air.
❖ The topology wired LANs is built from point-to-point links. IEEE 802.3, called Ethernet, is, by far, the most
common type of wired LAN. Fig. (b) Switched Ethernet. Each computer speaks the Ethernet protocol and
connects to a box called a switch with a point-to-point link. A switch has multiple ports, each of which can
connect to one computer. The job of the switch is to relay packets between computers that are attached to it,
using the address in each packet to determine which computer to send it to.
❖ Both wireless and wired broadcast networks can be divided into static and dynamic designs, depending on how
the channel is allocated.

❖ Static allocation would be to divide time into discrete intervals and use a round-robin algorithm, allowing each
machine to broadcast only when its time slot comes up.
❖ Static allocation wastes channel capacity when a machine has nothing to say during its allocated slot, so most
systems attempt to allocate the channel dynamically (i.e., on demand).
❖ Dynamic allocation methods for a common channel are either centralized or decentralized.
❖ Centralized channel allocation: There is a single entity, for example, the base station in cellular networks,
which determines who goes next. It might do this by accepting multiple packets and prioritizing them according
to some internal algorithm.

5
COMPUTER NETWORKS

❖ Decentralized channel allocation: there is no central entity; each machine must decide for itself whether to
transmit.

MAN (Metropolitan Area Network):

❖ It covers a city and best-known example is cable television networks available in many cities. These systems
grew from earlier community antenna systems used in areas with poor over-the-air television reception. In those
early systems, a large antenna was placed on top of a nearby hill and a signal was then piped to the subscribers’
houses.

❖ At first, these were locally designed, ad hoc systems. The next step was television programming and even entire
channels designed for cable only. Often these channels were highly specialized, such as all news, all sports, all
cooking, all gardening, and so on.

❖ When the Internet began attracting a mass audience, the cable TV network operators began to realize that with
some changes to the system, they could pro- vide two-way Internet service in unused parts of the spectrum.

❖ In figure, both television signals and Internet being fed into the centralized cable headend for subsequent
distribution to people’s homes.

❖ Recent developments in high- speed wireless Internet access have resulted in another MAN, which has been
standardized as IEEE 802.16 and is popularly known as WiMAX

WAN (Wide Area Network):


❖ It Spans a large geographical area, often a country or continent.
❖ In most WANs, the subnet consists of two distinct components: transmission lines and switching elements.
❖ Transmission lines (copper wire, optical fiber, or even radio links) move bits between machines.
❖ Switching elements (switches), are specialized computers that connect two or more transmission lines.
❖ When data arrive on an incoming line, the switching element must choose an outgoing line on which to
forward them.
❖ The routers will usually connect different kinds of networking technology. The networks inside the offices
may be switched Ethernet, for example, while the long-distance transmission lines may be SONET links.
6
COMPUTER NETWORKS

❖ VPN (Virtual Private Network): it provides flexible reuse of a resource (Internet connectivity).
❖ It has disadvantage, which is a lack of control over the underlying resources and mileage may vary with
internet speed.

❖ The subnet operator is known as a network service provider and the offices are its customers. The
subnet operator will connect to other customers too, as long as they can pay and it can provide service.
❖ A subnet operator is called an ISP (Internet Service Provider) and the subnet is an ISP network. Its
customers who connect to the ISP receive Internet service.

7
COMPUTER NETWORKS

❖ How the network makes the decision as to which path to use is called the routing algorithm.
❖ How each router makes the decision as to where to send a packet next is called the forwarding
algorithm.
❖ Examples of WAN make heavy use of wireless technologies i.e. satellite systems.
❖ The cellular telephone network is another example of a WAN that uses wireless technology.
❖ The first generation was analog and for voice only. The second generation was digital and for voice
only. The third generation is digital and is for both voice and data.
❖ Each cellular base station covers a distance much larger than a wireless LAN, with a range measured
in kilometers rather than tens of meters.
Internetworks:
❖ A collection of interconnected networks is called an internetwork or internet.
❖ The Internet uses ISP networks to connect enterprise networks, home networks, and many other
networks.
❖ There are two rules of thumb that are useful. First, if different organizations have paid to construct
different parts of the network and each maintains its part, we have an internetwork rather than a single
network.
❖ Second, if the underlying technology is different in different parts (e.g., broadcast versus point-to-
point and wired versus wireless), we probably have an internetwork.
❖ Gateways are distinguished by the layer at which they operate in the protocol hierarchy.

NETWORK SOFTWARE:
Protocol Hierarchies:

❖ To reduce their design complexity, most networks are organized as a stack of layers or levels,
each one built upon the one below it. The number of layers, the name of each layer, the contents of
each layer, and the function of each layer differ from network to network.

❖ The purpose of each layer is to offer certain services to the higher layers while shielding those
layers from the details of how the offered services are actually implemented. In a sense, each layer is
a kind of virtual machine, offering certain services to the layer above it.

❖ When layer n on one machine carries on a conversation with layer n on another machine, the
rules and conventions used in this conversation are collectively known as the layer n protocol.
Basically, a protocol is an agreement between the communicating parties on how communication is to
proceed.

8
COMPUTER NETWORKS

❖ A five-layer network is illustrated:

❖ In reality, no data are directly transferred from layer n on one machine to layer n on another machine. Instead,
each layer passes data and control information to the layer immediately below it, until the lowestlayer is
reached.
❖ Below layer 1 is the physical medium through which actual communication occurs. Virtual communication is
shown by dotted lines and physical communication by solid lines.
❖ Interface: defines which primitive operations and services the lower layer makes available to the upper one.
❖ Clear- cut interfaces also make it simpler to replace one layer with a completely different protocol or
implementation.
❖ A set of layers and protocols is called network architecture. The specification of architecture must contain
enough information to allow an implementer to write the program or build the hardware for each layer so that
it will correctly obey the appropriate protocol.
❖ A list of the protocols used by a certain system, one protocol per layer, is called a protocol stack.

9
COMPUTER NETWORKS

❖ In this example, M is split into two parts, M 1 and M 2, that will be transmitted separately.
Layer 3 decides which of the outgoing lines to use and passes the packets to layer 2. Layer 2 adds to
each piece not only a header but also a trailer, and gives the resulting unit to layer 1 for physical
transmission.
❖ At the receiving machine the message moves upward, from layer to layer, with headers being stripped
off as it progresses. None of the headers for layers below n are passed up to layer n.

Design Issues for the Layers:


Some of the key design issues that occur in computer networks are present in several layers. The
10
COMPUTER NETWORKS

following are briefly mention some of the more important ones.

• Identifying senders and receivers - some form of addressing is needed in order to specify a
specific source and destination.
• Rules for data transfer - The protocol must also determine the direction of data flow, how
many logical channels the connection corresponds to and what their priorities are. Many
networks provide at least two logical channels per connection, one for normal data and one for
urgent data.

• Error control – when circuits are not perfect, both ends of the connection must agree on which
error-detecting and error-correcting codes is being used.

• Sequencing - protocol must make explicit provision for the receiver to allow the pieces to be
reassembled properly.

• Flow Control - how to keep a fast sender from swamping a slow receiver with data. This is
done by feedback-based (receiver to sender) or agreed-on transmission rate.

• Segmentation and reassembly - several levels are the inability of all processes to accept
arbitrarily long messages. It leads to mechanisms for disassembling, transmitting, and then
reassembling messages.
• Multiplexing and demultiplexing – to share the communication medium by several users.

• Routing - When there are multiple paths between source and destination, a route must be
chosen.

Connection-Oriented Versus Connectionless Service:


❖ Connection-oriented network service, the service user first establishes a connection, uses the
connection, and then releases the connection.
❖ Connection acts like a tube: the sender pushes objects (bits) in at one end, and the receiver takesthem
out at the other end. In most cases the order is preserved so that the bits arrive in the order they were
sent.
❖ In some cases when a connection is established, the sender, receiver, and subnet conduct a negotiation
about the parameters to be used, such as max message size, QoS required etc. Typically, one side makes
a proposal and the other side can accept it, reject it, or make a counter- proposal.
❖ Connectionless service is modeled after the postal system. Each message (letter) carries the full
destination address, and each one is routed through the intermediate nodes inside the system
independent of all the subsequent messages.
❖ There are different names for messages in different contexts; a packet is a message at the network
layer. When the intermediate nodes receive a message in full before sending it on to the next node, this
is called store-and-forward switching.
❖ The alternative, in which the onward transmission of a message at a node starts before it is completely
received by the node, is called cut-through switching.
❖ Unreliable (meaning not acknowledged) connectionless service is often called datagram service, in

11
COMPUTER NETWORKS

analogy with telegram service, which also does not return an acknowledgement to the sender.

Service Primitives (Operations):


❖ These primitives tell the service to perform some action or report on an action taken by peer entity.
The primitives for connection-oriented service are different from those of connectionless service.

❖ First, the server executes LISTEN to indicate that it is prepared to accept in coming connections. A
common way to implement LISTEN is to make it a blocking system call. After executing the primitive,
the server process is blocked until a request for connection appears.
❖ Next, the client process executes CONNECT to establish a connection with the server. The CONNECT
call needs to specify who to connect to, so it might have a parameter giving the server’s address. Client
is suspended until there is a response.

❖ When the packet arrives at the server, the operating system sees that the packet is requesting a
connection. It checks to see if there is a listener, and if so it unblocks the listener. The server process
12
COMPUTER NETWORKS

can then establish the connection with the ACCEPT call.


❖ The next step is for the server to execute RECEIVE to prepare to accept the first request.
Normally, the server does this immediately upon being released from the LISTEN, before the
acknowledgement can get back to the client. The RECEIVE call blocks the server.
❖ Then the client executes SEND to transmit its request followed by the execution of RECEIVE to get
the reply.
❖ When the client is done, it executes DISCONNECT to terminate the connection.

The Relationship of Services to Protocols


❖ A service is a set of primitives (operations) that a layer provides to the layer above it. I t defines what
operations the layer is prepared to perform on behalf of its users. A service relates to aninterface
between two layers, with the lower layer being the service provider and the upper layer being the
service user.
❖ A service is like an abstract data type or an object in an object-oriented language. It definesoperations
that can be performed on an object but does not specify how these operations are implemented.
❖ A protocol, in contrast, is a set of rules governing the format and meaning of the packets, or messages
that are exchanged by the peer entities within a layer.
❖ In contrast, a protocol relates to the implementation of the service and as such is not visible to the user
of the service.

REFERENCE MODELS
The OSI Reference Model

❖ This model is based on a proposal developed by the International Standards Organization (ISO) as a
first step toward international standardization of the protocols used in the various layers (Day and
Zimmermann, 1983).
❖ It was revised in 1995 (Day, 1995). The model is called the ISO OSI (Open Systems Interconnection)
Reference Model because it deals with connecting open systems—that is, systems that are open for
communication with other systems.
❖ The OSI model has seven layers. The principles that were applied to arrive at the seven layers
can be briefly summarized as follows:
1. A layer should be created where a different abstraction is needed.
13
COMPUTER NETWORKS

2. Each layer should perform a well-defined function.


3. The function of each layer should be chosen with an eye toward defining internationally
standardized protocols.
4. The layer boundaries should be chosen to minimize the information flow across the
interfaces.
5. The number of layers should be large enough that distinct functions need not be thrown
together in the same layer out of necessity and small enough that the architecture does not
become unwieldy.

The Physical Layer


❖ This layer is concerned with transmitting raw bits sequence of 0’s and 1’s over a communication
channel.
❖ The design issues are deal with mechanical, electrical, and timing interfaces, as well as the physical
transmission medium, which lies below the physical layer.
The Data Link Layer
❖ This layer transforms a raw transmission facility into a line that appears free of undetected
transmission errors.
❖ It accomplishes this task by having the sender break up the input data into data frames (typically a
few hundred or a few thousand bytes) and transmits the frames sequentially.
14
COMPUTER NETWORKS

❖ If the service is reliable, the receiver confirms correct receipt of each frame by sending back an
acknowledgement frame.
❖ Another issue in the data link layer is how to keep a fast transmitter from drowning a slow
receiver in data. Some traffic regulation mechanisms are used.
❖ Medium access control sub layer deals with how to control access to the shared channel.

The Network Layer


❖ Controls the operation of the subnet.
❖ A key design issue is determining how packets are routed from source to destination.
❖ Routes can be based on static tables that are ‘‘wired into’’ the network and rarely changed, or more
often they can be updated automatically to avoid failed components.
❖ If too many packets are present in the subnet at the same time, they will get in one another’s way,
forming bottlenecks. Handling congestion is also a responsibility of the network layer.
❖ Heterogeneous networks to be interconnected.

The Transport Layer


❖ It accepts data from above it, split it up into smaller units, if needs to be, pass these to the network
layer,and ensure that the pieces all arrive correctly at the other end.
❖ It also determines what type of service to provide to the session layer, ultimately, to the users of the
network.
❖ The most popular type of transport connection is an error-free point-to-point channel that delivers
messages or bytes in the order in which they were sent.
❖ It also provides the service of transporting of isolated messages with no guarantee about the order of
delivery, and the broadcasting of messages to multiple destinations.
❖ The transport layer is a true end-to-end layer; it carries data all the way from the source to the
destination.

The Session Layer


❖ It allows users on different machines to establish sessions between them.
❖ Sessions offer various services, including dialog control (keeping track of whose turn it is to transmit),
token management (preventing two parties from attempting the same critical operation
simultaneously), and synchronization (check pointing long transmissions to allow them to pick up from
where they left off in the event of a crash and subsequent recovery).

The Presentation Layer

❖ This layer is concerned with the syntax and semantics of the information transmitted.
❖ In order to make it possible for computers with different internal data representations to communicate,
the data structures to be exchanged can be defined in an abstract way, along with a standard encoding
to be used ‘‘on the wire.’’
❖ The presentation layer manages these abstract data structures and allows higher-level data structures
15
COMPUTER NETWORKS

(e.g., banking records) to be defined and exchanged.

The Application Layer


❖ It contains a variety of protocols that are commonly needed by users.
❖ One widely used application protocol is HTTP (HyperText Transfer Protocol), which is the basis for
the World Wide Web. When a browser wants a Web page, it sends the name of the page it wants to
the server hosting the page using HTTP. The server then sends the page back.
❖ Other application protocols are used for file transfer, electronic mail, and network news.

The TCP/IP Reference Model


❖ This reference Model is a four-layered suite of communication protocols, developed by the DoD
(Department of Defence) in the 1960s. It is named after the two main protocols that are used in the
model, namely, TCP and IP.

The Link Layer


❖ It describes what links such as serial lines and classic Ethernet must do to meet the needs of this
connectionless internet layer.
❖ It is not really a layer at all, in the normal sense of the term, but rather an interface between hosts and
transmission links.

The Internet Layer


❖ Its job is to permit hosts to inject packets into any network and have they travel independently to the
destination.
❖ Packet may arrive in a completely different order than they were sent, in which case it is the job of
higher layers to rearrange them, if in-order delivery is desired.
❖ This layer defines an official packet format and protocol called IP (Internet Protocol), plus a
companion protocol called ICMP (Internet Control Message Protocol) that helps it function.
❖ The job of the internet layer is to deliver IP packets where they are supposed to go. Packet routing
is clearly a major issue here, as is congestion (though IP has not proven effective at avoiding
16
COMPUTER NETWORKS

congestion).

The Transport Layer


❖ It is designed to allow peer entities on the source and destination hosts to carry on a conversation,
just as in the OSI transport layer.
❖ Two end-to-end transport protocols have been defined here TCP, UDP.
❖ TCP (Transmission Control Protocol), is a reliable connection-oriented protocol that allows a byte
stream originating on one machine to be delivered without error on any other machine in the internet.
❖ It segments the incoming byte stream into discrete messages and passes each one on to the internet
layer. At the destination, the receiving TCP process reassembles the received messages into the output
stream.
❖ TCP also handles flow control to make sure a fast sender cannot swamp a slow receiver with more
messages than it can handle.
❖ UDP (User Datagram Protocol), is an unreliable, connectionless protocol for applications that do not
want TCP’s sequencing or flow control and wish to provide their own.
❖ It is also widely used for one-shot, client-server-type request-reply queries and applications in which
prompt delivery is more important than accurate delivery, such as transmitting speech or video.

The Application Layer


❖ It contains all the higher-level protocols. The file transfer (FTP), and electronic mail (SMTP).Domain
Name System (DNS), for mapping host names onto their network addresses, HTTP, the protocol for
fetching pages on the World Wide Web, RTP, the protocol for delivering real-time media such as
voice or movies.

A Comparison of the OSI and TCP/IP Reference Models


❖ Three concepts are central to the OSI model:
1. Services: It tells layer’s semantics, what the layer does, not how entities above it access it or how the
layer works.
2. Interfaces: It specifies what the parameters are and what results to expect.
3. Protocols: provides the offered services.
❖ The TCP/IP model did not originally clearly distinguish between services, interfaces, and protocols,
although people have tried to retrofit it after the fact to make it more OSI-like.
❖ The protocols in the OSI model are better hidden than in the TCP/IP model and can be replaced
relatively easily as the technology changes.
❖ As a consequence, the proto- cols in the OSI model are better hidden than in the TCP/IP model and
can be replaced relatively easily as the technology changes.
❖ With TCP/IP the reverse was true: the protocols came first, and the model was really just a
description of the existing protocols. There was no problem with the protocols fitting the model.
❖ The OSI model has seven layers and the TCP/IP model has four. Both have (inter)network, transport,
17
COMPUTER NETWORKS

and application layers, but the other layers are different.


❖ The OSI model supports both connectionless and connection- oriented communication in the network
layer, but only connection-oriented communication in the transport layer, where it counts
❖ The TCP/IP model supports only one mode in the network layer (connectionless) but both in the
transport layer, giving the users a choice.

PHYSICAL LAYER: GUIDED TRANSMISSION MEDIA

1. Magnetic Media:
❖ One of the most common ways to transport data from one computer to another is to write them onto
magnetic tape or removable media (e.g., recordable DVDs), physically transport the tape or disks to
the destination machine, and read them back in again.
❖ Although this method is not as sophisticated as using a geosynchronous communication satellite, it is
often more cost effective, especially for applications in which high bandwidth or cost per bit
transported is the key factor.
❖ An industry-standard Ultrium tape can hold 800 gigabytes. A box 60 60 60 cm can hold about 1000
of these tapes, for a total capacity of 800 terabytes, or 6400 terabits (6.4 petabits).
❖ A box of tapes can be delivered anywhere in the United States in 24 hours by Federal Express and
other companies. The effective bandwidth of this transmission is 6400 terabits/86,400 sec, or a bit over
70 Gbps.
❖ If the destination is only an hour away by road, the bandwidth is increased to over 1700 Gbps. No
computer net- work can even approach this. Of course, networks are getting faster, but tape densities
are increasing, too.

❖ The cost of an Ultrium tape is around $40 when bought in bulk. A tape can be reused at least 10 times,
So the tape cost is maybe $4000 per box per usage.

2. Twisted Pairs

❖ A twisted pair consists of two insulated copper wires, typically about 1 mm thick. The wires are twisted
together in a helical form, just like a DNA molecule.

❖ Twisting is done because two parallel wires constitute a fine antenna. When the wires are twisted, the
waves from different twists cancel out, so the wire radiates less effectively.

❖ A signal is usually carried as the difference in voltage between the two wires in the pair. This provides
better immunity to external noise because the noise tends to affect both wires the same, leaving the
differential unchanged.

18
COMPUTER NETWORKS

❖ The most common application of the twisted pair is the telephone system.

❖ Twisted pairs can run several kilometers without amplification, but for longer distances the signal
becomes too attenuated and repeaters are needed.

❖ The bandwidth depends on the thickness of the wire and the distance traveled, but several
megabits/sec can be achieved for a few kilometers in many cases.

❖ Twisted-pair cabling comes in several varieties. A ‘‘Cat 5”category 5 twisted pair consists of two
insulated wires gently twisted together. Four such pairs are typically grouped in a plastic sheath to
protect the wires and keep them together.
❖ Links that can be used in both directions at the same time, like a two-lane road, are called full- duplex
links.
❖ links that can be used in either direction, but only one way at a time, like a single-track railroad line
are called half-duplex links.

❖ Links that allow traffic in only one direction, like a one-way street. They are called
simplex links.
❖ Cat 5 replaced earlier Category 3 cables, but has more twists per meter. More twists result in less
crosstalk and a better-quality signal over longer distances, making the cables more suitable for high-
speed computer communication, especially 100-Mbps and 1-Gbps Ethernet LANs.

❖ Category 6 or even Category 7 has more stringent specifications to handle signals with greater
band- widths.

3. Coaxial Cable
❖ It has better shielding and greater bandwidth than unshielded twisted pairs, so it can span longer
distances at higher speed.
❖ There are two kinds, one kind, 50-ohm cable, is commonly used when it is intended for digital
transmission from the start. The other kind, 75-ohm cable, is commonly used for analog transmission
and cable television.
❖ A coaxial cable consists of a stiff copper wire as the core, surrounded by an insulating material. The
insulator is encased by a cylindrical conductor, often as a closely woven braided mesh.
❖ The outer conductor is covered in a protective plastic sheath.

19
COMPUTER NETWORKS

❖ The construction and shielding of the coaxial cable give it a good combination of high bandwidth
and excellent noise immunity. The bandwidth possible depends on the cable quality and length.
❖ Coaxial cables used to be widely used within the telephone system for long-distance lines but have
now largely been replaced by fiber optics on long- haul routes. Coax is still widely used for cable
television and metropolitan area networks, however.

4. Power Lines
❖ Power lines deliver electrical power to houses, and electrical wiring within houses distributes the power
to electrical outlets. Its been used by electricity companies for low-rate communication such as re-
mote metering for many years, as well in the home to control devices.
❖ Simply plug a TV and a receiver into the wall, which you must do anyway because they need power,
and they can send and receive movies over the electrical wiring.
❖ The difficulty with using household electrical wiring for a network is that it was designed todistribute
power signals.
❖ Electrical signals are sent at 50–60 Hz and the wiring attenuates the much higher frequency (MHz)
signals needed for high-rate data communication.
❖ Transient currents when appliances switch on and off create electrical noise over a wide range of
frequencies.
❖ Despite these difficulties, it is practical to send at least 100 Mbps over typical household electrical
wiring by using communication schemes that resist impaired frequencies and bursts of errors.

20
COMPUTER NETWORKS
5. Fiber Optics

❖ In contrast, the achievable bandwidth with fiber technology is in excess of 50,000 Gbps (50 Tbps)
and we are nowhere near reaching these limits.
❖ The current practical limit of around 100 Gbps is due to our inability to convert between electrical
and optical signals any faster.
❖ Fiber optics are used for long-haul transmission in network backbones, high-speed LANs and high-
speed Internet access such as FttH (Fiber to the Home).
❖ An optical transmission system has three key components: the light source, the transmission medium,
and the detector.
❖ Conventionally, a pulse of light indicates a 1 bit and the absence of light indicates a 0 bit. The
transmission medium is an ultra-thin fiber of glass. The detector generates an electrical pulse when
light falls on it.

Transmission of Light through Fiber:

Optical fibers are made of glass, which, in turn, is made from sand, an in expensive raw material
available in unlimited amounts.

Fiber Cables:
❖ Fiber optic cables are similar to coax, except without the braid. At the center is the glass core through
which the light propagates. In multimode fibers, the core is typically 50 microns in diameter, about the
thickness of a human hair. In single-mode fibers, the core is 8 to 10 microns.

❖ The core is surrounded by a glass cladding with a lower index of refraction than the core, to keep all
the light in the core. Next comes a thin plastic jacket to protect the cladding. Fibers are typically
grouped in bundles, protected by an outer sheath.

WIRELESS TRANSMISSION
The Electromagnetic Spectrum
❖ When electrons move, they create electromagnetic waves that can propagate through space. These
waves were predicted by the British physicist James Clerk Maxwell in 1865 and first observed by the
German physicist Heinrich Hertz in 1887.
❖ The number of oscillations per second of a wave is called its frequency, f, and is measured in Hz.
The distance between two consecutive maxima (or minima) is called the wavelength λ(lambda).

21
COMPUTER NETWORKS

❖ When an antenna of the appropriate size is attached to an electrical circuit, the electromagnetic
waves can be broadcast efficiently and received by a receiver some distance away.
❖ In a vacuum, all electromagnetic waves travel at the same speed, no matter what their frequency as
called speed of light, c, is approximately 3*108 m/sec, or about 1 foot (30 cm) per nanosecond.
❖ The fundamental relation between f, λ, and c (in a vacuum) is λ f=c

❖ In frequency hopping spread spectrum, the transmitter hops from frequency-to-frequency


hundreds of times per second. It is popular for military communication because it makes
transmissions hard to detect and next to impossible to jam.
❖ Direct sequence spread spectrum uses a code sequence to spread the data signal over a wider
frequency band. It is widely used commercially as a spectrally efficient way to let multiple signals
share the same frequency band.

Radio Transmission
❖ Radio frequency (RF) waves are easy to generate, can travel long distances, and can penetrate buildings
easily, so they are widely used for communication, both indoors and outdoors.
❖ Radio waves also are omnidirectional, meaning that they travel in all directions from the source, so the
transmitter and receiver do not have to be carefully aligned physically.
❖ The properties of radio waves are frequency dependent. At low frequencies, radio waves passthrough
obstacles well, but the power falls off sharply with distance from the source at least as fast as1/r 2 in
air—as the signal energy is spread more thinly over a larger surface. This attenuation is called path
loss.

22
COMPUTER NETWORKS

Microwave Transmission
❖ Before fiber optics, for decades these microwaves formed the heart of the long-distance telephone
transmission system.
❖ In fact, MCI, one of AT&T’s first competitors after it was deregulated, built its entire system with
microwave communications passing between towers tens of kilometers apart. Even the company’s
name reflected this (MCI stood for Microwave Communications, Inc.).
❖ Microwaves travel in a straight line, so if the towers are too far apart, the earth will get in the way.
❖ Unlike radio waves at lower frequencies, microwaves do not pass through buildings well. In addition,
even though the beam may be well focused at the transmitter, there is still some divergence in space.
❖ The demand for more and more spectrum drives operators to yet higher frequencies. Bands up to 10
GHz are now in routine use, but at about 4 GHz a new problem sets in: absorption by water.
❖ Microwave communication is so widely used for long-distance telephone communication, mobile
phones, television distribution, and other purposes that a severe shortage of spectrum has developed.
❖ Microwave is also relatively inexpensive. Putting up two simple towers and putting antennas on each
one may be cheaper than burying 50 km of fiber through a congested urban area or up over a mountain,
and it may also be cheaper than leasing the telephone company’s fiber,

Infrared Transmission
❖ Unguided infrared waves are widely used for short-range communication. The remote controls used
for televisions, VCRs, and stereos all use infrared communication.
❖ On the other hand, the fact that infrared waves do not pass through solid walls well is also a plus. It
means that an infrared system in one room of a building will not interfere with a similar system in
adjacent rooms or buildings: you cannot control your neighbor’s television with your remote control.
❖ Furthermore, security of infrared systems against eavesdropping is better than that of radio systems
precisely for this reason.

❖ Infrared communication has a limited use on the desktop, for ex- ample, to connect notebookcomputers
and printers with the IrDA (Infrared Data Association) standard, but it is not a major player in the
communication game.

23
COMPUTER NETWORKS

Light Transmission

❖ Unguided optical signaling or free-space optics has been in use for centuries.
❖ Optical signaling using lasers is inherently unidirectional, so each end needs its own laser and its own
Photodetector. This scheme offers very high bandwidth at very low cost and is relatively secure
because it is difficult to tap a narrow laser beam.
❖ The laser’s strength, a very narrow beam, is also its weakness here. Aiming a laser beam 1 mm wide
at a target the size of a pin head 500 meters away requires the marksmanship of a latter-day Annie
Oakley.

❖ To add to the difficulty, wind and temperature changes can distort the beam and laser beams also
cannot penetrate rain or thick fog, although they normally work well on sunny days.
❖ Unguided optical communication may seem like an exotic networking technology today, but it might
soon become much more prevalent.
❖ Communicating with visible light in this way is inherently safe and creates a low-speed network in
the immediate vicinity of the display.

24
Computer Networks

MODULE – 2
The Data link layer
DATA LINK LAYER DESIGN ISSUES

➢ The data link layer uses the services of the physical layer to send and receive bits over communication channels.
Functions of data link layer include:
• Providing a well-defined service interface to the network layer.
• Dealing with transmission errors.
• Regulating the flow of data so that slow receivers are not swamped by fast senders.
➢ To accomplish these goals, the data link layer takes the packets it gets from the network layer and encapsulates
them into frames for transmission. Each frame contains a frame header, a payload field for holding the packet,
and a frame trailer, as illustrated in Fig. 3-1. Frame management forms the heart of what the data link layer does.

The following are the data link layer design issues


1. Services Provided to the Network Layer
The network layer wants to be able to send packets to its neighbors without worrying about the
details of getting it there in one piece.
2. Framing
Group the physical layer bit stream into units called frames. Frames are nothing more than "packets"
or "messages". By convention, we use the term "frames" when discussing DLL.
3. Error Control
Sender checksums the frame and transmits checksum together with data. Receiver re-computes the
checksum and compares it with the received value.
4. Flow Control
Prevent a fast sender from overwhelming a slower receiver

1
Computer Networks

Services Provided to the Network Layer

➢ The function of the data link layer is to provide services to the network layer. The principal service is transferring
data from the network layer on the source machine to the network layer on the destination machine.

➢ On the source machine is an entity (a process), in the network layer that hands some bits to the data link layer for
transmission to the destination.

➢ The job of the data link layer is to transmit the bits to the destination machine so they can be handed over to the
network layer there, as shown in Fig. 3-2(a). The actual transmission follows the path of Fig. 3-2(b)

➢ The data link layer can be designed to offer various services:


1. Unacknowledged connectionless service.
2. Acknowledged connectionless service.
3. Acknowledged connection-oriented service.
➢ Unacknowledged connectionless service consists of having the source ma- chine send independent frames to the
destination machine without having the destination machine acknowledge them. Ethernet is a good example of a
data link layer that provides this class of service. No logical connection is established beforehand or released
afterward. If a frame is lost due to noise on the line, no attempt is made to detect the loss or recover from it in
the data link layer. This class of service is appropriate when the error rate is very low, so recovery is left to higher
layers. It is also appropriate for real-time traffic, such as voice, in which late data are worse than bad data.
➢ The next step up in terms of reliability is acknowledged connectionless service. When this service is offered, there
are still no logical connections used, but each frame sent is individually acknowledged. In this way, the sender
knows whether a frame has arrived correctly or been lost. If it has not arrived within a specified time interval, it
can be sent again. This service is useful over unreliable channels, such as wireless systems. Eg: 802.11 (WiFi)
➢ The most sophisticated service the data link layer can provide to the network layer is connection-oriented service.
With this service, the source and destination machines establish a connection before any data are transferred. Each
frame sent over the connection is numbered, and the data link layer guarantees that each frame sent is indeed
2
Computer Networks

received. Furthermore, it guarantees that each frame is received exactly once and that all frames are received in
the right order.
➢ When connection-oriented service is used, transfers go through three distinct phases.
▪ First, connection is established by having both sides initialize variables and counters needed to keep track of which
frames have been received and which ones have not.
▪ Second, one or more frames are actually transmitted.
▪ Third, connection is released, freeing up the variables, buffers, and other resources used to maintain the connection.

Framing
Data link layer breaks up the bit stream into discrete frames, compute a short token called a checksum for each frame,
and include the checksum in the frame when it is transmitted. (Checksum algorithms will be discussed later in
this chapter.) When a frame arrives at the destination, the checksum is recomputed. If the newly computed
checksum is different from the one contained in the frame, the data link layer knows that an error has occurred
and takes steps to deal with it.
Framing methods:

1. Byte count.
2. Flag bytes with byte stuffing.
3. Flag bits with bit stuffing.
4. Physical layer coding violations.

The first framing method uses a field in the header to specify the number of bytes in the frame. When the data link
layer at the destination sees the byte count, it knows how many bytes follow and hence where the end of the frame
is. This technique is shown in Fig. 3-3(a) for four small example frames of sizes 5, 5, 8, and 8 bytes, respectively.
The trouble with this algorithm is that the count can be garbled by a transmission error. For example, if the byte
count of 5 in the second frame of Fig. 3-3(b) becomes a 7 due to a single bit flip, the destination will get out of
synchronization. It will then be unable to locate the correct start of the next frame.

The second framing method gets around the problem of resynchronization after an error by having each frame start
and end with special bytes. Often the same byte, called a flag byte, is used as both the starting and ending

3
Computer Networks

delimiter. This byte is shown in Fig. 3-4(a) as FLAG. Two consecutive flag bytes indicate the end of one frame
and the start of the next. Thus, if the receiver ever loses synchronization it can just search for two flag bytes to
find the end of the current frame and the start of the next frame.
However, there is a still a problem we have to solve. It may happen that the flag byte occurs in the data, especially
when binary data such as photographs or songs are being transmitted. This situation would interfere with the
framing. One way to solve this problem is to have the sender’s data link layer insert a special escape byte (ESC)
just before each ‘‘accidental’’ flag byte in the data. Thus, a framing flag byte can be distinguished from one in
the data by the absence or presence of an escape byte before it. The data link layer on the receiving end re- moves
the escape bytes before giving the data to the network layer. This technique is called byte stuffing.

If an escape byte occurs in the middle of the data, it is also stuffed with an escape byte. At the receiver, the first escape
byte is removed, leaving the data byte that follows it (which might be another escape byte or the flag byte). Some
examples are shown in Fig. 3-4(b).

The third method of delimiting the bit stream gets around a disadvantage of byte stuffing, which is that it is tied to the
use of 8-bit bytes. Framing can be also be done at the bit level, so frames can contain an arbitrary number of bits
made up of units of any size. It was developed for the once very popular HDLC (High- level Data Link Control)
protocol. Each frame begins and ends with a special bit pattern, 01111110 or 0x7E in hexadecimal. This pattern
is a flag byte. When- ever the sender’s data link layer encounters five consecutive 1s in the data, it automatically
stuffs a 0 bit into the outgoing bit stream. This bit stuffing is analogous to byte stuffing, in which an escape byte
is stuffed into the outgoing character stream before a flag byte in the data. It also ensures a minimum densityof
transitions that help the physical layer maintain synchronization. USB (Universal Serial Bus) uses bit stuffing for
this reason.
When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit,
it automatically destuffs (i.e., deletes) the 0 bit. Just as byte stuffing is completely transparent to the network layer in
both computers, so is bit stuffing. If the user data contain the flag pattern, 01111110, this flag is transmitted as
011111010 but stored in the receiver’s memory as 01111110. Figure 3-5 gives an example of bit stuffing.

With bit stuffing, the boundary between two frames can be unambiguously recognized by the flag pattern.

4
Computer Networks

The last method of framing is encoding of bits as signals often includes redundancy to help the receiver. This
redundancy means that some signals will not occur in regular data. For example, in the 4B/5B line code 4 data
bits are mapped to 5 signal bits to ensure sufficient bit transitions. This means that 16 out of the 32 signal
possibilities are not used. We can use some reserved signals to indicate the start and end of frames. In effect, we
are using ‘‘coding violations’’ to delimit frames. The beauty of this scheme is that, because they are reserved
signals, it is easy to find the start and end of frames and there is no need to stuff the data.

Many data link protocols use a combination of these methods for safety. A common pattern used for Ethernet and
802.11 is to have a frame begin with a well-defined pattern called a preamble. This pattern might be quite long
(72 bits is typical for 802.11) to allow the receiver to prepare for an incoming packet. The preamble is then
followed by a length (i.e., count) field in the header that is used to locate the end of the frame.

Error Control
Next task of Data link layer is to make sure all frames are eventually delivered to the network layer at the destination
and in the proper order.
The usual way to ensure reliable delivery is to provide the sender with some feedback about what is happening at the
other end of the line. If the sender receives a positive acknowledgement about a frame, it knows the frame has
arrived safely. On the other hand, a negative acknowledgement means that something has gone wrong and the
frame must be transmitted again.
But certain frames can go missing due to the introduction of some noise in the signal. If the acknowledgements are
lost, sender will not understand what to do. That is when the timers are useful. When the sender transmits a frame,
it generally also starts a timer. The timer is set to expire after an interval long enough for the frame to reach the
destination, be processed there, and have the acknowledgement propagate back to the sender. Normally, the frame
will be correctly received and the acknowledgement will get back before the timer runs out, in which case the
timer will be canceled.
During retransmissions receiver may get duplicate packets. To prevent this from happening, sequence numbers are
assigned to outgoing frames, so that the receiver can distinguish retransmissions from originals.
The whole issue of managing the timers and sequence numbers so as to ensure that each frame is ultimately passed to
the network layer at the destination exactly once, no more and no less, is an important part of the duties of the
data link layer (and higher layers)

Flow Control
Another important design issue that occurs in the data link layer (and higher layers as well) is what to do with a sender
that systematically wants to transmit frames faster than the receiver can accept them. Sender should send the data
5
Computer Networks

at the same speed as the receiver is capable of receiving. Otherwise, receiver will lose couple of frames.
Two approaches are commonly used.
1. Feedback-based flow control - the receiver sends back information to the sender giving it permission to send
more data, or at least telling the sender how the receiver is doing.
2. Rate-based flow control - the protocol has a built-in mechanism that limits the rate at which senders may
transmit data, without using feedback from the receiver.

ERROR DETECTION AND CORRECTION


➢ Transmission errors are unavoidable. We have to learn to deal with them.
➢ Two basic strategies for dealing with errors. Both add redundant information to the data that is sent.
1. . Include enough redundant information to enable the receiver to deduce what
the transmitted data must have been. I t uses error-correcting codes. The use of error-correcting codes is often
referred to as FEC (Forward Error Correction).
2. Include only enough redundancy to allow the receiver to deduce that an error has occurred (but not which error)
and have it request a retransmission. It uses error-detecting codes.
On channels that are highly reliable, such as fiber, it is cheaper to use an error-detecting code and just retransmit the
occasional block found to be faulty. However, on channels such as wireless links that make many errors, it is
better to add redundancy to each block so that the receiver is able to figure out what the originally transmitted
block was. FEC is used on noisy channels because retransmissions are just as likely to be in error as the first
transmission.
Errors are caused by extreme values of thermal noise that overwhelm the signal briefly and occasionally, giving rise
to isolated single-bit errors or errors tend to come in bursts.
PARITY METHOD

➢ appends a parity bit to the end of each word in the frame


➢ Even parity is used for asynchronous Transmission
➢ Odd parity is used for synchronous Transmission

If one bit or any odd no bits is erroneously inverted during Transmission, the Receiver will detect an error. How ever
if two or even no of bits are inverted an undetected error occurs.
Ex 3. The Transmitted data is 10011010. The received data is 11011010.

Let both the transmitter and receiver are agreed on EVEN parity. Now an error will be detected, since the no of ones
received are ODD

4. The Transmitted data is 10011010. The received data is 01011010

The received data is wrong even though the no of ones are EVEN. Since two bits are inverted error can’t be detected.

6
Computer Networks

Longitudinal Redundancy Check(LRC)


➢ The frame is viewed as a block of characters arranged in 2-dimensions. To each character is appended a parity
bit. In addition a parity bit is generated for each bit position across all characters i.e., an additional character is
generated in which the Ith bit of the character is parity bit for the Ith bit of all other characters in the block. This
can be expressed mathematically using exclusive OR(+) operation. The parity bit at the end of each character of
row parity
Rj =b1j + b2j + bnj

Where Rj=Parity bit of jth character

bij=ith bit in jth character

This equation generates even parity.

Ci=bi1+bi2+ +bin

Where Ci=ith bit of parity check character m=number of characters in a frame

In this format the parity bits at the end of each character are referred to as The Vertical Redundancy Check (VRC)
and the Parity check character is referred to as the Longitudinal Redundancy Check (LRC).

CRC Method
1. The frame is expressed in the form of a Polynomial F(x).0 1 1 1 1 1 1 0
2. Both the sender and receiver will agree upon a generator polynomial G(x) in advance.
3. Let ‘r’ be the degree of G(x). Append ‘r’ zero bits to the lower – order end of frame now it
contains m+r bits.

7
Computer Networks

4. Divide the bit string by G(x) using Mod 2 operation.


5. Transmitted frame [T(x)] = frame + remainder

1. Divide T(x) by G(x) at the receiver end. If the result is a zero, then the frame is transmitted correctly. Ex. Frame:
1101011011
Generator: 10011

Message after appending 4 zero bits: 11010110000

8
Computer Networks

Since the remainder is zero there is no error in the transmitted frame.

HAMMING CODES
Hamming codes provide another method for error correction. Error bits, called Hamming bits, are inserted into
message bits at random locations. It is believed that the randomness of their locations reduces the odds that these
Hamming bits themselves would be in error. This is based on a mathematical assumption that because there are
so many more message bits compared with Hamming bits, there is a greater chance for a message bit to be in
error than for a Hamming bit to be wrong. Determining the placement and binary value of the Hamming bits can
be implemented using hardware, but it is often more practical to implement them using software. The numberof
bits in a message (M) are counted and used to solve the following equation to determine the number of Hamming
bits (H) to be used:

2H ≥ M + H + 1

Once the number of Hamming bits is determined, the actual placement of the bits into the message is performed. It is
important to note that despite the random nature of the Hamming bit placements, the exact sample placements

9
Computer Networks

must be known and used by both the transmitter and receiver. Once the Hamming bits are inserted into their
positions, the numerical values of the bit positions of the logic 1 bits in the original message are listed. The
equivalent binary numbers of these values are added in the same manner as used in previous error methods by
discarding all carry results. The sum produced is used as the states of the Hamming bits in the message. The
numerical difference between the Hamming values transmitted and that produced at the receiver indicates the bit
position that contains a bad bit, which is then inverted to correct it.

Ex. The given data 10010001100101(14- bits)

The number of hamming codes2H ≥ M + H + 1

H = ? M = 14 to satisfy this equation H should be 5 i.e. 5 hamming code bits should be incorporated
in the data bits.
1001000110H0H1H0H1H

Now count the positions where binary 1’s are present. Add using mod 2 operation (Ex-OR). The result will give the
Hamming code at the transmitter end.
1’s position Binary equivalent

This Hamming code will be incorporated at the places of ‘H’ in the data bits and the data will be transmitted.

How to find out there is an error in the data?

Let the receiver received the 12th bit as zero. The receiver also finds out the Hammingcode in the same way as
transmitter.

10
Computer Networks

The decimal equivalent for the binary is 12 so error is occurred at 12th place.

Elementary Data Link Protocols

Protocols in the data link layer are designed so that this layer can perform its basic functions: framing, error control
and flow control. Framing is the process of dividing bit - streams from physical layer into data frames whose size
ranges from a few hundred to a few thousand bytes.

Unrestricted Simplex Protocol:


Following assumptions are made

• Data transmission is simplex i.e. transmitted in one direction only.


• Both transmitting and receiving network layers are ready.
• Processing time is ignored.
• Infinite buffer space is available.
• An error free channel.

This is an unrealistic protocol, which has a nickname “Utopia”.

1. A simplex stop and wait protocol:


The following assumptions are made

a. Error free channel.


b. Data transmission simplex.

11
Computer Networks

Since the transmitter waits for Δt time for an Ack this protocol is called stop and wait protocol.

3. A simplex protocol for a noisy channel

When this protocol fails?

At this situation protocol fails because the receiver receives a duplicate frame and there is no way to find out whether
the receiver frame is original or duplicate. So the protocol fails at this situation.

Now what is needed is some way for the Rx to distinguish a frame and a duplicate. To achieve this, the sender has to
put a sequence number in the header of each frame it sends. The Rx can check the sequence number of each
arriving frame to see if it is a new frame or a duplicate.

12
Computer Networks

Here a question arises: What is the minimum number of bits needed for the sequence number? The ambiguity is
between a frame and its successor. A 1-bit sequence number (0 or 1) is therefore sufficient. At each
instant of time, the receiver excepts a particular sequence number next. Any arriving frame containing wrong
sequence number is rejected as a duplicate. When a frame containing the correct sequence number arrives, it is
accepted, passed to the network layer and then expected sequence number is incremented i.e. 0 becomes 1 and
one becomes 0. Protocols in which a sender waits for a positive ack before advancing to the next data item are
often called PAR (positive ack with retransmission) or ARQ (automatic repeat request).

When this protocol fails?

6. Now A thinks that the Ack received is the ack of new frame F0 and A sends nextframe F1. So a frame
F0 is missed. At this situation this protocol fails.

PIGGY BACKING
In most practical situations there is a need of transmitting data in both directions. This can be achieved by full duplex
transmission. If this is done we have two separate physical circuits each with a ‘forward ‘ and ‘reverse’ channel.
In both cases, the reverse channel is almost wasted. To overcome this problem a technique called piggy backing
is used.

The technique of temporarily delaying outgoing acknowledgements so that they can be hooked onto the next outgoing
data frame is known as piggy backing.

However, piggybacking introduces a complication not present with separate acknowledgements. How long should the
data link layer wait longer than the sender’s timeout period, the frame will be retransmitted, defeating the whole
purpose of having acknowledgements. Of course, the data link layer cannot foretell the future, so it must resort to
some ad hoc scheme, such as waiting a fixed number of milli seconds. If a new packet arrives quickly, the
acknowledgement is piggy backed onto it; otherwise, if no new packet has arrived by the end of this time period,
the data link layer just sends a separate acknowledgement frame.
13
Computer Networks

SLIDING WINDOW PROTOCOLS


In all sliding window protocols, each outbound frame contains a sequence number, ranging from 0 up to some
maximum. The maximum is usually 2n –1 so the sequence number fits nicely in an n-bit field. The stop-and-wait
sliding window protocol uses n=1, restricting the sequence numbers to 0 and 1, but more sophisticated versions
can use arbitrary n.

The essence of all sliding window protocols is that at any instant of time, the sender maintains a set of sequence
numbers corresponding to frames it is permitted to send. These frames are said to fall with in the sending window.
Similarly the receiver also maintains a receiving window corresponding to the set of frames it is permitted to
accept. The sender’s window and the receiver’s window need not have the same lower and upperlimits, or even
have the same size. In some protocols they are fixed in size, but in others they can grow or shrink as frames are
sent and received.

The sequence numbers with in the sender’s window represent frames sent but as yet not acknowledged. Whenever a
new packet arrives from the network layer, it is given the next highest sequence number, and the upper edge of
the window is advanced by one. When an acknowledgement comes in, the lower edge is advanced by one. In this
way the continuously maintains a list of unacknowledged frames.

PIPELINING
1. Upto now we made the assumption that the transmission time required for a frame to arrive at the receiver
plusthe transmission time for the ack to come back is negligible.
2. Sometimes this is not true, when there is a long round trip propagation time is there.

14
Computer Networks
3. In these cases round trip propagation time can have important implications for the efficiency of the
bandwidthutilization.
Consider the below example.
Let the channel capacity b = 50Kbps.
round trip propagation delay = 500ms
Frame size = 1000bits
Without considering the round trip propagation delay
For one frame the time taken will be = 1000/500 ms = 20 ms
Considering the round trip propagation delay

For one frame the time taken will be = 500 ms +20 ms = 270 ms
The channel utilization = (20/520)*100 = 4%

i.e. We are wasting 96% of channel time. To overcome this problem we will go for a technique called
PIPELIING.

In this technique, the sender is allowed to transmit upto ‘w ‘ frames before blocking, instead of just 1.With an
appropriate choice of w the sender will be able to continuously transmit frames for a time equal to the round trip
transmit time without filling up the window.

In the above example w would be at least 26 frames. (520/20 = 26 frames)

By the time it has finished sending 26 frames, at t=520 ms, the ack for frame 0 will have just arrived. Thereafter ack
will arrive every 20 ms, so the sender always gets permission to continue just when it needs it. Hence, we can say
the sender window size is 26.

Derivation:
Let the channel capacity = b Bps

Let the frame size = l bits

Let the round trip delay = R secs

To send one frame the time will be l/b secs

Due to round trip delay the time taken will be (l/b + R) Sec = l+Rb/b Sec

The channel utilization is l/b (l/b + R) Sec = (l / l + Rb) Sec

If l > bR the efficiency will be greater than 50%.If l < bR the efficiency will be less than 50%.

If l = bR the efficiency will be 50%.

Ex 1. A channel has a bit rate of 4 kbps and a propagation delay of 20msec.For what rage of frame sizes does stop
and wait give an efficiency of at least 50 % ?

15
Computer Networks
2. Consider an error free 64 kbps channel used to send 512 –byte data frames in one direction, with very short
acknowledgements coming back the other way. What is the maximum throughput for window sizes of 1,7,15,and
127?

Pipelining frames over an unreliable channel raises some serious issues.

First, what happens if a frame in the middle of a long stream is damaged or lost? When a damaged frame arrives at
the receiver, it obviously should discarded, but what should the receiver do with all the correct frames following
it?

There are two basic approaches to dealing with errors.

1. Go Back ‘n’
2. Selective repeat or Selective Reject
One way called in go back n, the receiver simply to discard all subsequent frames, sending no acknowledgements for
the discard frames. In the other words, the data link layer refuses to accept any frame except the next one it must
give to the network layer.

Selective Repeat:
The receiving data link layer store all the correct frames following the bad frame, not all itssuccessors. If the second
try succeeds the receiving data link layer will now have many correct frames in sequence, so they can all be
handed off to the network layer quickly andthe highest number acknowledged. This strategy corresponds to a
0 1 2 3 4 5 2 3 4 5 6 7 0
receiver window larger than 1.

0 1 E D D D 2 3 4 5 6

Discarded frames

Error

(a) Go-back-N

16
Computer Networks

b) Selective reject

MEDIUM ACCESS CONTROL SUBLAYER (MAC)


Networks can be categories in to two ways
a) Point to point

b) Broad cast channel

- In broadcast network, the key issue is how to share the channel among several users.

- Ex a conference call with five people

-Broadcast channels are also called as multi-access channels or random access channels.

-Multi-access channel belong to a sublayer at the DL layer called the MAC sublayer.

The Channel Allocation problem:

a) Static channel allocation in LANs & MANs


i) FDM ii) TDM
Drawbacks: -1) Channel is wasted if one or more stations do not send data.

2) If users increases this will not support.

b) Dynamic channel allocation


i) Pure ALOHA & Slotted ALOHA
ii) CSMA
• CSMA/CA
• CSMA/CD
Pure ALOHA

-1970’s Norman Abramson end his colleagues devised this method, used ground –based radio broad costing. This is
called the ALOHA system.
-The basic idea, many users are competing for the use of a single shared channel.
-There are two versions of ALOHA: Pure and Slotted.

-Pure ALOHA does not require global time synchronization, where as in slotted ALOHA the time is divided into
discrete slots into which all frames must fit.
-Let users transmit whenever they have data to be sent.

-There will be collisions and all collided frames will be damaged.

-Senders will know through feedback property whether the frame is destroyed or not by listening

channel.[-With a LAN it is immediate, with a satellite, it will take 270m sec.]

-If the frame was destroyed, the sender waits random amount of time and again sends the frame.

-The waiting time must be random otherwise the same frame will collide over and over.

17
Computer Networks

Frames are transmitted at completely arbitrary times

-Whenever two frames try to occupy the channel at the same time, there will be a collision and both will be
destroyed.

-We have to find out what is the efficiency of an ALOHA channel?

-Let us consider an infinite collection of interactive users sitting at their systems (stations).

-A user will always in two states typing or waiting.

-Let the ‘Frame time’ denotes the time required to transmit one fixed length frame.

-Assume that infinite populations of users are generating new frames according to possion distribution with mean
N frames per frame time.

-If N>1 users are generating frames at a higher rate than the channel can handle.

-For reasonable throughput 0<N<1.

-In addition to new frames, the station also generates retransmission of frames.

-Old and new frames are G per frame time.

-G> N

-At low load there will be few collisions, so G ~ N

-Under all loads, the throughput S = GPo, where Po is the probability that a frame does not suffer a collision.

-A frame will not suffer a collision if no other frames are sent with one frame time of its start.

-Let ‘t’ be the time required to send a frame.

-If any other user has generated a frame between time to and to+t, the end of that frame will collide with the
beginning of the shaded frame.
18
Computer Networks

-Similarly, any other frame started b/w to+t and to+2t will bump into the end of the shaded frame.

-The probability that ‘k’ frames are generated during a given frame time is given by the possion distribution:

Pr[k] = Gke-G
k!

-The probability of zero frames is just e-G

-In an interval two frame times long, the mean number at frames generated is 2G.

-The probability at no other traffic being initiated during the entire vulnerable period is given by

Po = e-2G

S= Ge-2G [S=GPo]
The Maximum through put occurs at G=0.5 with S=1/2e = 0.184

The channel utilization at pure ALOHA =18%.

Throughput versus offered traffic for ALOHA systems


Slotted ALOHA

-In 1972, Roberts’ devised a method for doubling the capacity of ALOHA system.

-In this system the time is divided into discrete intervals, each interval corresponding to one frame.
19
Computer Networks

-One way to achieve synchronization would be to have one special station emit a pip at the start of each interval, like
a clock.

-In Roberts’ method, which has come to be known as slotted ALOHA, in contrast to Abramson’s pure ALOHA; a
computer is not permitted to send whenever a carriage return is typed.

-Instead, it is required to wait for the beginning of the next slot.

-Thus the continuous pure ALOHA is turned into a discrete one.

-Since the vulnerable period is now halved, the of no other traffic during the same slot as our test frame is e-G which
leads to

S = Ge –G

- At G=1, slotted ALOHA will have maximum throughput.


- So S=1/e or about 0.368, twice that of pure ALOHA.
- The channel utilization is 37% in slotted ALOHA.
Carrier Sense Multiple Access Protocols
Protocols in which stations listen for a carrier (transmission) and act accordingly are called carries sense protocols.

Persistent CSMA

When a station has data to send, it first listens to the channel to see if any one else is transmitting at that moment. If
the channel is busy, the station waits until it become idle. When the station detects an idle channel, it transmits a
frame. If a collision occurs, the station waits a random amount of time and starts all over again. The protocol is
called 1- persistent also because the station transmits with a probability of 1 when it finds the channel idle.

The propagation delay has an important effect on the performance of the protocol. The longer the propagation delay
the worse the performance of the protocol.

Even if the propagation delay is zero, there will be collisions. If two stations listen the channel, that is idle at the same,
both will send frame and there will be collision.

Non persistent CSMA

In this, before sending, a station sense the channel. If no one else is sending, the station begins doing so it self.
However, if the channel is busy, the station does not continually sense it but it waits a random amount of time
and repeats the process.

This algorithms leads to better channel utilization but longer delays then 1-persistent CSMA.

With persistent CSMA, what happens if two stations become active when a third station is busy? Both wait for the
active station to finish, then simultaneously launch a packet, resulting a collision. There are two ways to handle
this problem.

a) P-persistent CSMA b) exponential backoff.

P-persistent CSMA
The first technique is for a waiting station not to launch a packet immediately when the channel becomes idle, but
first toss a coin, and send a packet only if the coin comes up heads. If the coin comes up tails, the station waits
20
Computer Networks

for some time (one slot for slotted CSMA), then repeats the process. The idea is that if two stations are both
waiting for the medium, this reduces the chance of a collision from 100% to 25%. A simple generalization of the
scheme is to use a biased coin, so that the probability of sending a packet when the medium becomes idle is not
0.5, but p, where 0< p < 1. We call such a scheme P-persistent CSMA. The original scheme, where p=1, is thus
called 1-persitent CSMA.

Exponential backoff

The key idea is that each station, after transmitting a packet, checks whether the packet transmission was successful.
Successful transmission is indicated either by an explicit acknowledgement from the receiver or the absence of a
signal from a collision detection circuit. If the transmission is successful, the station is done. Otherwise, the station
retransmits the packet, simultaneously realizing that at least one other station is also contending for the medium.
To prevent its retransmission from colliding with the other station’s retransmission, each station backs off (that
is, idles) for a random time chosen from the interval [0,2*max-propagation_delay] before retransmitting its
packet. If the retransmission also fails, then the station backs off for a random time in the interval [0,4*
max_propagation_delay], and tries again. Each subsequent collision doubles the backoff interval length, until the
retransmission finally succeeds. On a successful transmission,the backoff interval is reset to the initial value.
We call this type of backoff exponential backoff.

CSMA/CA

In many wireless LANS, unlike wired LANS, the station has no idea whether the packet collided with another packet
or not until it receives an acknowledgement from receiver. In this situation, collisions have a greater effect on
performance than with CSMA/CD, where colliding packets can be quickly detected and aborted. Thus, it makes
sense to try to avoid collisions, if possible. CSMA/CA is basically p-persistence, with the twist that when the
medium becomes idle, a station must wait for a time called the interframe spacing or IFS before contending for a
slot. A station gets a higher priority if it is allocated smaller inter frame spacing.

When a station wants to transmit data, it first checks if the medium is busy. If it is, it continuously senses the medium,
waiting for it to become idle. When the medium becomes idle, the station first waits for an interframe spacing
corresponding to its priority level, then sets a contention timer to a time interval randomly selected in the range
[0,CW], where CW is a predefined contention window length. When this timer expires, it transmits a packet and
waits for the receiver to send an ack. If no ack is received, the packet is assumed lost to collision, and the source
tries again, choosing a contention timer at random from an interval twice as long as the one before(binary
exponential backoff). If the station senses that another station has begun transmission while it was waiting for the
expiration of the contention timer, it does not reset its timer, but merely freezer it, and restarts the countdown
when the packet completes transmission. In this way, stations that happen to choose a longer timer value get
higher priority in the next round of contention.

Collision-Free Protocols

A Bit-Map Protocol
In the basic bit-map method, each contention period consists of exactly N slots. If station0 has a frame to send, it
transmits a 1 bit during the zeroth slot. No other station is allowed to transmit during this slot. Regardless of what
station 0 does, station 1 gets the opportunity to transmit a 1during slot 1, but only if it has a frame queued. In
general, station j may announce the fact that it has a frame to send by inserting a 1 bit into slot j. after all N slots
have passed by, each station has complete knowledge of which stations with to transmit.

21
Computer Networks

The basic bit-map protocol


Since everyone agrees on who goes next, there will never be any collisions. After the last ready station has transmitted
its frame, an event all stations can easily monitor, another Nbit contention period is begun. If a station becomes
ready just after its bit slot has passed by, it is out of luck and must remain silent until every station has had a
chance and the bit map has come around again. Protocols like this in which the desire to transmit is broadcast
before the actual transmission are called reservation protocols.

Binary Countdown
A problem with the basic bit-map protocol is that the overhead is 1 bit per station. A station wanting to use the channel
now broadcasts its address as a binary bit string, starting with the high-order bit. All addresses are assumed to be
the same length. The bits in each address position from different stations are BOOLEAN ORed together. We will
call this protocol binary countdown. It is used in Data kit.

As soon as a station sees that a high-order bit position that is 0 in its address has been overwritten with a 1, it gives
up. For example, if station 0010,0100,1001, and 1010 are all trying to get the channel, in the first bit time the
stations transmit 0,0,1, and 1, respectively. Stations 0010 and 0100 see the 1 and know that a higher-numbered
station is competing for the channel, so they give up for the current round. Stations 1001 and 1010 continue.

The next bit is 0, and both stations continue. The next bit is 1, so station 1001 gives up. The winner is station 1010,
because it has the highest address. After winning the bidding, it may now transmit a frame, after which another
bidding cycle starts.

The binary countdown protocol. A dash indicates silence

22
Computer Networks

IEEE Standard 802 for LANS and MANS

The IEEE 802.3 is for a 1-persistent CSMA/CD LAN. Xerox built a 2.94 Mbps CSMA/CD system to connect over
100 personal workstations on 1-Km cable. This system was called Ethernet through which electromagnetic
radiation was once thought to propagate. Xerox DEC and Intel came with another standard for 100 Mbps Ethernet.
This differs from old one that it runs at speeds from 1 to 10 Mbps on various media. The second difference
between these two is in one header (802.3 length field is used for packet type in Ethernet).

23
Computer Networks

802.3 Cabling

Five types of cabling are commonly used, 10Base5 cabling called thick Ethernet, came first. It resembles a yellow
garden hose, with markings every 2.5 m to show where the taps go. Connections to it are generally made using
vampire taps, in which a pin is carefully forced halfway into the coaxial cable’s core. The notation 10Base5
means that it operates at 10 Mbps, uses baseband signaling, and can support segments of up to 500m.

Name Cable Max. segment Nodes/seg. Advantages


10Base5 Thick coax 500 m 100 Good for backbones
10Base2 Thin coax 200 m 30 Cheapest system

10Base-T Twisted pair 100 m 1024 Easy maintenance


10Base-F Fiber optics 2000 m 1024 Best between buildings

The second cable type was 10Base2 or thin Ethernet, which, in contrast to the garden- hose-like thick Ethernet, bends
easily. Connections to it are made using industry standard BNC connectors to form T-junctions, rather than using
vampire taps. These are easier to use and more reliable. Thin Ethernet is much cheaper and easier to install, but it
can run for only 200m and can handle only 30 machines per cable segment.

Cable breaks, bad taps, or loose connectors can be detected by a devise called time domain reflectometry.

For 10Base5, a transceiver is clamped securely around the cable so that its tap makes contact with the inner core.
The transceiver contains the electronics that handle carrier

detection and collision detection. When a collision is detected, the transceiver also puts a special invalid signal on the
cable to ensure that all other transceivers also realize that a collision has occurred.

The transceiver cable terminates on an interface board inside the computer. The interface board contains a controller
chip that transmits frames to, and receives frames from, the transceiver. The controller is responsible for
assembling the data into the proper frame format, as well as computing checksums on outgoing frames and
verifying them on incoming frames.

With 10Base2, the connection to the cable is just a passive BNC T-junction connector. The transceiver electronics
are on the controller board, and each station always has its own transceiver.

With 10Base-T, there is no cable at all, just the hub (a box full of electronics). Adding or removing a station is simple
in this configuration, and cable breaks can be detected easily. The disadvantage of 10Base-T is that the maximum
cable run from the hub is only 100m, may be 150m if high-quality (category 5) twisted pairs are used. 10Base-
Tis becoming steadily more popular due to the ease of maintenance. 10Base-F, which uses fiber optics. This
alternative is expensive due to the cost of the connectors and terminators, but it has excellent noise immunity and
is the method of choice when running between buildings or widely separated hubs.

Each version of 802.3 has a maximum cable length per segment. To allow larger networks, multiple cables can be
connected by repeaters. A repeater is a physical layer device. It receives, amplifies, and retransmits signals in
both directions. As far as the software is concerned, a series of cable segments connected by repeaters is no
different than a single cable (except for some delay introduced by the repeater). A system may contain multiple
cable segments and multiple repeaters, but no two transceivers may be more than 2.5km apart and no path between
any two transceivers any traverse more than four repeaters.
24
Computer Networks

802.3 uses Manchester Encoding and differential Manchester Encoding

25
Computer Networks

The 802.3 MAC sub layer protocol:

I) Preamble:
Each frame start with a preamble of 7 bytes each containing a bit pattern 10101010.

II) Start of frame byte:


It denotes the start of the frame itself. It contains 10101011.

III) Destination address:

This gives the destination address. The higher order bit is zero for ordinary address and 1for group address (Multi
casting). All bits are 1s in the destination field frame will be delivered to all stations (Broad casting).

The 46th bit (adjacent to the high-order bit) is used to distinguish local from global addresses.

IV) Length field:


This tells how many bytes are present in the data field from 0 to 1500.

V) Data field:
This contains the actual data that the frame contains.

VI) Pad:
Valid frame must have 64 bytes long from destination to checksum. If the frame size less than 64 bytes pad field is
used to fill out the frame to the minimum size.

VII) Checksum:

It is used to find out the receiver frame is correct or not. CRC will be used here.

26
Computer Networks

Other Ethernet Networks

Switched Fast Gigabit

Switched Ethernet:

- 10 Base-T Ethernet is a shared media network.


- The entire media is involved in each transmission.
- The HUB used in this network is a passive device. (not intelligent).
- In switched Ethernet the HUB is replaced with switch. Which is a active device(intelligent )
Fast Ethernet

Gigabit Ethernet

IEEE 802.4 (Token Bus)

802.3 frames do not have priorities, making them unsuited for real-time systems in which important frames should
not be held up waiting for unimportant frames. A simple system with a known worst case is a ring in which the
stations take turns sending frames. If there are n stations and it takes T sec to send a frame, no frame will ever
have to wait more than nT sec to be sent.

27
Computer Networks

This standard,802.4, described


as a token bus. Physically, the token bus is a linear or tree-shaped cable onto which the stations are attached.
Logically, the stations are organized into a ring, with each station knowing the address of the station to its “left”
and “right.” When the logical ring is initialized, the highest numbered station may send the first frame. After it
is done, it passes permission to its immediate neighbor by sending the neighbor a special control frame called a
token. The token propagates around the logical ring, with only the token holder being permitted to transmit frames.
Since only one station at a time holds the token, collisions do not occur.

Since the cable is inherently a broadcast medium, each station receives each frame, discarding those not addressed to
it. When a station passes the token, it sends a token frame specifically addressed to its logical neighbor in the ring,
irrespective of where that station is physically located on the cable. It is also worth noting that when stationsare
first powered on, they will not be in the ring, so the MAC protocol has provisions for adding stations to, and
deleting stations from, the ring. For the physical layer, the token bus uses the 75-ohm broadband coaxial cable
used for cable television. Both single and dual-cable systems are allowed, with or without head-ends.

The frame control field is used to distinguish data frames from control frames. Fro data frames, it carries the frame’s
priority. It can also carry an indicator requiring the destination station to acknowledge correct or incorrect receipt
of the frame.

For control frames, the frame control field is used to specify the frame type. The allowed types include token
passing and various ring maintenance frames, including the mechanism for letting new stations enter the
ring, the mechanism for allowing stations to leave the ring, and so on.

28
Computer Networks

Connecting devices

Connecting devices and the OSI model

Bridges

LANS can be connected by devices called bridges, which operate in the data link layer. Bridges do not examine the
network layer header and can thus copy IP, IPX, and OSI packets equally well.

The various reasons why the bridges are used.

1. Many university and corporate departments have their own LANS, primarily to connect their own personal
computers, workstations, and servers. Since the goals of the various departments differ, different departments
choose different LANS, without regard to what other departments are doing. Sooner or later, there is a need
for interaction, so bridgesare needed.
2. The organization may be geographically spread over several buildings separated by considerable distances. It
may be cheaper to have separate LANS in each building and connect them with bridges and infrared links than
to run a single coaxial cable over the entire site.
3. It may be necessary to split what is logically a single LAN into separate LANS to accommodate the load. Putting
all the workstations on a single LAN- the total bandwidth needed is far too high. Instead multiple LANS
connected by bridges are used.
4. In some situations, a single LAN would be adequate in terms of the load, but the physical distance between the
most distant machines is too great (e.g., more than 2.5km for 802.3). Even if laying the cable is easy to do, the
29
Computer Networks

network would not work due to the excessively long round-trip delay. Only solution is to partition the LAN and
install bridges between the segments.
5. There is the matter of reliability. On a single LAN, a defective node that keeps outputting a continuous stream of
garbage will cripple the LAN. Bridges can be inserted at critical places, to prevent a single node which has gone
berserk from bringing down the entire system.
6. And last, bridges can contribute to the organization’s security. By inserting bridges at various places and
beingcareful not to forward sensitive traffic, it is possible to isolate parts of the network so that its traffic
cannot escape and fall into the wrong hands.

Types of Bridges
Simple Bridge

Simple bridges are the most primitive and least expensive type of bridge. A simple bridge links two segments and
contains a table that lists the addresses of all the stations included in each of them. Before a simple bridge can be
used, an operator must sit down and enter the addresses of every station. Whenever a new station is added, the
table must be modified. If a station is removed, the newly invalid address must be deleted. Installation and
maintenance of simple bridges are time-consuming and potentially more trouble than the cost savings are worth.

Transparent Bridge

A transparent, or learning, bridge builds its table of station addresses on its own as it performs its bridge functions.
When the transparent bridge is first installed, its table is empty . As it encounters each packet, it looks at both the
destination and the source addresses. It checks the destination to decide where to send the packet. If it does not
yet recognize the destination address, it relays the packet to all of the stations on both segments. It uses the source
address to build its table. As it reads the source address, it notes which side the packet came from and associates
that address with the segment to which it belongs. By continuing this process even after the table is complete, a
transparent bridge is also self-updating.

This bridge uses flooding and backward landing algorithms.

The routing procedure for an incoming frame depends on the LAN it arrives on (the source LAN) and the LAN its
destination is on (the destination LAN), as follows.

1) If destination and source LANS are the same, discard the frame.
2) If the destination and source LANS are different, forward the frame.
3) If the destination LAN is unknown, use flooding.
Two Parallel transparent bridges

30
Computer Networks

Spanning Tree Algorithm

Bridges are normally installed redundantly, which means that two LANs may be connected by more than one bridge.
In this case, if the bridges are transparent bridges, they may create a loop, which means a packet may be going
round and round, from one LAN to another and back again to the first LAN. To avoid this situation, bridges today
use what is called the spanning tree algorithm.

31

You might also like