Local Area Network: Ethernet: Multiple Access Links and Protocols –
ALOHA, CSMA, CSMA/CD, CSMA/CA. 802.3 IEEE standard, Token Bus:
802.4 IEEE standard, Token Ring: 802.5 IEEE standard, Wireless LAN
Protocols.
Logical Addressing: IPv4 Addresses, Ipv6 Addresses.
INTER Networking Devices: Layer 1 connections- Repeater, Hubs, Layer 2
connections- Bridges, Switches, Layer 3 connections- Routers, Gateways.
Unicast Routing Protocols: Distance Vector Routing, Link State Routing.
Internet Protocols: Class A, B, C, D, E traffic, IPV4, IPV6. Address
Mapping: ARP, RARP- ICMP- IGMP.
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, and so on.
Many protocols have been devised to handle access to a shared link.
All of these protocols belong to a sublayer in the data-link layer called
media access control (MAC).
Two features
1.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.
2.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.
Switched communication network
Users are interconnected by transmission lines, multiplexers and
switches
Broadcast Network
A single transmission medium is shared by all users and information is
broadcast by an user into the medium.
Examples :Multi-tapped bus
Ring network sharing a media.
Satellite comm.: Using uplink and downlink frequency bands.
Wireless Communication: Cellular network, Packet radio network
In a random-access method, each station has the right to
the medium without being controlled by any other station.
However, 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:
1.When can the station access the medium?
2. What can the station do if the medium is busy?
3.How can the station determine the success or failure of the
transmission?
4.What can the station do if there is an access conflict?
Multiple Access Protocols
ALOHA
Users are allowed random access of the central computer through a common radio
frequency band f1 and the computer centre broadcasts all received signals on a
different frequency band f2. This enables the users to monitor packet collisions, if
any.
Pure ALOHA, is truly a free-for-all scheme
Fig.Simplified ALOHA scheme for a packet radio system
It was designed for a radio (wireless) LAN, but it can be
used on any shared medium.
The medium is shared between the stations. When a station
sends data, another station may attempt to do so at the
same time. The data from the two stations collide and
become garbled.
Pure ALOHA
The idea is that each station sends a frame whenever it has
a frame to send (multiple access). However, since there is
only one channel to share, there is the possibility of
collision between frames from different stations.
If one bit of a frame coexists on the channel with one bit from another
frame, there is a collision and both will be destroyed.
It is obvious that we need to resend the frames that have been
destroyed during transmission.
Fig. Frames in a pure ALOHA network
The pure ALOHA protocol relies on acknowledgments from the
receiver. When a station sends a frame, it expects the receiver to send
an acknowledgment.
If the acknowledgment does not arrive after a time-out period, the
station assumes that the frame (or the acknowledgment) has been
destroyed and resends the frame.
Pure ALOHA dictates that when the time-out period passes, each
station waits a random amount of time before resending its frame. We
call this time the backoff time TB.
Vulnerable time: the length of time in which there is a
possibility of collision.
Procedure for pure ALOHA protocol
Assume G represents the average number of frames generated by the
system during one frame transmission time. Then it can be proven that
the average number of successfully transmitted frames for pure
ALOHA is S and given as:
The maximum throughput occurs at G = 0.5, with S = 1/2e, which is
about 0.184.That is channel utilization of maximum18% is obtained.
Fig: Throughput versus offered traffic for ALOHA systems.
Assume G represents the average number of frames generated by the
system during one frame transmission time. Then it can be proven that
the average number of successfully transmitted frames for pure
ALOHA is S and given as:
The maximum throughput occurs at G = 0.5, with S = 1/2e, which is
about 0.184.That is channel utilization of maximum18% is obtained.
Fig: Throughput versus offered traffic for ALOHA systems.
Assume G represents the average number of frames generated by the
system during one frame transmission time. Then it can be proven that
the average number of successfully transmitted frames for pure
ALOHA is S and given as:
The maximum throughput occurs at G = 0.5, with S = 1/2e, which is
about 0.184.That is channel utilization of maximum18% is obtained.
Fig: Throughput versus offered traffic for ALOHA systems.
Exercise
Sol. The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, or 1 frame per
millisecond, then G = 1. In this case S = G × e^−2G = 0.135 (13.5
percent). This means that the throughput is 1000 × 0.135 = 135
frames. Only 135 frames out of 1000 will probably survive.
b. If the system creates 500 frames per second, or 1/2 frames per
millisecond, then G = 1/2.
In this case S = G × e−2G = 0.184 (18.4 percent). This means that the
throughput is 500 × 0.184 = 92 and that only 92 frames out of 500 will
probably survive.
Slotted ALOHA
Assumptions
• All frames same size Operation
• Time divided into equal • When node obtains fresh
slots (time to transmit a frame, transmits in next
frame) slot
• Nodes start to transmit • No collision: node can
frames only at start of send new frame in next
slots slot
• Nodes are • Collision: node
synchronized retransmits frame in each
• If two or more nodes subsequent slot with
transmit, all nodes probability p until
detect collision success
Slotted ALOHA
Fig: Frames in a slotted ALOHA network.
Fig. Vulnerable time for slotted ALOHA protocol
It can be proven that the average number of successful transmissions
for slotted ALOHA is S = G × e^−G. The maximum throughput Smax
is 0.368, when G = 1.
In other words, if one frame is generated during one frame
transmission time, then 36.8 percent of these frames reach their
destination successfully.
We expect G = 1 to produce maximum throughput because the
vulnerable time is equal to the frame transmission time.
Fig .Throughput versus offered traffic for ALOHA systems.
To minimize the chance of collision and, therefore,
increase the performance, the CSMA method is used.
The chance of collision can be reduced if a station senses
the medium before trying to use it.
CSMA is based on the principle “sense before transmit”
or “listen before talk.”
In situations where propagation delay of the signal between
two nodes is small compared to the transmission time of a
packet, all other nodes will know very quickly when a
node starts transmission.
This observation is the basis of the carrier-sense multiple-
access (CSMA) protocol.
In this scheme, a node having data to transmit first listens
to the medium to check whether another transmission is in
progress or not. The node starts sending only when the
channel is free, that is there is no carrier.
Space/time model of a collision in CSMA
Vulnerable time- CSMA
(i) Persistent CSMA: In this case, a node having data to send,
start sending, if the channel is sensed free. If the medium is
busy, the node continues to monitor until the channel is idle.
Then it starts sending data.
-1-Persistent:In this method, after the station finds the line idle, it sends its
frame immediately (with probability 1).
p-Persistent: The p-persistent method is used if the channel has time slots
with a slot duration equal to or greater than the maximum propagation time.
Highest chance of collision
Ethernet uses this method
(ii) Non-persistent CSMA: If the channel is sensed free, the
node starts sending the packet. Otherwise, the node waits for a
random amount of time and then monitors the channel.
It reduces the chance of collision
This method reduces the efficiency of the network because the
medium remains idle when there may be stations with frames to
send.
CSMA
Persistent-CSMA
CSMA
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.
In this method, a station monitors the medium after it
sends a frame to see if the transmission was successful. If
so, the station is finished.
If, however, there is a collision, the frame is sent again.
This observation is the basis of the carrier-sense multiple-
access (CSMA) protocol.
In this scheme, a node having data to transmit first listens
to the medium to check whether another transmission is in
progress or not. The node starts sending only when the
channel is free, that is there is no carrier.
On top of the CSMA, the following rules are added to
convert it into CSMA/CD:
(i) If a collision is detected during transmission of a packet,
the node immediately ceases transmission and it transmits
jamming signal for a brief duration to ensure that all
stations know that collision has occurred.
(ii) After transmitting the jamming signal, the node waits
for a random amount of time and then transmission is
resumed.
The random delay ensures that the nodes, which were
involved in the collision are not likely to have a collision at
the time of retransmissions. To achieve stability in the back
off scheme, a technique known as binary exponential back
off is used.
Minimum Frame Size
Therefore, the frame transmission time (TFr) must be at
least two times the maximum propagation time Tp.
Collision of the first bits in CSMA/CD
Collision and abortion in CSMA/CD
CSMA/CD
1.We need to sense the channel before we start sending the
frame by using one of the persistence processes.
2.In ALOHA, we first transmit the entire frame and then
wait for an acknowledgment. In CSMA/CD, transmission
and collision detection are continuous processes. We do not
send the entire frame and then look for a collision. The
station transmits and receives continuously.
We constantly monitor in order to detect one of two
conditions: either transmission is finished or a collision is
detected.
3. Sending of a short jamming signal to make sure that all
other stations become aware of the collision.
3 levels zero level: idle, normal level: transmission, Abnormal level:
Collison
On a wired network, energy level is almost double during a collision.
This is how a receiver tells if there is a collision.
But on a wireless network, energy level is not that high (barely 5-10%
higher). So with wireless, we need to avoid collisions.
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 the 1-persistent method, the maximum throughput is
around 50 percent when G = 1.
For the non-persistent method, the maximum throughput
can go up to 90 percent when G is between 3 and 8.3.
Applications
One of the LAN protocols that used CSMA/CD is the
traditional Ethernet with the data rate of 10 Mbps
Carrier sense multiple access with collision avoidance
(CSMA/CA) was mostly intended for wireless networks.
Collisions are avoided through the use of CSMA/CA’s
three strategies: the interframe space, the contention
window, and acknowledgments,
Interframe Space (IFS):When an idle channel is found,
the station does not send immediately. It waits for a period
of time called the interframe space.
Contention Window. The contention window is an
amount of time divided into slots. A station that is ready to
send chooses a random number of slots as its wait time.
The number of slots in the window changes according to
the binary exponential backoff strategy. This means that it
is set to one slot the first time and then doubles each time
the station cannot doubles each time the station cannot
detect an idle channel after the IFS time.
Contention window
One interesting point about the contention window is that
the station needs to sense the channel after each time slot.
However, if the station finds the channel busy, it does not
restart the process; it just stops the timer and restarts it
when the channel is sensed as idle. This gives priority to
the station with the longest waiting time
CSMA/CA
CSMA/CA
1. Before sending a frame, the source station senses the medium
by checking the energy level at the carrier frequency.
a. The channel uses a persistence strategy with backoff until the
channel is idle.
b. After the station is found to be idle, the station waits for a period
of time called the interframe space (IFS); then the station sends a
control frame called the request to send (RTS).
2. After receiving the RTS and waiting a period of time called the
short interframe space (SIFS), the destination station sends a
control frame, called the clear to send (CTS), to the source station.
3.The source station sends data after waiting an amount of time
equal to SIFS.
4. The destination station, after waiting an amount of time equal to
SIFS, sends an acknowledgment to show that the frame has been
received.
How do other stations defer sending their data if one station
acquires access?
When a station sends an RTS frame, it includes the duration of
time that it needs to occupy the channel.
The stations that are affected by this transmission create a timer
called a network allocation vector (NAV) that shows how much
time must pass before these stations are allowed to check the
channel for idleness.
Each time a station accesses the system and sends an RTS frame,
other stations start their NAV.
Each station, before sensing the physical medium to see if it is
idle, first checks its NAV to see if it has expired
Efficiency comparison
Fig. A plot of the offered load versus throughput for the value of a = 0.01
Efficiency comparison
The Computer Society of the IEEE started a project,
called Project 802, to set standards to enable
intercommunication among equipment from a variety of
manufacturers.
It is a way of specifying functions of the physical layer
and the data-link layer of major LAN protocols.
IEEE Project 802 has created a sublayer called media
access control that defines the specific access method for
each LAN.
For example, it defines CSMA/CD as the media access
method for Ethernet LANs and defines the token-passing
method for Token Ring and Token Bus LANs.
IEEE standard for LANs
Physical Layer
Data link Layer
-Encoding decoding -Station interface
-Collision detection -Data
encapsulation/decapsulation
-Carrier sensing
-Link management
-Transmission and receipt -Collision management
Local area network
-Small geographical area
-High reliability
-High Data rate
-Privately owned
Parameters that characterizes a LAN
-Topology
-Transmission Media
-Medium access control techniques
– It refers to the ways in
which the nodes are
connected
-Typical LAN topologies:
-Bus/tree: All nodes
connected to common
medium
-Star: All nodes are
connected to a central node
-Ring
-Transmission media: dictates what type of topology
has to be used
Topology Transmission
media
Bus Coaxial
Ring Twisted pair and
OFC
Star Twisted pair and
OFC
-Medium-Access Control Techniques
–Some access control mechanism is needed to decide
which station will use the shared medium at a particular
point in time.
-Here we shall discuss various LAN standards proposed by
the IEEE 8.2 committee with the following goals in mind:
• To promote compatibility
• Implementation with minimum efforts
• Accommodate the need for diverse applications
To satisfy diverse requirements, the IEEE 80 LAN
standard includes CSMA/CD, Token bus, Token Ring
medium access control techniques along with different
topologies.
Physical layer
10Base-5:Thickwire
coaxial
10Base-2, :thin wire
coaxial
cable(cheapernet)
10Base-Twisted pair
10Base-F Fiber optic
10Broad 36-coaxial Signalling:
Manchester in baseband
Differential PSK in Broadband
Ethernet evolution through four generations
Summary of Standard Ethernet implementations
It supports 10 Mbps baseband transmission.
The standard specifies 0.5 inch coaxial cable, known as yellow cable or
thick Ethernet.
The maximum length of the coaxial cable must not exceed 500 m,
otherwise, there is excessive degradation of the signal
The transceiver is responsible for transmitting, receiving, and detecting
collisions. The transceiver is connected to the station via a transceiver
cable that provides separate paths for sending and receiving.
This means that collision can only happen in the coaxial cable.
If a length of more than 500 m is needed, up to five segments, each a
maximum of 500 meters, can be connected using repeaters.
Fig.10Base5 implementation
It supports 10 Mbps baseband transmission.
The standard specifies 0.5 inch coaxial cable, known as yellow cable or
thick Ethernet.
Each cable segment can be maximum 500 meters long
Up to a maximum of 5 cable segments can be connected using repeaters,
with maximum length 2500 meters.
At most 1024 stations is allowed on a single LAN.
Some other characteristics
Tap: Not necessary to cut a cable to add a new computer
Transceiver: It performs send/receive, collision detection, provides
isolation.
It also supports 10 Mbps baseband transmission.
The standard specifies 0.25 inch coaxial cable known as
cheapernet or thin Ethernet.
Each cable segment can be maximum 185 meters long.
10Base2 also uses a bus topology, but the cable is much thinner
and more flexible.
The cable can be bent to pass very close to the stations. In this
case, the transceiver is normally part of the network interface card
(NIC), which is installed inside the station
Some other characteristics:
Use for office LAN/ departmental LAN
• BNC connector is use interface a compute
10Base2: Thin Ethernet
Fig:10Base2 implementation
It also supports 10 Mbps baseband transmission.
The standard specifies 0.25 inch coaxial cable known as
cheapernet or thin Ethernet.
Each cable segment can be maximum 185 meters long.
Up to a maximum of 5 cable segments can be connected
using repeaters, with maximum length of 925 meters.
Some other characteristics:
Use for office LAN/ departmental LAN
• BNC connector is use interface a compute
• Drop cable is not required
Interfacing a computer in 10Base-2 standard
Supports 10Mbps baseband
transmission
This uses 24AWG Unshielded
Twisted Pair (UTP) cable of both
Cat-3 and Cat-5 category cables.
A HUB functions as a repeater
A stations connect to hub with RJ45
connector
Maximum length of a cable segment
is 100 meters
Allows easy to maintenance and
diagnosis of faults. Fig. Interfacing a computer in
10Base-T standard
Most preferred approach used for
setting up of a LAN.
Allows long distance
communication using Optical fiber.
The topology is same as 10base T
but optical fiber is used instead of
twisted pair.
10BaseFP-A passive-star topology,
up to 1 Km link
10BaseFL -An asynchronous point-
to-point link, up to 2 Km
10BaseFB -A synchronous point-
to-point link, up to 2 cascaded
repeaters
Fig.10Base-F
Preamble. This field contains 7 bytes (56 bits) of alternating 0s and 1s that alert
the receiving system to the coming frame and enable it to synchronize its clock if
it’s out of synchronization.
Start frame delimiter (SFD). This field (1 byte: 10101011)
signals the beginning of the frame.
Destination address (DA). This field is six bytes (48 bits) and
contains the link layer address of the destination station or
stations to receive the packet.
Source address (SA). This field is also six bytes and contains the
link-layer address.
Type. This field defines the upper-layer protocol whose packet is
encapsulated in the frame. This protocol can be IP, ARP, OSPF,
and so on.
Data. This field carries data encapsulated from the upper-layer
protocols. It is a minimum of 46 and a maximum of 1500 bytes.If
it is less than 46 bytes, it needs to be padded with extra 0s.
CRC. The last field contains error detection information, in this
case a CRC-32.
In a unicast transmission, all stations will receive the frame, the
intended recipient keeps and handles the frame; the rest discard
it.
Eg. a. 4A:30:10:21:10:1A
In a multicast transmission, all stations will receive the frame,
the stations that are members of the group keep and handle it;
the rest discard it.
b. 47:20:1B:2E:08:EE
In a broadcast transmission, all stations (except the sender) will
receive the frame and all stations (except the sender) keep and
handle it.
Fig.6-byte Ethernet Frame
Inter-frame Gap: There is mandatory requirement of 9.6 ms interval between
two frames to enable other stations wishing to transmit to take over after a frame
transmission is over. In other words, a 96 bit-time delay is provided between
frame transmissions.
How are collisions detected?
A station sends frame and continues to sense the medium. If the signal strength
sensed by a station exceeds the normal signal strength, it is treated as collision
detection.
What the station does?
The transmitting station sends a jamming signal after collision is detected. ƒ
32-bit jam signal: 10101010 --- 10101010
48-bit jam signal: : 10101010 --- 10101010
The jam signal serves as a mechanism to cause non-transmitting stations to wait
until the jam signal ends
• Minimum Frame Size: A frame must take more than 2τ time to send, where τ is
the propagation time for preventing the situation that the sender incorrectly
concludes that the frame was successfully sent. This slot time is 51.2μsec
corresponding to 512 bit = 64 bytes. Therefore the minimum frame length is 64
bytes (excluding preamble), which requires that the data field must have a minimum
size of 46 bytes.
The goals of the Gigabit Ethernet were to upgrade the data rate to 1 Gbps, but
keep the address length, the frame format, and the maximum and minimum frame
length the same.
1. Upgrade the data rate to 1 Gbps. 2. Make it compatible with Standard or Fast
Ethernet.3.Use the same 48-bit address. 4. Use the same frame format. 5. Keep the
same minimum and maximum frame lengths.
Fig. Summary of 1Gigabit(1000Mbps) Ethernet implementations
Fig.: Summary of 1Gigabit(1000Mbps) Ethernet implementations
IEEE 802.4 standard specifies token bus media access
control method. It is one of token passing access method. It
is based on physical bus or tree topology.
This approach requires a station to have possession of token
in order to transmit.
The token is passed from station to station in a logical ring.
It is more deterministic than 802.3,although repeated loss of
token occurs at certain times can introduce uncertainness.
Can handle shorter frames(no limitation on frame size).
It supports priorities and supports real time traffic.
Has excellent throughput and efficiency especially at high
load.
In the token-passing method, the stations in a network are organized in a logical
ring. In other words, for each station, there is a predecessor and a successor. The
predecessor is the station which is logically before the station in the ring; the
successor is the station which is after the station in the ring.
To give access to channel token circulates through the ring. The possession of the
token gives the station the right to access the channel and send its data.
Token management is needed for this access method.
Fig: Token Ring Fig: Bus Ring Fig: Physical Ring
Stations forms a logical ring.
After formation of logical ring, control passes to highest numbered
station.
Then each station passes token to its successor to gain access control of
the bus.
.There are 4 priority classes-0,2,4 and 6 with 0 as lowest and 6 as the
highest priority.
Fig: Token Bus topology
Token Bus Frame control field
Ring Initialization: In case of lost token claim_token packet
is used.
Addition to ring: Performed by sending solicit_successor
packet and resolve_contention packet in case of collision.
Deletion from ring: Achieved by using set successor packet.
Fault management: involves the management of duplicate
token.
Use of who_follows packet when a successor does not
respond in time
Issue of solocit_successor packet,if necessary.
Hence here ring distribution is done in dynamic manner.
IEEE 802.5 is the second method of token passing access method. Token
ring is most commonly used in the network following both logical and
physical ring topology. The right to transmit is controlled by Token.
Token Ring is formed by the nodes connected in ring format as shown in
Fig. The principle used in the token ring network is that a token is
circulating in the ring and whichever node grabs that token will have right
to transmit the data.
Since the token rotates in the ring it is guaranteed that every node gets the
token with in some specified time. So there is an upper bound on the time
of waiting to grab the token so that starvation is avoided.
Fig. Token ring
Modes of Operation
Listen Mode: In this mode the node listens to the data and transmits the
data to the next node. In this mode there is a one-bit delay associated with
the transmission
Transmit Mode: In this mode the node just discards the any data and puts
the data onto the network.
By-pass Mode: In this mode reached when the node is down. Any data is
just bypassed. There is no one-bit delay in this mode.
Fig. Listen mode Fig. Transit mode Fig. By-pass mode
Fig:IEEE 802.5 token ring frame format
The frame status byte contains A and C bits
A =0 C=0 Destination not present
A=1 C=0 Destination present but frame not accepted
A=1 C=1 Destination present and frame copied.
Each token ring has a monitor station that oversees the ring.
Comparison: IEEE 802.3, IEEE802.4
and IEEE 802.5
A wired LAN or a wireless LAN operates only in the lower two layers of
the TCP/IP protocol suite.
This means that if we have a wired LAN in a building that is connected
via a router or a modem to the Internet, all we need in order to move from
the wired environment to a wireless environment is to change the network
interface cards designed for wired environments to the ones designed for
wireless environments and replace the link-layer switch with an access
point.
In this change, the link-layer addresses will change (because of changing
NICs), but the network-layer addresses (IP addresses) will remain the
same; we are moving from wired links to wireless links.
IEEE 802.11 protocol stack
Fig:Part of the 802.11 protocol stack.
Standard Ethernet uses the CSMA/CD algorithm
The CSMA/CD algorithm does not work in wireless LANs for three reasons:
1.To detect a collision, a host needs to send and receive at the same time
(sending the frame and receiving the collision signal), which means the host
needs to work in a duplex mode. Wireless hosts do not have enough power to
do so(battery operated). So they can only send or receive at one time.
2.Because of the hidden station problem, in which a station may not be
aware of another station’s transmission due to some obstacles or range
problems, collision may occur but not be detected.
Hidden stations can reduce the capacity of the network because of the
possibility of collision.
Fig:Hidden station problem
Hidden station problem may also occur due to an obstacle..
Station C sends its data to A, which results in a collision at A because this
station is receiving data from both B and C.
Stations B and C are hidden from each other with respect to A.
Hidden stations can reduce the capacity of the network because of the
possibility of collision.
3. The distance between stations can be great. Signal fading could prevent a
station at one end from hearing a collision at the other end.
Fig:Hidden station problem
IEEE has defined the specifications for a wireless LAN, called IEEE
802.11, which covers the physical and data-link layers. It is sometimes
called wireless Ethernet(USA-WiFi).
Basic Service Set
IEEE 802.11 defines the basic service set (BSS) as the building blocks of
a wireless LAN. A basic service set is made of stationary or mobile
wireless stations and an optional central base station, known as the access
point (AP).
The BSS without an AP is a stand-alone network and cannot send data to
other BSSs. It is called an ad hoc architecture. In this architecture,
stations can form a network without the need of an AP; they can locate
one another and agree to be part of a BSS.
A BSS with an AP is sometimes referred to as an infrastructure BSS.
Extended service set (ESS)-An extended service set (ESS) is
made up of two or more BSSs with APs. In this case, the
BSSs are connected through a distribution system, which is a
wired or a wireless network.
IEEE 802.11 defines three types of stations based on their
mobility in a wireless LAN: no-transition, BSS-transition, and
ESS-transition mobility.
Fig: Extended service set (ESS)
IEEE 802.11 defines three types of stations based on their
mobility in a wireless LAN: no-transition, BSS-transition, and
ESS-transition mobility.
A station with no-transition mobility is either stationary
(not moving) or moving only inside a BSS.
A station with BSS-transition mobility can move from one
BSS to another, but the movement is confined inside one
ESS.
A station with ESS-transition mobility can move from one
ESS to another. However, IEEE 802.11 does not guarantee
that communication is continuous during the move.
IEEE 802.11 defines two MAC sublayers: the distributed
coordination function (DCF) and point coordination function
(PCF).
Fig:MAC layers in IEEE 802.11 standard
Distributed Coordination Function: One of the two protocols defined by
IEEE at the MAC sublayer is called the distributed coordination function
(DCF). DCF uses CSMA/CA as the access method.
Hidden-Station Problem
The solution to the hidden station problem is the use of the handshake
frames (RTS and CTS).
Fig: CSMA/CA and NAV
The point coordination function (PCF) is an optional
access method that can be implemented in an infrastructure
network (not in an ad hoc network).
It is implemented on top of the DCF and is used mostly for
time-sensitive transmission.
PCF has a centralized, contention-free polling access method
Fragmentation
The wireless environment is very noisy, so frames are often
corrupted.
A corrupt frame has to be retransmitted. The protocol,
therefore, recommends fragmentation—the division of a large
frame into smaller ones.
It is more efficient to resend a small frame than a large one.
Frame control (FC). The FC field is 2 bytes long and defines the type
of frame and some control information.
Subfields in FC field
Frame control (FC). The FC field is 2 bytes long and defines the type of
frame and some control information.
D. This field defines the duration of the transmission that is used to set the
value of NAV. In one control frame, it defines the ID of the frame.
Addresses. There are four address fields, each 6 bytes long. The meaning of
each address field depends on the value of the To DS and From DS subfields.
Sequence control. This field, often called the SC field, defines a 16-
bit value. The first four bits define the fragment number; the last 12
bits define the sequence number, which is the same in all fragments.
Frame body. This field, which can be between 0 and 2312 bytes,
contains information based on the type and the subtype defined in the
FC field
FCS. The FCS field is 4 bytes long and contains a CRC-32 error-
detection sequence.
Management Frames
Management frames are used for the initial communication between
stations and access points.
Control Frames
Control frames are used for accessing the channel and acknowledging
frames
Data Frames
Data frames are used for carrying data and control information.
Fig: Control frames
All implementations, except the infrared, operate in the industrial,
scientific, and medical (ISM) band, which defines three unlicensed
bands in the three ranges 902–928 MHz, 2.400–4.835 GHz, and
5.725–5.850 GHz points.
Table: Specifications
Physical layer of IEEE 802.11 FHSS
Physical layer of IEEE 802.11 DSSS
In spread spectrum (SS), we also combine signals from different sources
to fit into a larger bandwidth.
Spread spectrum is designed to be used in wireless applications (LANs and
WANs).
In these types of applications, we have some concerns that outweigh
bandwidth efficiency.
Spread spectrum techniques add redundancy; they spread the original
spectrum needed for each station.
FHSS
Fig: Frequency hopping spread spectrum
(FHSS)
Fig: Frequency selection in FHSS
Bluetooth is a wireless LAN technology designed to connect devices of
different functions such as telephones, notebooks, computers (desktop and
laptop), when they are at a short distance from each other.
A Bluetooth LAN is an ad hoc network, which means that the network is
formed spontaneously; the devices, sometimes called gadgets, find each
other and make a network called a piconet.
Architecture
Bluetooth defines two types of networks: piconet and scatternet.
A Bluetooth network is called a piconet, or a small net. A piconet can
have up to eight stations, one of which is called the primary; the rest are
called secondaries.
All the secondary stations synchronize their clocks and hopping sequence
with the primary.
Note that a piconet can have only one primary station. The
communication between the primary and secondary stations can be one-
to-one or one-to-many.
Although a piconet can have a maximum of seven secondaries, additional
secondaries can be in the parked state-cannot take part in communication.
Scatternet
Piconets can be combined to form what is called a scatternet.
A secondary station in one piconet can be the primary in another piconet.
Fig: Scatternet
Bluetooth device has a built-in short-range radio transmitter. The current
data rate is 1 Mbps with a 2.4-GHz bandwidth.
This means that there is a possibility of interference between the IEEE
802.11b wireless LANs and Bluetooth LANs.
Bluetooth Layers
L2CAP
The Logical Link Control and Adaptation Protocol, or L2CAP (L2 here
means LL), is roughly equivalent to the LLC sublayer in LANs.
Fig: Bluetooth layers
Fig:L2CAP data packet format
The L2CAP has specific duties: multiplexing, segmentation and
reassembly, quality of service (QoS), and group management.
Baseband Layer
The baseband layer is roughly equivalent to the MAC sublayer in LANs.
The access method is TDMA
Bluetooth uses a form of TDMA that is called TDD-TDMA (time-division
duplex TDMA). TDD-TDMA is a kind of half-duplex communication in
which the sender and receiver send and receive data, but not at the same
time (half-duplex((walkie-talkies); however, the communication for each
direction uses different hops.
Fig: Single-secondary communication
Baseband layer
Multiple Secondary comm.
The primary uses the even-numbered slots, but a secondary sends in the
next odd-numbered slot if the packet in the previous slot was addressed to
it.
Fig: Multiple-secondary communication
Access code. This 72-bit field normally contains synchronization bits and
the identifier of the primary to distinguish the frame of one piconet from
that of another.
Payload. This subfield can be 0 to 2740 bits long. It contains data or
control information coming from the upper layers.
Fig: Frame format
Address. The 3-bit address subfield can define up to seven
secondary's (1 to 7).
If the address is zero, it is used for broadcast communication
from the primary to all secondary's.
b. Type. The 4-bit type subfield defines the type of data coming
from the upper layers.
c. F. This 1-bit subfield is for flow control. When set (1), it
indicates that the device is unable to receive more frames (buffer
is full).
d. A. This 1-bit subfield is for acknowledgment. Bluetooth uses
Stop-and-Wait ARQ; 1 bit is sufficient for acknowledgment.
e. S. This 1-bit subfield holds a sequence number. Bluetooth uses
Stop-and-Wait ARQ; 1 bit is sufficient for sequence numbering.
HEC. The 8-bit header error correction subfield is a checksum to
detect errors in each 18-bit header section.
The radio layer is roughly equivalent to the physical layer of the
Internet model.
Bluetooth devices are low-power and have a range of 10 m.
Band
Bluetooth uses a 2.4-GHz ISM band divided into 79 channels of
1 MHz each.
Bluetooth uses the frequency-hopping spread spectrum
(FHSS) method in the physical layer to avoid interference from
other devices or other networks
Modulation
To transform bits to a signal, Bluetooth uses a sophisticated
version of FSK, called GFSK (FSK with Gaussian bandwidth
filtering)
The identifier used in the IP layer of the TCP/IP
protocol suite to identify the connection of each
device to the Internet is called the Internet address
or IP address.
An IPv4 address is a 32-bit address that uniquely
and universally defines the connection of a host or a
router to the Internet.
The IP address is the address of the connection, not
the host or the router.
IPv4 addresses are unique in the sense that each
address defines one, and only one, connection to
the Internet.
The identifier used in the IP layer of the TCP/IP
protocol suite to identify the connection of each
device to the Internet is called the Internet address
or IP address.
An IPv4 address is a 32-bit address that uniquely
and universally defines the connection of a host or a
router to the Internet.
The IP address is the address of the connection, not
the host or the router.
IPv4 addresses are unique in the sense that each
address defines one, and only one, connection to
the Internet.
An address space is the total number of addresses
used by the protocol.
If a protocol uses b bits to define an address, the
address space is 2^b because each bit can have two
different values (0 or 1).
IPv4 uses 32-bit addresses, which means that the
address space is 2^32 or 4,294,967,296.
3 different notations are
used
1.Binary
2.Decimal
3.Hexadecimal
Hierarchy in Addressing
In a postal network, the postal address includes the country,
state, city, street, house number, and name of the mail
recipient.
A 32-bit IPv4 address is also hierarchical, but divided only
into two parts.
The first part of the address, called the prefix, defines the
network; the second part of the address, called the suffix,
defines the node (connection of a device to the Internet)).
IP address formats
Network address and Broadcast address
Subnetting and Supernetting-Classless
inter domain routing(CIDR)
Classful addressing has become obsolete
Since the addresses were not distributed properly, the Internet
was faced with the problem of the addresses being rapidly
used up, resulting in no more addresses available for
organizations and individuals that needed to be connected to
the Internet.
Consider class A can be assigned to only 128 organizations in
the world, but each organization needs to have a single
network with 16,777,216 nodes (computers in this single
network).
Most of the addresses in this class were wasted (unused).
Class B addresses were designed for midsize organizations,
but many of the addresses in this class also remained unused.
Class E addresses were almost never used, wasting the whole
class.
To alleviate address depletion, two strategies were proposed and,
to some extent, implemented: subnetting and supernetting.
In subnetting, a class A or class B block is divided into several
subnets. Each subnet has a larger prefix length than the original
network.
For example, if a network in class A is divided into four subnets,
each subnet has a prefix of nsub = 10. At the same time, if all of
the addresses in a network are not used, subnetting allows the
addresses to be divided among several organizations
Supernetting was devised to combine several class C blocks into
a larger block to be attractive to organizations that need more
than the 256 addresses available in a class C block.
This idea did not work either because it makes the routing of
packets more difficult.
Subnetting and Supernetting
The process of dividing a single network into multiple sub networks is
called as subnetting.
The sub networks so created are called as subnets.
Subnet ID
Each subnet has its unique network address known as its Subnet ID.
The subnet ID is created by borrowing some bits from the Host ID part
of theIP Address.
The number of bits borrowed depends on the number of subnets created.
The two main advantages of subnetting a network are-
It improves the security.
The maintenance and administration of subnets is easy.
Subnetting
Fixed length sub-netting also called as classful sub-netting divides the
network into subnets where-
-All the subnets are of same size.
-All the subnets have equal number of hosts.
-All the subnets have same subnet mask.
Variable length sub-netting also called as classless sub-netting divides the
network into subnets where-
-All the subnets are not of same size.
-All the subnets do not have equal number of hosts.
-All the subnets do not have same subnet mask.
Certain number of bits are used from host number to
denote subnet number
Subnet number+Network Prefix=Subnet ID
CIDR addressing Format
CIDR Manual IP setting
Subnetting and supernetting in classful addressing did not
really solve the address depletion problem
With the growth of the Internet, it was clear that a larger
address space was needed as a long-term solution. The larger
address space, however, requires that the length of IP
addresses also be increased, which means the format of the IP
packets needs to be changed.
Although the long-range solution has already been devised
and is called IPv6 , a short-term solution was also devised to
use the same address space but to change the distribution of
addresses to provide a fair share to each organization.
The short-term solution still uses IPv4 addresses, but it is
called classless addressing.
Fig. Variable-length blocks in classless addressing
Prefix Length: Slash Notation
Since the prefix length is not inherent in the address, we need
to separately give the length of the prefix.
In this case, the prefix length, n, is added to the address,
separated by a slash. The notation is informally referred to as
slash notation and formally as classless inter-domain
routing or CIDR strategy.
Fig. Slash notation (CIDR)
Classless addressing
Fig: Information extraction in classless addressing
› The address and the In notation completely define the whole block
(the first address, the last address, and the number of addresses).
› First Address: The first address in the block can be found by
setting the 32 - n rightmost bits in the binary notation of the
address to Os.
› Last Address: The last address in the block can be found by
setting the 32 - n rightmost bits in the binary notation of the
address to 1s
› Number of Addresses: The number of addresses in the block is
the difference between the last and first address. It can easily be
found using the formula 232-n
Example
A block of addresses is granted to a small organization. We
know that one of the addresses is 205.16.37.39/28. What is
the first address in the block?
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 0, we get
11001101 00010000 00100101 0010000
or
205.16.37.32.
Example
Find the last address for the block in Example 19.6.
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32 − 28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111
or
205.16.37.47
Example
Another way to find the first address, the last address,
and the number of addresses is to represent the mask as
a 32-bit binary (or 8-digit hexadecimal) number. This is
particularly useful when we are writing a program to
find these pieces of information. In Previous Example
/28 can be represented as
11111111 11111111 11111111 11110000
(twenty-eight 1s and four 0s).
Find
a. The first address
b. The last address
c. The number of addresses.
19.31
(continued)
Solution
a. The first address can be found by ANDing the given
addresses with the mask. ANDing here is done bit by
bit. The result of ANDing 2 bits is 1 if both bits are
1s; the result is 0 otherwise.
(continued)
b. The last address can be found by OR ing the given
addresses with the complement of the mask. Or ing
here is done bit by bit. The result of OR ing 2 bits is 0 if
both bits are 0s; the result is 1 otherwise. The
complement of a number is found by changing each 1
to 0 and each 0 to 1.
Example
Find the class of each address.
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111
Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
Q.1 Consider you have a big single network having IP Address 199.1.2.0. Create
and calculate the following
1.Subnetting and divide this network into 2 subnets
2. Total number of IP Addresses
3. Total number of hosts
4. Range of IP Addresses
5. Direct and limited broadcast address.
Example :Subnetting
Q.1.Consider a IP Address 201.20.30.40.
calculate the following :
1.Network Id
2. 4th host Id
3.Last host Id
4. Broadcast Address
5. Direct and limited broadcast address.
Q.1 Consider you have a big single network having IP Address 195.10.20.128/26.
Calculate range of addresses for 2 subnets.
Example :Address
mask
What will be first and last address for address of prefix 16 length.
Host address :25.34.12.56\16
Host Address: 25 . 34 . 12 . 56
Mask (ANDed): 255 . 255 . 0 . 0
Network Address (First): 25 . 34 . 0 . 0
The last address can be found by ORing the host address with the mask
complement 0.0.255.255.
Host Address: 25 . 34 . 12 . 56
Mask Complement (ORed): 0 . 0 . 255 . 255
Last Address: 25 . 34 . 255 . 255
Practice Questions
› Q.1.For the given IP address -201.20.30.40
Calculate(i)Network ID(ii)Fourth host ID(iii)Last
host ID(iv)Broadcast address.
Q.2.For the given IP address-192.168.10.0/28
Find(i)Subnet mask(ii)Find total number of
networks that can be created.(iii)Total number
of IP address of each network
(iv)Find total number of host on each network.
Practice Questions
Q.2.For the given IP address-192.168.10.0/28
Find(i)Subnet mask(ii)Find total number of
networks that can be created.(iii)Total number
of IP address of each network
(iv)Find total number of host on each network.
A classless address is given as 167.199.170.82/27. We can find the
above three pieces of information as follows.
1. The number of addresses in the block N = NOT (mask) + 1.
2. The first address in the block = (Any address in the block) AND
(mask).
3. The last address in the block = (Any address in the block) OR
[(NOT (mask)].
Address mask
The address mask is a 32-bit number in which the n leftmost bits are set to 1s and
the rest of the bits (32 − n) are set to 0s.
A computer can easily find the address mask because it is the complement of (2^(32
− n) − 1).
The reason for defining a mask in this way is that it can be used by a computer
program to extract the information in a block, using
the three bit-wise operations NOT, AND, and OR.
The mask in dotted-decimal notation is 256.256.256.224. The AND, OR, and
NOT operations can be applied to individual bytes
Example :Address
mask
What will be first and last address for address of prefix 16 length.
Host address :25.34.12.56\16
Host Address: 25 . 34 . 12 . 56
Mask (ANDed): 255 . 255 . 0 . 0
Network Address (First): 25 . 34 . 0 . 0
The last address can be found by ORing the host address with the mask
complement 0.0.255.255.
Host Address: 25 . 34 . 12 . 56
Mask Complement (ORed): 0 . 0 . 255 . 255
Last Address: 25 . 34 . 255 . 255
Practice Questions
Q.4.An organization is granted the block 130.56.0.0/16. The
administrator wants to create 1024 subnets.
a. Find subnet mask.
b. Find number of addresses in each subnet.
c. Find the first and the last address in the first subnet.
d. Find the first and the last address in the last subnet
Network Address
Fig: Network address
The five special addresses that are used for special purposes: this-host address,
limited-broadcast address, loopback address, private addresses, and multicast
addresses.
This-host Address
The only address in the block 0.0.0.0/32 is called the this-host address. It is used
whenever a host needs to send an IP datagram but it does not know its own
address to use as the source address.
Limited-broadcast Address
The only address in the block 255.255.255.255/32 is called the limited-broadcast
address. It is used whenever a router or a host needs to send a datagram to all
devices in a network.
Loopback Address
The block 127.0.0.0/8 is called the loopback address. A packet with one of the
addresses in this block as the destination address never leaves the host; it will
remain in the host. Any address in the block is used to test a piece of software in
the machine.
Private Addresses
Four blocks are assigned as private addresses: 10.0.0.0/8, 172.16.0.0/12,
192.168.0.0/16, and 169.254.0.0/16.
Multicast Addresses
The block 224.0.0.0/4 is reserved for multicast addresses
The address space is limited--number of devices (networking
equipment) increases exponentially
A large number of addresses are wasted or remain
unutilized(Class D or Class E)
Solution: Make the addresses reusable leveraging on the fact
that not all devices will connect to the internet at the same
time.
Divide the addresses into reusable(private) and non-
reusable(Public) blocks
Translate internal(private)addresses to external(public)addresses.
Hide internal machines from external machines.
Allow Internet access to large number of users via few public
addresses.(Bounded no. of users accessing Internet while rest are
sleeping. Only dynamic addressing can be done to those bounded
users)
-Ipv4 private address(Few blocks of IP address are taken and
assign 1 private address corresponding to that block)
10.0.0.0-10.255.255.255
172.16.0.0-172.32.255.255
192.168.0.0-192.168.255.255
Require only limited public address to access the main network
Basic operation of NAT
Migration between Network Service
provider
Assume that an ISP has granted a small range of addresses to
a small business or a household.
If the business grows or the household needs a larger range,
the ISP may not be able to grant the demand because the
addresses before and after the range may have already been
allocated to other networks.
A technology that can provide the mapping between the
private and universal addresses, and at the same time support
virtual private networks, Network Address Translation
(NAT).
The technology allows a site to use a set of private addresses
for internal communication and a set of global Internet
addresses (at least one) for communication with the rest of
the world.
Network address translation
A simple implementation of NAT
Address Translation
All of the outgoing packets go through the NAT router, which replaces
the source address in the packet with the global NAT address.
Network address translation
A simple implementation of NAT
All of the outgoing packets go through the NAT router: replaces the source
address in the packet with the global NAT address.
All incoming packets also pass through the NAT router, which replaces the
destination address in the packet with the appropriate private address.
Address Translation
Translation
But how does the NAT router know the destination address for a packet
coming from the Internet?
The problem is solved if the NAT router has a translation table.
When the response comes back from the destination, the router uses
the source address of the packet (as the external address) to find the
private address of the packet.
Translation
A translation table has only two columns: the private address and
the external address (destination address of the packet).
When the router translates the source address of the outgoing packet,
it also makes note of the destination address—where the packet is
going.
When the response comes back from the destination, the router uses
the source address of the packet (as the external address) to find the
private address of the packet.
The main reason for migration from IPv4 to IPv6 is
the small size of the address space in IPv4.
The huge address space of IPv6 prevents address
depletion in the future
An IPv6 address is 128 bits or 16 bytes (octets) long,
four times the address length in IPv4.
Although an IPv6 address, even in hexadecimal
format, is very long, many of the digits are zeros.
The leading zeros of a section can be omitted
Representation
IPv6 Addressing
Address space is not sufficient even with CIDR
QoS is vaguely defined- real time service support for
modern day applications.(In recent times multimedia
traffic is more frequent than data traffic)
Mobile applications are unmanageable.
There is no direct security support in IPv4.
Larger Address space(128 bit addresses)
Globally unique and hierarchical addressing
Optimized routing tables using prefixes rather than
address classes.
Auto configuration of network interfaces
Support for encapsulation
Service class support to manage QoS classes
Built in authentication and encryption
Compatibility with IPv4.
Mixed Representation
Sometimes we see a mixed representation of an
IPv6 address: colon hex and dotted decimal
notation.
We can use the colon hex notation for the leftmost
six sections and four-byte dotted-decimal notation
instead of the rightmost two sections.
For example, the address (::130.24.24.18) is a
legitimate address in IPv6, in which the zero
compression shows that all 96 leftmost bits of the
address are zeros.
CIDR Notation:IPv6 uses hierarchical addressing.
For this reason, IPv6 allows slash or CIDR notation.
The colon hexadecimal notation
Zero Compression: The leading zeros of a section can
be omitted.
Mixed Notation
For example, the address (::130.24.24.18) is a legitimate address in IPv6,
in which the zero compression shows that all 96 leftmost bits of
the address are zeros.
CIDR Notation
IPv6
Address types
Unicast Address
A unicast address defines a single interface (computer or router). The packet
sent to a unicast address will be routed to the intended recipient.
Any cast Address
An anycast address defines a group of computers that all share a single
address. A packet with an anycast address is delivered to only one member
of the group, the most reachable one.
Multicast Address
A multicast address also defines a group of computers.
In anycasting, only one copy of the packet is sent to one of the members of
the group; in multicasting each member of the group receive a copy.
IPv6 has designated a block for multicasting from which
the same address is assigned to the members of the group
Address Space Allocation
IPv6 is divided into several blocks of varying size
and each block is allocated for a special purpose.
Most of the blocks are still unassigned and have
been set aside for future use.
Table: Prefixes for assigned IPv6 addresses
Prefixes for assigned IPv6
addresses
IPv6 Addressing
Global unicast address
Special addresses
The unspecified address is a subblock containing only one
address, which is used during bootstrap when a host does not
know its own address and wants to send an inquiry to find it
The loopback address also consists of one address. In IPv4 the
block is made of a range of addresses; in IPv6, the block has only
a single address in it.
A compatible address is an address of 96 bits of zero followed
by 32 bits of IPv4 address. It is used when a computer using IPv6
wants to send a message to another computer using IPv6.
A mapped address is used when a computer already migrated to
version 6 wants to send an address to a computer still using
version 4.
Unique local unicast block
IPv6 addressing
IPv6 addressing
Address translation
In IPv6, DHCP(Dynamic Host Configuration Protocol) can still be
used to allocate an IPv6 address to a host, but a host can also
configure itself.
DHCP is a client-server protocol in which the client sends a
request message and then server returns a response message.