You are on page 1of 121

Chapter 1

Computer Networks
INFO-3201

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


PART I
Overview of
Data Communications
and
Networking
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
DATA COMMUNICATION
Exchange of Data between two devices via some form of
transmission medium
Data  Information (in some format) that two devices want to
exchange with each other

Communication  process of sharing of information


Sharing  Local (face -to-face) or remote (long distance)

Telecommunication (Tele ‘far’ in Greek)


Communication involving telephony, telegraphy, television

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Data Communication & Networking
 The development of personal computer brought about
tremendous changes for business, industries, science &
education.
 Business today relies on computer network and internet
 Mails, documents, files are reached to our computers almost
instantaneously from any part of the world

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


1.1 Data Communication

Components

Data Representation

Direction of Data Flow

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


COMPONENTS: Five components of data communication

Message: Data to be communicated, popular forms include text, pictures,


audio, video
Sender: The device that sends data message, can be computer,
telephone, video camera…
Receiver: The device that receives data message, can be computer,
telephone, handset, TV
Transmission medium: Physical path by which a message is transferred
from sender to receiver, wired, wireless…
Protocol: Mutually agreeable set of rules that govern data communication
between the communicating devices. Without a protocols, two devices may
be connected but may not communicate
Person speaking Spanish cannot understand what is said by a person in
Japanese
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Direction of data flow –
1.Simplex,
2.Half-duplex,
3.Full-duplex

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.2 Communication Data Flow: Simplex

One device will always transmit and the other will always
receive

Such as, Keyboard can only input and monitor can only accept
output

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.3 Half-duplex

Both devices can transmit and receive BUT not at the same
time

When one transmits, other has to wait till it finishes its transmission

Such as, walkie-talkies

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.4 Full-duplex

Both devices can transmit and receive simultaneously

The capacity of a communication channel must be divided between two


directions

Such as, communication over telephone, both can talk and listen at the
same time

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Network
 A Network is a set of devices (also referred to as
nodes) connected by communication links.

 A node may be computer, printer or any other devices


capable of sending and receiving messages/ data
generated by other nodes on the network.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Distributed Processing
 Most of the networks uses distributed processing in
which a task is divided among multiple nodes /
computers
 Here, a single large machine is not responsible for all
aspects of a process

Control station
based
processing
Distributed
processing

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Network Criteria
 Performance [depends on # of network users, type of Transmission
medium, capabilities of connected hardware and efficiency of
software]
 Transit time

 Time required for a message to travel from one device to

another
 Response time

 Elapsed time between a query and a response

 Throughput

 average rate of successful message delivery over a

communication channel (bits/sec)


 Delay

 how long it takes for a bit of data to travel across the network

from one node or endpoint to another

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Network Criteria
 Reliability
 Reliability is measured by
 Frequency of Network failure
 Time takes by a link to recover from failure
 Network’s robustness in a catastrophe

 Security
 Security includes protecting data from
 unauthorized access
 Damage
 Development & implementing policies for recovery from
breaches and data losses

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Physical Structure of Network
Type of Connection: Point-to-point connection

A dedicated link (wired/ wireless) is established between two


devices

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Type of Connection: Multipoint/ multi-drop
connection

Link (wired/ wireless) is shared between multiple devices


either spatially or temporally

Spatially Shared connection: If several devices can use the link


simultaneously
Timeshared connection: If users can use the connection in turns

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.7 PHYSICAL TOPOLOGY : Categories of topology

Physical topology means the way a network is


laid out/ set up physically  Geometric
representation showing the relationship among all
the links and linking devices (nodes).

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.8 Fully connected mesh topology (for five
devices)

 Advantages:
 Dedicated channel ensures reliable
delivery as opposed to shared channel
 Robust and fail safe: If one link is
down data may still be exchanged
between a pair of nodes through other
available paths since multiple paths exists
between nodes
 Privacy & security: since message uses
dedicated line for an intended receiver so
only receiver can see it
 Easy identification and isolation of
faults since point-point link exists
 Disadvantages:
 Huge amount of cabling is required
 Hardware required to connect each link
(I/O ports etc. ) is expensive

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.9 Star topology

 A star topology does not allow a


device to connect to another
device directly
 Controller acts as exchange:
 If one device wants to send data , it
send that to controller which then
relays the data to specific recipient
 Advantage:
 A Star topology is less expensive ,
requires less wires, I/O ports
Central  Robust: If any link fails, that link will
controller be affected but the other links will
remain active as long as Hub is working
. So fault isolation is easy.
 Disadvantage:
 Dependency of the whole topology
on the Central controller. The whole
system will be dead if the hub goes
down.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.10 Bus topology: Used in the design of early LANs

 One long cable acts as backbone to link all the devices


 As a signal travels along the backbone it becomes weaker gradually and some of its energy gets
transformed into heat. So, there is a limit on the number of taps a bus can support and on the
distance between those taps

 A tap is a connector that is joined to the main cable


 Advantage
 Ease of installation, less cabling
 Disadvantage:
 Difficult to isolate faults
 A bus is normally designed to be optimally efficient at installation. Soit is difficult to add new devices
and requires modification and replace ment of entire backbone
 Fault / break in the bus cable stops all transmissions, even between devices on the same side of the
problem. The damaged area reflects the signal back to the origin creating noise

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.11 Ring topology

 Each device has dedicated point-to-


point link with devices on its either
side
 Each device on a ring act as repeated. If a
message received by a node which is not
Repeater Repeater
the intended receiver of the message, the
Repeat
message is passed to the next node
Repeater
er  Generally in Ring, signal circulates at all
times. If a node does not receive a signal
Repeater for a specified time it can issue an alarm
to the network operator
 Advantage:
 Easy to install and reconfigure
 Adding and deletion of devices are easier
 Fault isolation is simpler
 Disadvantage:
 A break in the ring can disable the entire
network. This can be solved by using a
dual ring

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Hybrid topology
A network can be hybrid. For example, we can have a main star topology
with each branch connecting several stations in a bus topology

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.12 Area coverage based Categories of networks

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.13 LAN

Telecommunications bit rates


Bps = 1 bit/s
Kbps = 1.000 bits/s
Mbps = 1.000 Kbits/s or 1.000.000 bits/s
Gbps = 1.000 Mbit/s or 1.000.000.000
bits/s
Tbps = 1.000 Gbit/s or
1.000.000.000.000 bits/s

LAN s are used to allow sharing of resources like computers (application


program, data) and printer

In a business environment, one of the computers may be given a large


capacity of disk drive and can act as a server for the clients. Software
stored on this server may be used by the workgroup

LAN is also distinguished by their transmission media (wired, wireless,


optical fiber) and topology (star, ring, bus).

LAN speed are normally 100 – 100 Mbps


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 1.13 LAN (Continued)

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.14 MAN

Digital subscriber
line (DSL, originally digital
subscriber loop) is a
family of technologies that
provide Internet access by
transmitting digital data
over the wires of a
local telephone network.

It normally covers the area of a city or a town.


Designed for the customer who need high speed connectivity, normally to
INTRNET
Ex 1: part of the Telephone company network that can provide high speed
DSL
Ex 2: cable TV network that was originally designed for cable TV but today
also used for high speed data connection to the Internet.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 1.15 WAN

WANs are used to connect LANs and other types of networks


together, so that users and computers in one location can communicate
with users and computers in other locations.
WAN can be built by organizations privately or by Internet service
providers, provide connections from an organization's LAN to the
Internet.
WANs are often built using leased lines. At each end of the leased
line, a router connects the LAN on one side with a second router within
the LAN on the other. Leased lines can be very expensive.
Instead of using leased lines, WANs can also be built using less
costly circuit switching or packet switching methods
 X.25 was an important early WAN protocol
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Wide Area Network

Line leased from a telephone or cable TV operator

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


To create a backbone WAN for connecting these three entities (two LANs
and the president's computer), a switched WAN (operated by a service
provider such as a telecom company) has been leased.
To connect the LANs to this switched WAN, however, three point-to-point
WANs are required.
These point-to-point WANs can be a high-speed DSL line offered by a telephone
company or a cable modem line offered by a cable TV provider

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


1.3 The Internet

A Brief History

The Internet Today

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Internet
 When two or more networks are connected , they become an
internetwork or internet
 The most notable internet is called the Internet (uppercase letter I ), a
collaboration of more than hundreds of thousands of interconnected
networks.
 Started in 1969.
 Private individuals as well as various organizations such as government agencies,
schools, research facilities, etc. in more than 100 countries use the Internet.
 The Advanced Research Projects Agency (ARPA) in the Department of Defense
(DoD) was interested in finding a way to connect computers so that the
researchers they funded could share their findings, thereby reducing costs and
eliminating duplication of effort.
 Thus ARPANET, a small network of connected computers, started
 By 1969, ARPANET was a reality. Four nodes, at the University of California at Los
Angeles (UCLA), the University of California at Santa Barbara (UCSB), Stanford
Research Institute (SRI), and the University of Utah, were connected via the
IMPs(Interface message processor, a special computer) to form a network.
 Software called the Network Control Protocol (NCP) provided communication
between the hosts.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


 Today most end users who want Internet connection use the services of Internet service
providers (ISPs). There are international service providers (sprint, UUNet, AGIS),
national service providers (Jio, Airtel, Vi, BSNL etc.), ), regional service
providers, and local service providers (Speednet, Alliance etc.).

 Some national ISP networks are also connected to one another by private switching
stations called peering points.

 Regional Internet Service Providers :Regional intemet service providers or regional


ISPs are smaller ISPs that are connected to one or more national ISPs. They are at the
third level of the hierarchy with a smaller data rate.

 Local Internet Service Providers :Local Internet service providers provide direct
service to the end users. The local ISPs can be connected to regional ISPs or directly to
national ISPs. Most end users are connected to the local ISPs.
 List of govt. & privately owned list of ISPs in India (national & regional)
http://en.wikipedia.org/wiki/List_of_internet_service_providers_in_India

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 1.16 Internet today

NAP: Network
Access Point
The point from
which an
Internet service
provider (ISP)
drops down its
lines and
establishes a
peering
arrangement to
provide Internet
connectivity to
customers.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


1.4 Protocols and Standards

Protocols

Standards

Standards Organizations

Internet Standards
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Protocols & Standards
 In computer networks, communication occurs between entities in
different systems. An entity is anything capable of sending or
receiving information. However, two entities can not simply
send bit streams to each other and expect to be
understood.
 For communication to occur, the entities must agree on a protocol.
A protocol is a set of rules that govern data communications.
 A protocol defines
 what is communicated,
 how it is communicated, and
 when it is communicated.
 The key elements of a protocol are
 syntax,
 semantics, and
 timing.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Protocol
 Syntax. The term syntax refers to the structure or format of the data,
meaning the order in which they are presented. For example, a simple
protocol might expect the first 8 bits of data to be the address of the
sender, the second 8 bits to be the address of the receiver, and the rest
of the stream to be the message itself.

 Semantics. The word semantics refers to the meaning of each section


of bits. How is a particular pattern to be interpreted, and what action is
to be taken based on that interpretation? For example, does an address
identify the route to be taken or the final destination of the message?

 Timing. The term timing refers to two characteristics:


 when data should be sent and
 how fast they can be sent. For example, if a sender produces data at 100 Mbps but
the receiver can process data at only 1 Mbps, the transmission will overload the
receiver and some data will be lost.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Standards
 Data communication standards fall into two categories: de facto
(meaning "by fact" or "by convention") and de jure (meaning "by
law" or "by regulation").

 De facto. Standards that have not been approved by an organized


body but have been adopted as standards through widespread use
are de facto standards. De facto standards are often established
originally by manufacturers who seek to define the functionality of a
new product or technology.

 De jure. Those standards that have been legislated by an officially


recognized body are de jure standards.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Standard Bodies
 International Organization for Standardization (ISO).
 International Telecommunication Union Telecommunication
Standards Sector (ITU-T).
 American National Standards Institute (ANSI).
 Institute of Electrical and Electronics Engineers (IEEE).

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Forum
 To accommodate the need for working models and agreements and
to facilitate the standardization process, many special-interest groups
have developed forums made up of representatives from interested
corporations.

 The forums work with universities and users to test, evaluate, and
standardize new technologies.

 By concentrating their efforts on a particular technology, the forums


are able to speed acceptance and use of those technologies in the
telecommunications community.

 The forums present their conclusions to the standards


bodies.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Regulatory Agencies
 All communications technology is subject to regulation by government agencies such as the Federal
Communications Commission (FCC) in the United States.

 The purpose of these agencies is to protect the public interest by regulating radio, television, and wire/cable
communications.

 The FCC has authority over interstate and international commerce as it relates to communications.

Internet Standard
 An Internet draft is a working document (a work in progress) with no official status and a 6-month lifetime. Upon
recommendation from the Internet authorities, a draft may be published as a Request for Comment (RFC).

 Each RFC is edited, assigned a number, and made available to all interested parties. RFCs go through maturity
levels and are categorized according to their requirement level.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Chapter 2

Network
Models
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Reference models
OSI & TCP/IP reference model
& comparative study

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


2.1 Layered Tasks
A network uses a combination of hardware & software to
send data from one location to other

Sender, Receiver, and Carrier

Hierarchy

Services

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.1 Services - Sending a letter

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


2.2 Internet Model

Peer-to-Peer Processes

Functions of Layers

Summary of Layers

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.2 Internet Model/ TCP/IP Model

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.3 Peer-to-peer processes

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.4 An exchange using the Internet model

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.5 Physical layer

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Note:

The physical layer is responsible for


transmitting individual bits from one
node to the next.
• Defines the physical characteristics of the medium

• encoding of bits into signals

•Fixing transmission rate

• Synchronization of clocks of both sender & receiver

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.6 Data link layer

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Note:

The data link layer is responsible for


transmitting frames from
one node to the next.(node-to-node)
• Framing the bits received from network layer

• Physical addressing (address of the connecting device that connects the next
network)

• Flow control to prevent overwhelming receiver

• Error control through detection of damaged or lost frames

• Access control of the medium


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 2.7 Node-to-node delivery

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.8 Example 1

•In Figure 2.8 a node with physical address 10 sends a frame to a node with
physical address 87.
•The two nodes are connected by a link.
•At the data link level this frame contains physical addresses in the header.
These are the only addresses needed.
•The rest of the header contains other information needed at this level. The
trailer usually contains extra bits needed for error detection

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.9 Network layer

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Note:

The network layer is responsible for


the delivery of packets from the
original source to the
final destination. (host-to-host)
• Logical addressing

•Physical addressing handles address problem locally. If a packet passes


the boundary of a network logical addressing helps to distinguish source
and destination systems

• Routing
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
The MAC address is only significant on the LAN to which a device is connected,
and it is not used or retained in the data stream once packets leave that network.

Any piece of internet software, such as a web browser, directs data to a


destination on the internet using the destination's IP address. That address is
inserted into the data packets that the network software stack sends out. People
rarely use the address numbers directly, instead using DNS names, which the
application translates into the matching number.

Internet routers move the packets from the source network to the destination
network and then to the LAN on which the destination device is connected. That
local network translates the IP address to a MAC address, adds the MAC address
to the data stream and sends the data to the right device.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 2.10 Source-to-destination delivery

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.11 Example 2
In Figure 2.11 data is sent from a
node with network address A and
physical address 10, located on one
LAN, to a node with a network
address P and physical address 95,
located on another LAN.
Because the two devices are located
on different networks, we cannot use
physical addresses only; the physical
addresses have local jurisdiction.
What we need here are universal
addresses that can pass through the
LAN boundaries. The network
(logical) addresses have this
McGraw-Hill characteristic.
©The McGraw-Hill Companies, Inc., 2004
Figure 2.12 Transport layer

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Note:

The transport layer is responsible for


delivery of a message from one process
to another.(process-to-process)
• Port addressing

• Segmentation and reassembly

• connection control

• flow control

• error control
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 2.12 Reliable process-to-process delivery of a message

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.14 Example 3

Data coming from the upper layers have port addresses j and k (j is the
address of the sending process, and k is the address of the receiving process).
Since the data size is larger than the network layer can handle, the data are
split into two packets, each packet retaining the port addresses (j and k).
In the network layer, network addresses (A and P) are added to each packet.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.15 Application layer

The application layer is responsible for


providing services to the user.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.16 Summary of duties

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


2.3 OSI Model

A comparison

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


 Open Systems Interconnection (OSI) is a set
of internationally recognized, non-proprietary
standards for networking and for operating
system involved in networking functions.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 2.17 OSI model

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


7. Application Layer All
7 Layers 6. Presentation Layer People
7. Session Layer Seem
8. Transport Layer To
9. Network Layer Need
10. Data Link Layer Data
11. Physical Layer Processing
 The presentation layer is responsible for
 translation, compression, and encryption.

 The session layer is responsible for


 Dialog control and synchronization.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Chapter 13

Multiple
Access
Source: https://slidetodoc.com/multiple-access-techniques-
by-dr-r-bharathi-apece/

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


When nodes or stations are connected and use a common link, called a
multipoint or broadcast link, we need a multiple-access protocol to
coordinate access to the link.

The problem of controlling the access to the medium is similar to the rules of
speaking in an assembly.

The procedures guarantee that the right to speak is upheld and ensure that
two people do not speak at the same time,
do not interrupt each other,
do not monopolize the discussion

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Random Access, Contention, Collision
 First, there is no scheduled time for a station to transmit.
 Transmission is random among the stations. That is why these methods are
called random access.
 Second, no rules specify which station should send next.
 Stations compete with one another to access the medium. That is why these
methods are also called contention methods.

 if more than one station tries to send, there is an access conflict--


collision--and the frames will be either destroyed or modified.

 To avoid access conflict or to resolve it when it happens, each station follows


a procedure that answers the following questions:
 When can the station access the medium?
 What can the station do if the medium is busy?
 How can the station determine the success or failure of the transmission?
 What can the station do if there is an access conflict?

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.3 ALOHA network

ALOHA, the earliest random access method, was developed at the


University of Hawaii in early 1970.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
 The back-off time TB is a random value that normally depends on K (the number of attempted
unsuccessful transmissions).

 The formula for TB depends on the implementation. One common formula is the binary
exponential back-off.

 Note that in this procedure, the range of the random numbers increases after each
collision.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Propagation delay (Tp)is defined as the amount of time it takes for a certain number of
bytes to be transferred over a medium. Propagation delay is the distance between the two
routers divided by the propagation speed.

Propagation delay = d/s where d is the distance and s is the speed.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


In a network based on packet switching, transmission delay  (Tfr) (or store-and-
forward delay) is the amount of time required to push all of the packet's bits into the
wire. In other words, this is the delay caused by the data-rate of the link.

Transmission delay is a function of the packet's length and has nothing to do with the
distance between the two nodes. This delay is proportional to the packet's length in bits,
It is given by the following formula:
DT = N / R
where
DT is the transmission delay
N is the number of bits, and
R is the rate of transmission (say in bits per second)

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
A Sketch of Frame Generation

Note that all packets have the same length because the
throughput of ALOHA systems is maximized by having a
uniform packet size.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Throughput in ALOHA
  throughput or network throughput is the average rate of successful
message delivery over a communication channel.

 The throughput is usually measured in bits per second (bit/s or bps)

 Let G the average number of frames generated by the system during one
frame transmission time. Then it can be proved that the
 average number of successful transmissions for pure ALOHA is S
= G x e -2G.
 Smax is 0.184, for G = 1/2.

 If one frame is generated during two frame transmission times, then 18.4
percent of these frames reach their destination successfully.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Slotted ALOHA
In slotted ALOHA we divide the time into slots of Tfr s and force
the station to send only at the beginning of the time slot.

there is still the possibility of collision if two stations try to send at the
beginning of the same time slot. However, the vulnerable time is now
reduced to one-half, equal to Tfr
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Throughput & Vulnerable Time in
slotted ALOHA

Therefore, if a station generates only one frame in this


vulnerable time (and no other station generates a frame
during this time), the frame will reach its destination
successfully.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 13.5 Collision in CSMA

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


CSMA
 Carrier sense multiple access (CSMA) requires that each
station first listen to the medium (or check the state of
the medium) before sending.

In other words, CSMA is based on the principle "sense before
transmit" or "listen before talk."

The vulnerable time for CSMA is the propagation time Tp. This is the
time needed for a signal to propagate from one end of the medium to the
other.

When a station sends a frame, and any other station tries to send a frame
during this time, a collision will result.

But if the first bit of the frame reaches the end of the medium, every station
will already have heard the bit and will refrain from sending.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Vulnerable Time
The vulnerable time for CSMA is the propagation time Tp. This is the time needed
for a signal to propagate from one end of the medium to the other.

When a station sends a frame, and any other station tries to send a frame during this
time, a collision will result. But if the first bit of the frame reaches the end of the medium,
every station will already have heard the bit and will refrain from sending.

The leftmost station A sends a frame at time t 1, which reaches the rightmost station D at
time t 1 + Tp. The gray area shows the vulnerable area in time and space.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.6 Persistence strategies

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
CSMA/CD
 The CSMA method does not specify the procedure following a
collision.
 Carrier sense multiple access with collision detection (CSMA/CD)
augments the algorithm to handle the collision.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


 The first difference is the addition of the persistence process.
We need to sense the channel before we start sending the frame by
using one of the persistence processes we discussed previously
(nonpersistent, 1-persistent, or p-persistent).
 The second difference is the frame transmission.
 In ALOHA, we first transmit the entire frame and then wait for an acknowledgment.
 In CSMA/CD, transmission and collision detection is a continuous process. We do not
send the entire frame and then look for a collision. The station transmits and receives
continuously and simultaneously (using two different ports).
 We constantly monitor in order to detect one of two conditions: either
transmission is finished or a collision is detected. Either event stops
transmission.

When we come out of the loop, if a collision has not been detected, it
means that transmission is complete; the entire frame is transmitted.
 Otherwise, a collision has occurred.

 The third difference is the sending of a short jamming signal that


enforces the collision in case other stations have not yet sensed the
collision.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Energy Level

We can say that the level of energy in a channel can have three values: zero,
normal, and abnormal. At the zero level, the channel is idle. At the normal
level, a station has successfully captured the channel and is sending its frame.
At the abnormal level, there
is a collision and the level of the energy is twice the normal level.

A station that has a frame to send or is sending a frame needs to monitor the
energy level to determine if the channel is idle, busy, or in collision mode.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


13.7 CSMA/CD procedure

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Throughput CSMA/CD
 The throughput of CSMA/CD is greater than that
of pure or slotted ALOHA.
 The maximum throughput occurs at a different
value of G and is based on the persistence
method and the value of p in the p-persistent
approach.
 For 1-persistent method the maximum throughput is
around 50 percent when G = 1.
 For non persistent method, the maximum throughput
can go up to 90 percent when G is between 3 and 8.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


How the collision is detected?
 The basic idea behind CSMA/CD is that a station needs
to be able to receive while transmitting to detect a
collision.
 When there is no collision, the station receives one signal: its
own signal.
 When there is a collision, the station receives two signals: its
own signal and the signal transmitted by a second station.
 To distinguish between these two cases, the received signals in
these two cases must be significantly different.
 In other words, the signal from the second station needs to add
a significant amount of energy to the one created by the first
station.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.8 CSMA/CA procedure

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


The sole reason for the 9.6 microsecond interframe gap in IEEE802.3 is to
allow the station that last transmitted to cycle its circuitry from transmit mode
to receive mode. Without the interframe gap, it is possible that a station would
miss a frame that was destined for it because it had not yet cycled back into
receive mode. However, most Ethernet cards in today's market are capable of
switching from transmit to receive in much less time than 9.6 microseconds.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


13.2 Control Access

Reservation

Polling

Token Passing

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.9 Reservation access method

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Polling

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.11 Poll

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.10 Select

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.12 Token-passing network

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.13 Token-passing procedure

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


13.3 Channelization

FDMA TDMA CDMA

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Note:

In FDMA, the bandwidth is divided


into channels.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Note:

In TDMA, the bandwidth is just one


channel that is timeshared.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Note:

In CDMA, one channel carries all


transmissions simultaneously.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.14 Chip sequences

Figure 13.15 Encoding rules

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.15 Encoding rules

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.16 CDMA multiplexer

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.17 CDMA demultiplexer

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.18 W1 and W2N

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Figure 13.19 Sequence generation

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Example 1
Check to see if the second property about orthogonal codes holds
for our CDMA example.

Solution
The inner product of each code by itself is N. This is shown for code C; you
can prove for yourself that it holds true for the other codes.

C . C = 

If two sequences are different, the inner product is 0.

B . C = 

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Example 2
Check to see if the third property about orthogonal codes holds for
our CDMA example.

Solution
The inner product of each code by its complement is N. This is shown for
code C; you can prove for yourself that it holds true for the other codes.

C . (C ) = 

The inner product of a code with the complement of another code is 0.

B . (C ) = 

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

You might also like