In bytes 1 Variable 2 or 4
Fig. Six fields make up the PPP frame
The following descriptions summarize the PPP frame fields illustrated in Fig.
Flag: A single byte that indicates the beginning or end of a frame. The flag field consists of the
binary sequence 01111110.
Address: A single byte that contains the binary sequence 11111111, the standard broadcast
address. PPP does not assign individual station addresses.
Control: A single byte that contains the binary sequence 00000011, which calls for
transmission of user data in an un-sequenced frame. A connectionless link service similar to
that of Logical Link Control (LLC) Type 1 is provided.
Protocol: Two bytes that identify the protocol encapsulated in the information field of the
frame. The most up-to-date values of the protocol field are specified in the most recent
Assigned Numbers Request for Comments (RFC).
Data: Zero or more bytes that contain the datagram for the protocol specified in the protocol
field. The end of the information field is found by locating the closing flag sequence and
allowing 2 bytes for the FCS field. The default maximum length of the information field is
1,500 bytes. By prior agreement, consenting PPP implementations can use other values for the
maximum information field is 1500 bytes. By prior agreement, consenting PPP
implementations can use other values for the maximum information field length.
Frame check sequence (FCS): Normally 16 bits (2 bytes). By prior agreement, consenting PPP
implementations can use a 32-bit (4-byte) FCS for improved error detection. The LCP can
negotiate modifications to the standard PPP frame structure. Modified frames, however, always
will be clearly distinguishable from standard frames.
2.6 MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
Multiple Access Protocols
20
Multiple access protocol regulates how different nodes sharing the same link can gain
transmission access to the link. MAC addresses are used in frame headers to identify the source
and the destination nodes on a single link. Because of this the data link layer is also sometimes
referred to as the MAC layer. The link layer uses the physical layer service put bits on the
medium. It is between the network layer and the physical layer.
There are three classes of multiple-access protocols in the literature:
• Channel partitioning (channelization) protocols
• Random access protocols
• Controlled access protocols (taking turns)
ALOHA
It is a random-access scheme for transmitting information for terminals sharing the same
channel.
It is simple in operation.
Information is transmitted over the shared channel as soon as it becomes available.
If there is collision because of more stations transmitting simultaneously, they will wait for
random
amount of time before transmitting the information again. It is called back off.
Efficiency of ALOHA:
Let L be the length of frame (bits) (constant).
R be rate of transmission.
L
Frame time = X
Let some frame arrive at time to and end at to + X.
21
This frame will collide if there is transmission from other stations between to-X and to
+ X as shown in Fig.
Let G be the total arrival rate of the system in frames/X seconds. G is also throughput of the
system.
Let G be total arrival rate of the system in frames/X seconds. G is also called total load of the
system.
With the assumption that the back-off spreads retransmissions such that new and repeated
frame transmission are equally likely to occur, the number of frames transmitted in a time
interval has Poisson distribution with average number of arrivals of 2G arrivals 2X seconds.
Hence, throughput S is equal to total arrival rate G times probability of successful transmission.
S = P [no collision]
=P[O transmissions in 2X seconds
=G=2e-2G
= Ge"2G
The plot of S versus G is shown in Fig.
22
It can be seen that the maximum value of S = at G = 0.5. That is system can achieve
Throughput of 18.4% only.
Slotted ALOHA: Performance of ALOHA can be improved by putting a restriction on time of
transmission i.e., stations will transmit only at a fixed time (Synchronize fashion). Thus,
reducing the
probability of collisions.
All stations keep track of transmission time slots and are allowed to initiate transmission only
at
beginning of slot.
Vulnerable time i.e., time of collision reduces to (t0)-X to Xi.e., X second
2.8 CSMA, WDMA, CSMA/CD, CSMA/CA
Carrier Sense Multiple Access Protocols
Protocols in which stations listen for carriers and take suitable action are called Carrier Sense
Protocols.
Following are some carrier sense protocols:
I-Persistent CSMA:
When a station has some data to send it listens to the channel.
If channel is busy, it waits until it becomes free or idle continuously sensing the channel.
23
If channel is idle, it transmits the frame.
It is called 1-persistent because whenever channel is idle the station transmits with probability
1.
Non-Persistent CSMA:
When station has some data to send, it listens to the channel and if channel is idle,
But then it does not sense the channel continuously as in 1-persistent CSMA. It waits for
random
period and then again senses the channel.
p-Persistent CSMA:
It applies to slotted channels.
When a station is ready to transit data and channel is idle it transmits with probability p and
decides not to transmit with probability q=1-p until next slot. If that slot is also idle it decides
to transmit or defer with probability p and q. This process is repeated until either frame is
transmitted or another station has started transmission.
If the channel is busy, it waits until next slot and repeats above step.
Controlled Access
In controlled access, the station consults one another to find which station has the right to send.
We discuss three popular methods:
Reservation
In reservation method, a station needs to make reservation before sending data. Time is divided
into intervals. In each interval, a reservation frame precedes the data frames sent in that interval.
If there are N stations in the system, there are exactly N reservation mini slots in reservation
frame. Each mini slot belongs to a station. When a station needs to send data frame, it makes
reservation in its own mini slot. The stations that have made reservations can send their data
frames after the reservation frame.
12345 12345 12345
Reservation Access
24
In Fig above, it shows a situation with five stations and five mini slot reservation frames. In
the first interval, only stations 1, 3 and 4 have made reservations. In the second interval, only
station 1 has made a reservation.
Note: Below figure is why collision is not detected by CSMA.
Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
A Shared Medium
The Ethernet network may be used to provide shared access by a group of attached nodes to
the physical medium which connects the nodes. These nodes are said to form a Collision
Domain. All frames sent on the medium are physically received by all receivers, however the
Medium Access Control (MAC) header contains a MAC destination address which ensure only
the specified destination actually forwards the received frame (the other computers all discard
the frames which are not addressed to them).
Consider a LAN with four computers each with a Network Interface Card (NIC) connected by
a common Ethernet cable.
CSMA with Collision Avoidance (CSMA/CA) does not employ collision detection. CSMA/CA
proves to be useful especially in wireless networks where collision detection is very difficult.
There are two difficulties with collision detection in wireless. The first difficulty is that the
25
power of the received signal is usually very weak in comparison to the power of the transmitted
signal Secondly, the so- called hidden terminal problem
One computer (S2) uses a NIC to send a frame to the shared medium, which has a destination
address corresponding to the source address of the NIC in the S3 computer.
Note - Below figure is showing CSMA/CA in IEEE 802.11
Clear-To-Send (CTS) message. The CTS message indicates which node is allowed to transmit
next. Upon receiving the CTS broadcast, the node
That is cleared for transmission will transmit its frame while the other
Nodes will wait. Note that RTS messages can still collide with each other
And with CTS messages of the access point. However, since these are tiny packets the loss due
to such collisions is minimal compared to the gain from reduced numbers of large frame
collisions. The CSMA/CA operation with channel reservation (collision avoidance)
Note- CSMA/CA with channel reservation
26
Wavelength Division Multiple Access (WDMA)
A technique that manages multiple transmissions on a fiber-optic cable system using
wavelength division multiplexing (WDM). WDMA divides each channel into a set of time slots
using time- division multiplexing, and data from different sources is assigned to a repeating set
of time slots.
2.9 Binary Exponential Back-off Algorithm
Binary Exponential Back -off algorithm
CSMA/CD
In networks where the propagation delay is small relative to the packet transmission time, the
CSMA scheme and its variants can result in smaller average delays and higher throughput than
with the ALOHA protocols. This performance improvement is due primarily to the fact that
carrier sensing reduces the number of collisions and, more important, the length of the collision
interval. The main drawback of CSMA-based schemes, however, is that contending stations
continue transmitting their data packets even when collision occurs. For long data packets, the
amount of wasted bandwidth is significant compared with the propagation time. Furthermore,
nodes may suffer unnecessarily long delays waiting for the transmission of the entire packet to
complete before attempting to transmit the packet again.
To overcome the shortcomings of CSMA-based schemes and further reduce the collision
interval, networks using CSMA/CD extend the capabilities of a communicating node to listen
while transmitting. This allows the node to monitor the signal on the channel and detect a
collision when it occurs. More specifically, if a node has data to send, it first listens to determine
27
if there is an ongoing transmission over the communication channel. In the absence of any
activity on the channel, the node starts transmitting its data and continues to monitor the signal
on the channel while transmitting. If an interfering signal is detected over the channel, the
transmitting station immediately aborts its transmission. This reduces the amount of bandwidth
wasted due to collision to the time it takes to detect a collision. When a collision occurs, each
contending station involved in the collision waits for a time period of random length before
attempting to retransmit the packet. The length of time that a colliding node waits before
attempting to retransmit the packet. The length of time that a colliding node waits before it
schedules packet retransmission is determined by a probabilistic algorithm, referred to as the
truncated binary exponential back-off algorithm.
The algorithm derives the waiting time after collision from the slot time and the current number
of attempts to retransmit.
The major drawback of CSMA/CD is the need to provision sensor nodes with collision
detection capabilities. Sensor nodes have a very limited amount of storage, processing power,
and energy resources. These limitations impose severe constraints on the design of the MAC
layer. Support for collision detection in WSNs is not possible without additional circuitry. In
particular, wireless transceivers are typically half-duplex. To detect collision, the sensor node
must therefore be capable of "listening" while "talking." The complexity and cost of sensor
nodes, however, are intended to be low and scalable to enable broad adaptations of the
technology in cost sensitive applications where deployment of large numbers of sensors is
expected. Consequently, the design of physical layer must be optimized to keep the cost low.
Fast Ethernet, Gigabit Ethernet
2.10 Introduction to Ethernet IEEE 802.3, IEEE 802.11 a/b/g/n
IEEE 802.3 Standards and Frame Formats
Ethernet protocols refer to the family of local-area network (LAN) covered by the IEEE 802.3.
In the Ethernet standard, there are two modes of operation: half-duplex and full- duplex modes.
In the half duplex mode, data are transmitted using the popular Carrier- Sense Multiple
Access/Collision Detection (CSMA/CD) protocol on a shared medium. The main
disadvantages of the half-duplex are the efficiency and distance limitation, in which the link
distance is limited by the minimum MAC frame size. This restriction reduces the efficiency
drastically for high-rate transmission. Therefore, the carrier extension technique is used to
ensure the minimum frame size of 512 bytes in Gigabit Ethernet to achieve a reasonable link
distance.
Four data rates are currently defined for operation over optical fiber and twisted-pair cables:
28
10 Mbps - IOBase-T Ethernet (IEEE 802.3)
100 Mbps - Fast Ethernet (IEEE 802.3u)
1000 Mbps - Gigabit Ethernet (IEEE 802.3z)
IO-Gigabit - 10 Gbps Ethernet (IEEE 802.3ae).
The Ethernet system consists of three basic elements:
The physical medium used to carry Ethernet signals between computers,
A set of medium access control rules embedded in each Ethernet interface that allow multiple
computers to fairly arbitrate access to the shared Ethernet channel, and
An Ethernet frame that consists of a standardized set of bits used to carry data over the system.
As with all IEEE 802 protocols, the ISO data link layer is divided into two IEEE 802 sublayers,
the
Media Access Control (MAC) sublayer and the MAC-client sublayer. The IEEE 802.3 physical
layer
corresponds to the ISO physical layer.
The MAC sub-layer has two primary responsibilities:
Data encapsulation, including frame assembly before transmission, and frame parsing/error
detection during and after reception.
Media access control, including initiation of frame transmission and recovery from
transmission failure. IEEE 802.11a/b/g/n IEEE 802.11 standard is a group of specifications
developed by the Institute of Electrical and Electronics Engineers (IEEE) for wireless local
area networks (WLANs).
In 1997, the Institute of Electrical and Electronics Engineers (IEEE) created the first WLAN
standard. They called it 802.11 after the name of the group formed for its development.
Unfortunately, 802.11 only supported a maximum network bandwidth of 2 Mbps- too slow for
most applications. For this reason, ordinary 802.11 wireless products are no longer
manufactured. Much of the current work on IEEE 802.11 centers on increasing transmission
speeds and range, improving Quality of Service (QoS), and adding new capabilities.
29
DSRC = Dedicated short-range communications
802.11, or "Wi-Fi" as it is popularly known, came into existence as a result of a decision in
1985 by the United States Federal Communications Commission (FCC) to open several bands
of the wireless spectrum for use without a government license.
These so-called "garbage bands" were allocated to equipment such as microwave ovens which
use radio waves to heat food. To operate in these bands though, devices were required to use
"spread spectrum" technology.
This technology spreads a radio signal out over a wide range of frequencies, making the signal
less susceptible to interference and difficult to intercept. In 1990, a new IEEE committee called
IEEE 802.11 was set up to look into getting an open standard
started. Demand for wireless devices was so high that by the time the new standard was
developed under the rules of the IEEE (commonly pronounced as "I triple e").
The IEEE 802.11 standard defines an over-the-air interface between a wireless client and a base
station (or access point), or between two or more wireless clients.
As capabilities are added to the IEEE 802.11, some become known by the name of the
improvement. For example, many people recognize IEEE 802.11b, IEEE 802.11g and IEEE
802.1 In as popular wireless solutions for connecting to networks. Each of these improvements
defines a maximum speed of operation, the radio frequency band of operation, how data is
encoded for transmission, and the characteristics of the transmitter and receiver.
The first two variants were IEEE 802.11b (which operates in the industrial, medical and
scientific-ISM-band of 2.4 GHz), and IEEE 802.1 la, which operates in the available 5 GHz
bands (5.15-5.35 GHz, 5.47-5.725 GHz, and 5.725-5.825 GHz).
A third variant, IEEE 802.1 1g, was published in June 2003. Both IEEE 802.1la and IEEE
802.11g use a more advanced form of modulation called orthogonal frequency-division
multiplexing (OFDM). Using OFDM in the 2.4 GHz band, IEEE 802.1 Ig achieves speeds of
up to 54 Mbps. Now that IEEE 802.1 In, the latest version of IEEE 802.11, is shipping in
30
volume, the focus is on even faster solutions, specifically IEEE 802. Llac will deliver its
throughout over the 5 GHz band, affording easy migration from IEEE 802.1 In, which also
uses 5 GHz band (as well as the 2.4 band).
IEEE 802.1 lad, targeting shorter range transmissions, will use the unlicensed 60 GHz band.
Through range improvements and faster wireless transmissions, IEEE 802.1 lac and ad will:
Improve the performance of high-definition TV (HDTV) and digital video streams in the home
and advanced applications in enterprise networks Help businesses reduce capital expenditures
by freeing them from the cost of laying and maintaining Ethernet cabling Increase the reach
and performance of hotspots Allow connections to handle more clients. Improve overall user
experience where and whenever people are connected.
2.11 IEEE 802.15 and IEEE 802.16 Standards
IEEE 802.15 Standards and frame format
Bluetooth over IEEE 802.15.1
Bluetooth, also known as the IEEE 802.15.1 standard is based on a wireless radio system
designed for short-range and cheap devices to replace cables for computer peripherals, such as
mice, keyboards, joysticks, and printers. This range of applications is known as wireless
personal area network (WPAN). Two connectivity topologies are defined in Bluetooth: the
piconet and scatter net. piconet is a WPAN formed by a Bluetooth device serving as a master
in the piconet and one or more Bluetooth devices serving as slaves. A frequency-hopping
channel based on the address of the master defines each piconet. All devices participating in
communications in a given piconet are synchronized using the clock of the master. Slaves
communicate only with their master in a point-to-point fashion under the control of the master.
The maser’s transmissions may be either point-to-point or point-to-multipoint.
Also, besides in an active mode, a slave device can be in the parked or standby modes so as to
reduce power consumptions. A scatter net is a collection of operational Bluetooth pioneers
overlapping in time and space. Two pioneers can be connected to form a scatter net. A Bluetooth
device may participate in several pioneers at the same time, thus allowing for the possibility
that information could flow beyond the coverage area of the single piconet. A device in a scatter
net could be a slave in several pioneers, but master in only one of them.
Bluetooth is an emerging wireless communication technology that allows devices, within 10-
100- meter proximity, to communicate with each other. The primary goal of this technology is
to enable devices to communicate without physical cables. It is a worldwide specification for
a small low-cost radio. It links mobile computers, mobile phones, other portable handheld
devices, and provides Internet connectivity.
31
It is developed, published and promoted by the Bluetooth Special Interest Group (SIG). Its key
features are robustness, low complexity, low power and low cost. Bluetooth does not require
direct line of sight and can also support multipoint communication in addition to point-to-point
communication. The short-range transceivers that are built into mobile gadgets to provide
Bluetooth compatibility are designed to operate in the 2.45 GHz unlicensed radio band. It
provides data rate up to 721 kbps as well as three 64 kbps voice channels.
Through the use of frequency hopping, a Bluetooth transceiver can minimize the effect of
interference from other signals by hopping to a new frequency after transmitting or receiving
a packet. (Bluetooth hop frequency is 1600 hops/second). Each Bluetooth gadget has a unique
12-bit address. In order for Bluetooth gadget - A to connect with Bluetooth gadget -B, gadget
A must know the (12-bit) address of gadget B. Bluetooth supports gadget authentication and
communications encryption. Bluetooth uses GFSK (Gaussian frequency shift keying)
modulation technique.
IEEE 802.16 Standards, Frame formats
WiMAX (Worldwide Interoperability for Microwave Access) is an emerging wireless
communication system that is expected to provide high data rate communications in
metropolitan area networks (MANs). In the past few years, the IEEE 802.16 working group
has developed a number of standards for WiMAX. The first standard was published in 2001,
which supports communications in the 10-66 GHz frequency band. In 2003, IEEE 802.16a was
introduced to provide additional physical layer specifications for the 2-11 GHz frequency band.
These two standards were further revised in 2004 (IEEE 802.16-2004). Recently, IEEE 802.16e
has also been approved as the official standard for mobile applications
2.12 Case Study: Demonstration of DLL protocols on Simulator
Need of DLL
Physical layer takes care of transmitting information over a communication channel.
Information transmitted may be affected by noise or distortion caused in the channel. Hence,
the transmission over communication channel is not reliable. The data transfer is also affected
by delay and has finite rate of transmission. This reduces the efficiency of transmission.
Data link layer is designed to take care of these problems i.e., data link layer improves
reliability and efficiency of channel. We can also say that the services provided by physical
layer are not reliable. Hence, we require some layer above physical layer which can take care
of these problems. The layer above physical layer is Data Link Layer (DLL).
Functions of a data link layer
32
Error Control: Physical layer is error prone. The errors introduced in the channel need to be
corrected.
Flow Control: There might be mismatch in the transmission rate of sender and the rate at which
receiver receives. This mismatch must be taken care of.
Addressing: In the network where there are multiple terminals, whom to send the data has to
be specified.
Frame Synchronization: In physical layer, information is in the form of bits. These bits are
grouped in blocks of frames at data link layer. In order to identify beginning and end of frames,
some identification mark is put before and/or after each frame.
Link Management: In order to manage co-ordination and co-operation among terminals in the
network, initiation, maintenance and termination of link is required to be done properly. These
procedures are handled by data link layer. The control signals required for this purpose use the
same channels on which data is exchanged. Hence, identification of control and data
information
Simulation
Due to the large number of hosts, switches and links here we will be aiming to simulate to
demonstrate the weaknesses of Ethernet, we will be using simulation instead of implementing
the topology physically.
While simulators pose an enormous advantage in terms of the time it takes to change the
topology, implement new protocols and explore larger topologies, there are a number of
disadvantages, namely that as it is a simulation, it takes time to program a simulator, and this
may approach the difficulty in creating a real network, execution can be computationally
expensive, and statistical analysis of the simulation in order to verify the results can be difficult.
There are a number of different type of simulators the main distinction being a discrete event
simulation or a continuous event simulation. The most suitable for performing network
simulation of a packet-based architecture is a discrete event simulator, as each movement of a
packet may be viewed of as an event in the system.
In order to ensure that the goals of the project are achievable, and the results are repeatable and
useful to others, we will be building upon an existing network simulator. Some time was spent
investigating the different network simulators available.
33
Fig- it is showing simulation of DLL.
34