0% found this document useful (0 votes)
63 views42 pages

Unit Ii Data-Link Layer & Media Access

This document provides an overview of the data link layer and media access control. It discusses topics such as link layer addressing using MAC addresses, ARP, RARP and DHCP for address resolution. Common data link layer protocols like HDLC, PPP, Ethernet and wireless LAN standards are introduced. Framing approaches for byte-oriented protocols like BISYNC and PPP are also summarized.

Uploaded by

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

Unit Ii Data-Link Layer & Media Access

This document provides an overview of the data link layer and media access control. It discusses topics such as link layer addressing using MAC addresses, ARP, RARP and DHCP for address resolution. Common data link layer protocols like HDLC, PPP, Ethernet and wireless LAN standards are introduced. Framing approaches for byte-oriented protocols like BISYNC and PPP are also summarized.

Uploaded by

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

UNIT II DATA-LINK LAYER & MEDIA ACCESS

Introduction – Link-Layer Addressing – DLC Services – Data-Link Layer Protocols – HDLC – PPP –
Media Access Control – Wired LANs: Ethernet – Wireless LANs – Introduction – IEEE 802.11,
Bluetooth – Connecting Devices.

2.1 Introduction

Data link layer is responsible for converting data stream to signals bit by bit and to send that over the
underlying hardware. At the receiving end, Data link layer picks up data from hardware which are in the
form of electrical signals assembles them in a recognizable frame format, and hands over to upper layer.

The data layer, or layer 2, is the second layer of the seven-layer OSI model of computer networking.
This layer is the protocol layer that transfers data between adjacent network nodes in a wide area
network (WAN) or between nodes on the same local area network (LAN) segment.

2.2 Link-Layer Addressing

It is used when a sending device (computer or router) needs to create a frame (which is a link layer
message) to carry a packet (a network layer message) to another device for which the sender only
knows the IP address and therefore needs to find out the destination device's MAC address.

Link-Layer Addressing

m MAC Addresses
m Address Resolution Protocol (ARP)
m Dynamic Host Configuration Protocol (DHCP)

Media Access Control (MAC) Address

MAC Addresses are unique 48-bits hardware number of a computer, which is embedded into network
card (known as Network Interface Card) during the time of manufacturing. MAC Address is also known
as Physical Address of a network device. In IEEE 802 standard, Data Link Layer is divided into two sub
layers
1. Logical Link Control(LLC) Sub layer
2. Media Access Control(MAC) Sub layer
 MAC address is used by Media Access Control (MAC) sublayer of Data-Link Layer.
 MAC Address is word wide unique, since millions of network devices exist and we need to
uniquely identify each.
ADDRESS TRANSLATION PROTOCOL (ARP & RARP)

 ARP (Address Resolution Protocol)


ARP associates an IP address with its physical address. On a typical physical network,
such as a LAN, each device on a link is identified by a physical or station address that is usually
imprinted on the NIC.
 ARP operation: An ARP request is broadcast; an ARP reply is unicast.
ARP Packet Format:

 HardwareType: type of physical network (e.g., Ethernet)


 ProtocolType: type of higher layer protocol (e.g., IP)
 HLEN & PLEN: length of physical and protocol addresses
 Operation: ARP request or ARP response
 Source/Target Physical/Protocol addresses

REVERSE ADDRESS TRANSLATION PROTOCOL (RARP)


RARP finds the logical address for a machine that only knows its physical address.
RARP OPERATION:

RARP Packet Format:

 HardwareType: type of physical network (e.g., Ethernet)


 ProtocolType: type of higher layer protocol (e.g., IP)
 HLEN & PLEN: length of physical and protocol addresses
 Operation: RARP request or RARP response
 Source/Target Physical/Protocol addresses
Dynamic host configuration protocol
 The dynamic host configuration protocol is mainly used to simplify the installation and
maintenance of networked computers.
 If a new computer is connected to a network, DHCP can provide it with all the necessary
information for full system integration into the network,
 e.g., addresses of a DNS server and the default router, the subnet mask, the domain name, and an
IP address.
 DHCP is based on a client/server model as shown in Figure 8.17. DHCP clients send a request to
a server (DHCPDISCOVER in the example) to which the server responds.
 A client sends requests using MAC broadcasts to reach all devices in the LAN. A DHCP relay
might be needed to forward requests across inter-working units to a DHCP server.

Client initialization via DHCP

 The figure shows one client and two servers. As described above, the client broadcasts a
DHCPDISCOVER into the subnet.
 There might be a relay to forward this broadcast. In the case shown, two servers receive this
broadcast and determine the configuration they can offer to the client.
 One example for this could be the checking of available IP addresses and choosing one for the
client. Servers reply to the client’s request with DHCPOFFER and offer a list of configuration
parameters.
 The client can now choose one of the configurations offered. The client in turn replies to the
servers, accepting one of the configurations and rejecting the others using DHCPREQUEST. If a
server receives a DHCPREQUEST with a rejection, it can free the reserved configuration for
other possible clients.
 The server with the configuration accepted by the client now confirms the configuration with
DHCPACK. This completes the initialization phase.
 If a client leaves a subnet, it should release the configuration received by the server using
DHCPRELEASE. Now the server can free the context stored for the client and offer the
configuration again.
2.3 DLC Services
A data link control is a service that ensures reliable network data communication by managing frame
error detection and flow control. DLC is based on the Data Link layer of the OSI model.

DLC handles the following tasks:

 Reliable link packet transmission


 Recovery and error detection during high-layer packet retransmission
 Error framing, which determines start and end packetization via three approaches: length counts,
bit-oriented framing and character-oriented framing

DLC character codes are based on standard character codes, such as the American Standard Code for
Information Interchange (ASCII). Extended Binary Coded Decimal Interchange Code (EBCDIC) is
comprised of hidden characters.

2.4 Data-Link Layer Protocols


• Specifications to implement data link layer
• Asynchronous Protocols:
– Primarily used in modems
– Feature start and stop bits and variable length gaps between characters
• Synchronous Protocols:
– Developed for higher speed networks
– No start and stop bits, much lower overhead, faster transmission
Synchronous Protocols
• Character-oriented protocols:
– Frames are interpreted as a sequence of characters
– Example: Binary Synchronous Communication (BSC)
• Character count-oriented protocols:
– Frame length specified within the header
– Example: Digital Data Communication Message Protocol, Count Type (DDCMP)
• Bit-oriented protocols:
– Frames are interpreted as a sequence of bits
– Example: High-Level Data Link Control (HDLC)
2.4.1 Framing
o In packet-switched networks, blocks of data (called frames at this level), not bit streams, are
exchanged between nodes.
o It is the network adaptor that enables the nodes to exchange frames.
o When node A wishes to transmit a frame to node B, it tells its adaptor to transmit a frame
from the node’s memory. This results in a sequence of bits being sent over the link.
o The adaptor on node B then collects together the sequence of bits arriving on the link and
deposits the corresponding frame in B’s memory.
o Recognizing exactly what set of bits constitute a frame—that is, determining where the frame
begins and ends—is the central challenge faced by the adaptor

o Bits flow between adaptors, frames between hosts

Byte-Oriented Protocols (BISYNC, PPP, DDCMP)


o One of the oldest approaches to framing is to view each frame as a collection of bytes
(characters) rather than collection of bits.
o Such a byte-oriented approach is exemplified by the BISYNC (Binary Synchronous
Communication) protocol developed by IBM in the late 1960s, and the DDCMP (Digital
Data Communication Message Protocol) used in Digital Equipment Corporation’s
DECNET.
o The more recent Point-to-Point Protocol (PPP), which is commonly run over dialup
modem links, is similar to BISYNC in that it uses character stuffing.
Byte-Counting Approach

 The number of bytes contained in a frame can be included as a field in the frame header.
DECNET’s DDCMP protocol uses this approach,
 The COUNT Field specifies how many bytes are contained in the frame’s body.
 One danger with this approach is that a transmission error could corrupt the COUNT Field, in
which case the end of the frame would not be correctly detected.
 (A similar problem exists with the sentinel based approach if the ETX field becomes corrupted)
will accumulate as many bytes as the bad COUNT field indicates and then use the error detection
field to determine that the frame is bad. This is sometimes called a framing error.
DDCMP Frame Format:

BISYNC Frame format:

Sentinel Approach:
 The beginning of a frame is denoted by sending a special SYN (synchronization) character.
 The data portion of the frame is then contained between special sentinel characters: STX (start of
text) and ETX (end of text).
 The SOH (start of header) field serves much the same purpose as the STX field.
 The problem with the sentinel approach, of course, is that the ETX character might appear in the
data portion of the frame.
 BISYNC overcomes this problem by ―escaping‖ the ETX character by preceding it with a DLE
(data-link-escape) character whenever it appears in the body of a frame; the DLE character is
also escaped (by preceding it with an extra DLE) in the frame body.
 This approach is often called character stuffing because extra characters are inserted in the data
portion of the frame .
Clock based framing (SONET)
 A third approach to framing is exemplified by the Synchronous Optical Network (SONET)
standard.
 The thing to remember about SONET is that it is the dominant standard for long-distance
transmission of data over optical networks.
 Lowest - speed SONET link, which is known as STS-1 and runs at 51.84 Mbps.
 An STS-1 frame is It is arranged as nine rows of 90 bytes each, and the first 3 bytes of each row
are overhead, with the rest being available for data that is being transmitted over the link.
 The first 2 bytes of the frame contain a special bit pattern, and it is these bytes that enable the
receiver to determine where the frame starts since each frame is 9 × 90 = 810 bytes long.

 Given SONET link runs at one of a finite set of possible rates, ranging from 51.84 Mbps (STS-
1) to 2488.32 Mbps (STS-48) and beyond.
 The significance for framing is that a single SONET frame can contain sub frames for multiple
lower-rate channels.
 A second related feature is that each frame is 125 μs long. This means that at STS-1 rates, a
SONET frame is 810 bytes long, while at STS-3 rates, each SONET frame is 2430 bytes long.
 Notice the synergy between these two features: 3 × 810 = 2430, meaning that three STS-1 frames
fit exactly in a single STS-3 frame.
2.4.2 Bit-Oriented Protocols (HDLC)
 Unlike these byte-oriented protocols, a bit oriented protocol is not concerned with byte
boundaries-it simply views the frame as a collection of bits.
 These bits might come from some character set, such as ASCII, they might be pixel values in an
image, or they could be instructions and operands from an executable file.
 The Synchronous Data Link Control (SDLC) protocol developed by IBM is an example of a bit-
oriented protocol; SDLC was later standardized by the ISO as the High-Level Data Link Control
(HDLC) protocol.
 HDLC denotes both the beginning and the end of a frame with the distinguished bit sequence
01111110. This sequence is also transmitted during any times that the link is idle so that the
sender and receiver can keep their clocks synchronized. Because this sequence might appear
anywhere in the body of the frame
 Bit-oriented protocols use the analog of the DLE character, a technique known as bit stuffing.

HDLC is a bit - oriented protocol where each frame contains up to six fields. The structure varies
according to the type of frame. The fields of a HDLC frame are −

 Flag − It is an 8-bit sequence that marks the beginning and the end of the frame. The bit pattern of
the flag is 01111110.
 Address − It contains the address of the receiver. If the frame is sent by the primary station, it
contains the address(es) of the secondary station(s). If it is sent by the secondary station, it contains
the address of the primary station. The address field may be from 1 byte to several bytes.
 Control − It is 1 or 2 bytes containing flow and error control information.
 Payload − This carries the data from the network layer. Its length may vary from one network to
another.
 FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard code used is
CRC (cyclic redundancy code)
Types of HDLC Frames

There are three types of HDLC frames. The type of frame is determined by the control field of the frame

I-frame − I-frames or Information frames carry user data from the network layer. They also include
flow and error control information that is piggybacked on user data. The first bit of control field of I-
frame is 0.

S-frame − S-frames or Supervisory frames do not contain information field. They are used for flow and
error control when piggybacking is not required. The first two bits of control field of S-frame is 10.

U-frame − U-frames or Un-numbered frames are used for myriad miscellaneous functions, like link
management. It may contain an information field, if required. The first two bits of control field of U-
frame is 11
Bit stuffing:
Sender able to send five consecutive 1’s to receiver, instead of transmitting the data the sender insert
0 to after five consecutive 1 before transmitting a bit.
Example:
Sender:
0110 111111 0011111 011111 11111 00000
Stuffed bit stream:
0110 1111101 00111110 0111110 111110 00000

Stuffed stream
Receiver (remove all stuffed bit)

0110 111111 0011111 011111 11111

2.4.3 Point to point protocol:


 The special start-of-text character, denoted as the Flag field is 01111110. The Address and
Control fields usually contain default values.
 The Protocol field is used for de multiplexing: It identifies the high-level protocol such as IP or
IPX (an IP-like protocol developed by Novell).
 The frame payload size can be negotiated, but it is 1500 bytes by default. The Checksum field is
either 2 (by default) or 4 bytes long.
 The PPP frame format is unusual in that several of the field sizes are negotiated rather than fixed.
This negotiation is conducted by a protocol called LCP (Link Control Protocol).
 LCP is also involved in establishing a link between two peers when both sides detect the carrier
signal.
PPP frame format:

PPP is a byte - oriented protocol where each field of the frame is composed of one or more bytes. The
fields of a PPP frame are −
 Flag − 1 byte that marks the beginning and the end of the frame. The bit pattern of the flag is
01111110.
 Address − 1 byte which is set to 11111111 in case of broadcast.
 Control − 1 byte set to a constant value of 11000000.
 Protocol − 1 or 2 bytes that define the type of data contained in the payload field.
 Payload − This carries the data from the network layer. The maximum length of the payload field is
1500 bytes. However, this may be negotiated between the endpoints of communication.
 FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard code used is
CRC (cyclic redundancy code)

Byte Stuffing in PPP Frame − Byte stuffing is used is PPP payload field whenever the flag sequence
appears in the message, so that the receiver does not consider it as the end of the frame. The escape byte,
01111101, is stuffed before every byte that contains the same byte as the flag byte or the escape byte.
The receiver on receiving the message removes the escape byte before passing it onto the network layer.
Services provided by PPP.

The main services provided by Point - to - Point Protocol are

 Defining the frame format of the data to be transmitted.


 Defining the procedure of establishing link between two points and exchange of data.
 Stating the method of encapsulation of network layer data in the frame.
 Stating authentication rules of the communicating devices.
 Providing address for network communication.
 Providing connections over multiple links.
 Supporting a variety of network layer protocols by providing a range of services.

Components of PPP

Point - to - Point Protocol is a layered protocol having three components −

 Encapsulation Component − It encapsulates the datagram so that it can be transmitted over the
specified physical layer.
 Link Control Protocol (LCP) − It is responsible for establishing, configuring, testing, maintaining
and terminating links for transmission. It also imparts negotiation for set up of options and use of
features by the two endpoints of the links.
 Authentication Protocols (AP) − These protocols authenticate endpoints for use of services. The
two authentication protocols of PPP are:
o Password Authentication Protocol (PAP)
o Challenge Handshake Authentication Protocol (CHAP)
 Network Control Protocols (NCPs) − These protocols are used for negotiating the parameters and
facilities for the network layer. For every higher-layer protocol supported by PPP, one NCP is there.
Some of the NCPs of PPP are:
o Internet Protocol Control Protocol (IPCP)
o OSI Network Layer Control Protocol (OSINLCP)
o Internetwork Packet Exchange Control Protocol (IPXCP)
o DEC net Phase IV Control Protocol (DNCP)
o NetBIOS Frames Control Protocol (NBFCP)

2.5 Media Access Control

IEEE STANDARDS

 To set standards to enable intercommunication among equipment from a variety of


manufacturers.
 Project 802 is a way of specifying functions of the physical layer and the data link layer of major
LAN protocols.

The Data Link Layer is divided into two Part

 MAC Media Access Control) Sub layer


 LLC (Logic Link Control) Sub layer

MAC Media Access Control) Sub layer

Bottom part: MAC

 Handles framing, MAC addressing, Medium Access control

 Defines CSMA/CD as the access method for Ethernet LANs and Token passing method for
Token Ring.

 Implemented in hardware

Top part: LLC (Logical Link Control)

 Provides error and flow control if needed

 Allows interconnectivity between different LANs data link layers

 Used to multiplex multiple network layer protocols in the data link layer
frame

 Implemented in software


IEEE standard for LANs

Multiple Access Methods

• Fixed assignment

– Partition channel so each node gets a slice of the bandwidth

– Essentially circuit switching – thus inefficient

– Examples: TDMA, FDMA, CDMA (all used in wireless/cellular environments)

• Contention-based

– Nodes contends equally for bandwidth and recover from collisions

– Examples: Aloha, Ethernet

• Token-based or reservation-based

– Take turns using the channel

– Examples: Token ring

Uses ALOHA (packet radio network) as the root protocol

• Developed at the University of Hawaii to support communication across the Hawaiian Islands.

• For ALOHA the medium was atmosphere, for Ethernet the medium is a coax cable.

2.5.1. Wired LANs ETHERNET

STANDARD ETHERNET

 Current version is called IEEE Ethernet


Def: It is a multiple access network.

 ie.A set of nodes send and receive frames over a shared link.

 Ethernet: It is a LAN protocol that is used in Bus and Star topologies and implements
CSMA/CD as the medium access method

 An Ethernet segment is implemented on a coaxial cable of up to 500 m.

 This cable is similar to the type used for cable TV except that it typically has an
impedance of 50 ohms instead of cable TV’s 75 ohms.

Uses CSMA/CD technology

 CSMA/CD: Ethernet’s Media Access Control (MAC) policy

 Carrier Sense Multiple Access with Collision Detection.

 In a CSMA system, any workstation wishing to transmit must first listen for existing
traffic on the line.

 A device listens by checking for a voltage. If no voltage is detected, the line is considered
idle and the transmission is initiated.

 CS = carrier sense

 Send only if medium is idle

 MA = multiple access

 CD = collision detection

 Stop sending immediately if collision is detected

 CSMA cuts down on the number of collisions but does not eliminate them. Collisions can still
occur

Physical Characteristics

Ethernet transceiver and adaptor


 Hosts connect to an Ethernet segment by tapping into it.

 A transceiver (a small device directly attached to the tap) detects when the line is idle and drives
signal when the host is transmitting.

 The transceiver also receives incoming signal.

 The transceiver is connected to an Ethernet adaptor which is plugged into the host.

 The protocol is implemented on the adaptor.

Ethernet repeater

• Multiple Ethernet segments can be joined together by repeaters.

• A repeater is a device that forwards digital signals.

• No more than four repeaters may be positioned between any pair of hosts.

– An Ethernet has a total reach of only 2500 m.

– 500m segments with 4 repeaters

• Any signal placed on the Ethernet by a host is broadcast over the entire network

– Signal is propagated in both directions.

– Repeaters forward the signal on all outgoing segments.

Terminators attached to the end of each segment absorb the signal

Ethernet’s Transmitter Algorithm

• Ethernet uses CSMA/CD – listens to line before/during sending

• If line is idle (no carrier sensed)(if there is no voltage)

– Initiate to send packet immediately

– upper bound message size of 1500 bytes


• If line is busy (carrier sensed)

– wait until idle and transmit packet immediately with probability – 1.

Hence it is called 1-persistent sending.

• When a collision is detected, it sends a “jamming sequence signal(runt)”.

– Make sure that all nodes are aware of the collision

– Length of the jam signal is 32 bit times

– Reschedule transmission according to exponential backoff algorithm

• Once an adaptor has detected a collision, and stopped its transmission, it waits a certain amount
of time and tries again.
Collisions

Collisions are caused when two adaptors transmit at the same time (adaptors sense collision based
on voltage differences)

• Both found line to be idle

• Both had been waiting to for a busy line to become idle

The worst case scenario happens when the two hosts are at opposite ends of the Ethernet.

Worst-case scenario: (a) A sends a frame at time t; (b) A’s frame arrives

at B at time t + d; (c) B begins transmitting at time t + d and collides with A’s frame;

(d) B’s runt (32-bit) frame arrives at A at time t + 2d.

• To know for sure that the frame its just sent did not collide with another frame, the transmitter
may need to send as many as 512 bits.

– Every Ethernet frame must be at least 512 bits (64 bytes) long.

• 14 bytes of header + 46 bytes of data + 4 bytes of CRC

• A begins transmitting a frame at time t

• d denotes the one link latency

• The first bit of A’s frame arrives at B at time t + d

• Suppose an instant before host A’s frame arrives, host B begins to transmit its own frame

• B’s frame will immediately collide with A’s frame and this collision will be detected by host B
• Host B will send the 32-bit jamming sequence. After collision is detected to ensure all hosts tsee
collision.

• Host A will not know that the collision occurred until B’s frame reaches it, which will happen at
t + 2 * d.

• Host A must continue to transmit until this time in order to detect the collision

– Host A must transmit for 2 * d to be sure that it detects all possible collisions

Ethernet Addresses

• Each host on an Ethernet (in fact, every Ethernet host in the world) has a unique Ethernet
Address.

• The address belongs to the adaptor, not the host.

– It is usually burnt into ROM.

• Ethernet addresses are typically printed in a human readable format

– As a sequence of six numbers separated by colons.

– Each number corresponds to 1 byte of the 6 byte address and is given by a pair of
hexadecimal digits, one for each of the 4-bit nibbles in the byte

– Leading 0s are dropped.

– For example, 8:0:2b:e4:b1:2 is

• 00001000 00000000 00101011 11100100 10110001 00000010

Ethernet Frame format

802.3 MAC frame


Preamble

 It alert the receiving system to the coming frame and enable it to synchronize its input
timing.
 8 bytes with pattern 10101010 used to synchronize receiver, sender clock rates.
 The first field of the 802.3 frame,
 the preamble, contains seven bytes (56 bits) of alternating 0s and 1s.
 The pattern 1010101 provides only an alert and a timing pulse;
 it can be used to indicate the beginning of the data stream.

Start frame delimiter (SFD).

 The second field (one byte: 10101011) of the 802.3 frame signals the beginning of the frame.
 The SFD tells the receiver that every thing that follows is data, starting with the addresses.

Destination addresses (DA).

The destination address (DA) field is allotted six bytes and contains the physical address of the packet’s
next destination.

. Source addresses (SA).

The source address (SA) field is also allotted six bytes and contains the physical address of the last
device to forward the packet.

Length/type of PDU.

 Protocol data unit


 These next two bytes indicate the number of bytes in the coming PDU.
 If the length of the PDU is fixed, this field can be used to indicate type, or as a base for other
protocols.
 The PDU can be anywhere from 46 bytes to 1500 bytes long, depending on the type of frame and
the length of the information field.
 The PDU is generated by the upper (LLC) sub layer.

SSAP – Source Service Access Points

DSAP- Destination Service Access Points

PDU has 3 fields.

DSAP is an interface that link 2 devices for communication between Sender and Receiver.
CRC

The last field in the 802.3 frame contains the error detection information, in this case a CRC-32.

 Padding: Zeros are added to the data field to make the minimum data length = 46 bytes

 Ethernet IEEE 802.3 defines 2 categories(Implementation)


o Base Band
o Broad Band

 The 802 model also defines some of the physical specifications for each of the protocols defined in
the MAC layer.
 In the 802.3 standard, the IEEE defines the types of cable, connections, and signals that are to be
used in each of five different Ethernet implementations.

 10 BASE 5: Thick Ethernet


 The first of the physical standards defined in the IEEE 802.3 model is called lOBase5 thick Ethernet,
or Thicknet.
 The nickname derives from the size of the cable, which is roughly the size of garden hose and too
stiff to bend with your hands.
 10Base5 is a BUS topology LAN that uses baseband signaling and has a maximum segment length
of 500 meters.
 10BASE2: Thin Ethernet
 The second Ethernet implementation defined by the IEEE 802 series is called 10Base2 or thin
Ethernet.
 Thin Ethernet (also called Thinnet, cheapnet, cheapernet, and thin wire Ethernet) provides an
inexpensive alternative to 10Base5 Ethernet, with the same data rate.
 Like 10Base2, is a bus topology LAN.



 IEEE 802.3 Cable Types

Name Cable Max. Max Cable Nodes /segment


Segment Length

10Base5 thick coax 500 meters 100

10Base2 thin coax 185 meters 30

10BaseT twisted pair 100 meters 1

10BaseF Fiber Optic 2Km 1

 10Base5 implementation

 Connection of stations to the medium using 10Base2


Ethernet evolution through four generations

Fast Ethernet

 100 Mbps transmission rate


 same frame format, media access, and collision detection rules as 10 Mbps Ethernet
 can combine 10 Mbps Ethernet and Fast Ethernet on same network using aswitch
 media: twisted pair (CAT 5) or fiber optic cable (no coax)

Gigabit Ethernet

 Speed 1Gpbs
 Minimum frame length is 512 bytes
 Operates in full/half duplex modes mostly full duplex
 In the full-duplex mode of Gigabit Ethernet, there is no collision;
 the maximum length of the cable is determined by the signal attenuation in the cable

10Gbps Ethernet

 Maximum link distances cover 300 m to 40 km


 Full-duplex mode only
 No CSMA/CD
 Uses optical fiber only

Categories of traditional Ethernet

Advantages:

 Ethernets work best under light loads


 Most networks are limited to about 200 hosts
 Most networks are much shorter
 Transport level flow control helps reduce load (number of back to back packets)
 Ethernet is inexpensive, fast and easy to administer!
Why did Ethernet Win?

 There are LOTS of LAN protocols


 Price
 Performance
 Availability
 Ease of use
 Scalability

Disadvantages:

• Higher costs for provisioning in existing buildings


• Doesn't serve mobile devices
• Limited physical access (i.e.: ethernet ports in a room must be in specific locations.)
• Physical connectors can fail, especially if used (connected to, disconnected from) frequently.
• Some bandwidth upgrades will require cable replacement. (I.e.: CAT-5e to CAT-6, etc.)

Efficiency is improved by avoiding these conditions

2.7 Wireless LANs (802.11)


One in which a mobile user can connect to a local area network (LAN) through a wireless
(radio) connection.

2.7.1 Introduction
How do wireless LANs work?
Wireless LANs operate in almost the same way wired LANs, using the same networking protocols and
supporting the most of the same applications
Requirements for wireless LANs:

1.Throughput:
• The maximum no of bits transferred per second. It should be higher for better system. capacity.
2.Number of nodes:
• Wireless LANs may need to support hundreds of nodes across multiple cells.
3.Connection to backbone LAN:
 Use control modules to connect to both types of LANs
4,Service area:
• A typical coverage area for a wireless LAN has a diameter of 100 to 300 m.
5.Battery power consumption:
• Mobile workers use battery-powered workstations that need to have a long battery life when used
with wireless adapters.
• Typical wireless LAN implementations have features to reduce power consumption while not
using the network, such as a sleep mode.
6.Transmission robustness and security:
During transmission any link failure is occurred fin alternative path to deliver the packet.
It provide security to the data.
7.Collocated network operation:
• As wireless LANs become more popular, it is quite likely for two or more wireless LANs to
operate in the same area or in some area where interference between the LANs is possible..
8.License-free operation:
• Users would prefer to buy and operate wireless LAN products without having to secure a license
for the frequency band used by the LAN.
9.Handoff/roaming:
• The MAC protocol used in the wireless LAN should enable mobile stations to move from one
cell to another.
10. Dynamic configuration:
• The MAC addressing and network management aspects of the LAN should permit dynamic and
automated addition, deletion, and relocation of end systems without disruption to other users.

2.7.2 IEEE 802.11


Wireless Physical Layer
• A family of wireless LAN (WLAN) specifications developed by a working group at the Institute
of Electrical and Electronic Engineers (IEEE)
• Defines standard for WLANs using the following four technologies
• Frequency Hopping Spread Spectrum (FHSS)
• Direct Sequence Spread Spectrum (DSSS)
• Infrared (IR)
• Orthogonal Frequency Division Multiplexing (OFDM)
• Versions: 802.11a, 802.11b, 802.11g, 802.11e, 802.11f, 802.11i

Physical Media Defined by Original 802.11 Standard
 Frequency-hopping spread spectrum
 Operating in 2.4 GHz ISM band
 Lower cost, power consumption
 79 non-overlapping channels, each 1 Mhz wide at low end of 2.4 GHz ISM band.
 Signal is broadcast over seemingly random series of radio frequencies
 Signal hops from frequency to frequency at fixed intervals
 Receiver, hopping between frequencies in synchronization with transmitter, picks up message

Direct-sequence spread spectrum


 Operating in 2.4 GHz ISM band
 Supports higher data rates
 Each bit in original signal is represented by multiple bits in the transmitted signal
 Spreading code spreads signal across a wider frequency band
 DSSS is the only physical layer specified for the 802.11b specification
 802.11a and 802.11b differ in use of chipping method
 802.11a uses 11-bit barker chip
 802.11b uses 8-bit complimentary code keying (CCK) algorithm

Infrared
 Lowest cost
 Lowest range compared to spread spectrum
 Doesn’t penetrate walls, so no eavesdropping
 Two capacities 1 Mbps or 2 Mbps.
 Range is 10 to 20 meters and cannot penetrate walls.
 Does not work outdoors.

802.11a OFDM (Orthogonal Frequency Divisional Multiplexing)
– Compatible with European HiperLan2.
– 54Mbps in wider 5.5 GHz band  transmission range is limited.
– Uses 52 FDM channels (48 for data; 4 for synchronization).
– Encoding is complex ( PSM up to 18 Mbps and QAM above this capacity).
– E.g., at 54Mbps 216 data bits encoded into into 288-bit symbols.
– More difficulty penetrating walls.

Future of WLAN
 WLANs move to maturity
 Higher Speeds
 Improved Security
 Seamless end-to-end protocols
 Better Error control
 Long distances
 New vendors
 Better interoperability
 Global networking

802.11 Architecture
The 802.11architecture defines two types of services and three different types of stations
802.11 Services
The two types of services are
1. Basic services set (BSS)
2. Extended Service Set (ESS)

1. Basic Services Set (BSS)


• The basic services set contain stationary or mobile wireless stations and a central base station called
access point (AP).
• The use of access point is optional.
• If the access point is not present, it is known as stand-alone network.
Such a BSS cannot send data to other BSSs.
This type of architecture is known as adhoc architecture.
• The BSS in which an access point is present is known as an infrastructure network.
Base Station : all communication through an access point {note hub topology}.
Applications – Ad Hoc Networking
• Peer-to-peer network
• Set up temporarily to meet some immediate need
• E.g. group of employees, each with laptop or palmtop, in business or classroom meeting
• Network for duration of meeting

2. Extend Service Set (ESS)


• An extended service set is created by joining two or more basic service sets (BSS) having access
points (APs).

• These extended networks are created by joining the access points of basic services sets through a
wired LAN known as distribution system.

There are two types of stations in ESS:


(i) Mobile stations: These are normal stations inside a BSS.
(ii) Stationary stations: These are AP stations that are part of a wired LAN.
• Communication between two stations in two different BSS usually occurs via two APs.
• A mobile station can belong to more than one BSS at the same time.
Distribution of Messages
 Distribution service (DS)
 Used to exchange MAC frames from station in one BSS to station in another BSS
 Integration service
 Transfer of data between station on IEEE 802.11 LAN and station on integrated IEEE
802.x LAN
The standard defines three types of stations:
No transition:
A station of this type is either stationary or moves only within the direct communication range of the
communicating stations of a single BSS.
BSS transmission:
This is defined as a station movement from one BSS to another BSS within the same ESS.
ESS transition:
This is defined as a station movement from a BSS in one ESS to a BSS within another ESS.

Two types of Problem

Hidden Station Problem


• Wireless stations have transmission ranges and not all stations are within radio range of each
other.
• Simple CSMA will not work!
• C transmits to B.
• If A ―senses” the channel, it will not hear C’s transmission and falsely conclude that A can begin
a transmission to B.
Exposed Station Problems
• This is the inverse problem.
• B wants to send to C and listens to the channel.
• When B hears A’s transmission, B falsely assumes that it cannot send to C.

MAC sub layer Functions

802.11 support two different modes of operations. These are:


1. Distributed Coordination Function (DCF)
2. Point Coordination Function (PCF)

1.Distributed Coordination Function


• Uses CSMA/ CA (CSMA with Collision Avoidance).
– Uses both physical and virtual carrier sensing.

Two methods are supported:


1. based on MACAW(Multiple Access with Collision Avoidance for Wireless) with virtual
carrier sensing.
2. 1-persistent physical carrier sensing.

 The DCF is used in BSS having no access point.


 DCF uses CSMA/CA protocol for transmission.

Makes use of CSMA/CA rather than CSMA/CD for the following reasons:
Wireless LANs cannot implement CSMA/CD for three reasons:
1. For collision detection a station must be able to send data and receive collision signals at the same
time( costly stations and increased bandwidth requirements).
2. Collision may not be detected because of the hidden station problem.
3. The distance between stations may result in Signal fading which prevent a station at one end from
hearing a collision at the other end.
 Suited for ad hoc network and ordinary asynchronous traffic

• The following steps are followed in this method.

o When a station wants to transmit, it senses the channel to see whether it is free or not.
 If the channel is not free the station waits for back off time.
 If the station finds a channel to be idle, the station waits for a period of time called distributed
inter frame space (DIFS).
 The station then sends control frame called request to send (RTS) as shown in figure.
 The destination station receives the frame and waits for a short period of time called short inter
frame space (SIFS).
 The destination station then sends a control frame called clear to send (CTS) to the source
station. This frame indicates that the destination station is ready to receive data.
 The sender then waits for SIFS time and sends data.
 The destination waits for SIFS time and sends acknowledgement for the received frame.

CSMA/CA in wireless LAN


1. station senses the medium
(checking the energy level at carrier frequency):
a. uses a persistence strategy with back-off until the channel is idle.
b. if idle channel , waits for of time called distributed inter frame space (DIFS);
then sends a request to send (RTS) Control frame .
2. the destination station receive RTS and wait for short inter frame space (SIFS), than send clear
to send (CTS) control frame,(ready to receive data)
3. The source station sends data after waiting an
amount of time equal to SIFS.
4. The destination station, after waiting for time equal to SIFS, sends an acknowledgment

Collision avoidance CSMA/CA

802.11 standard uses Network Allocation Vector (NAV) for collision avoidance.
The procedure used in NAV is explained below:
• Whenever a station sends an RTS frame, it includes the duration of time for which the station
will occupy the channel.
• All other stations that are affected by the transmission creates a timer caned network
allocation vector (NAV).
• This NAV (created by other stations) specifies for how much time these stations must not
check the channel.
• Each station before sensing the channel, check its NAV to see if has expired or not.
• If its NA V has expired, the station can send data, otherwise it has to wait.

Collision during handshaking

• There can also be a collision during handshaking i.e. when RTS or CTS control frames are
exchanged between the sender and receiver.

In this case following procedure is used for collision avoidance:


• When two or more stations send RTS to a station at same time, their control frames collide.
• If CTS frame is not received by the sender, it assumes that there has been a collision.
• In such a case sender, waits for back off time and retransmits RTS.
• There is no mechanism for collision detection, if the sender has not received a CTS frame from
the receiver, assumes there has been a collision ,the sender tries again.

3. Point Coordination Function


1. An optional access method on top of DCF
2. Implemented in an infrastructure network (not in an ad hoc network).
3. Contention-Free
4. Mostly for time-sensitive transmission services like voice or multimedia.
5. The AP performs polling stations one after another, sending any data they have to the AP.
6. To give priority to PCF over DCF, another set of interframe spaces has been defined:
 SIFS - Short Inter Frame Spacing
 Used for immediate response actions e.g ACK, CTS
 PIFS - Point Inter Frame Spacing
 PIFS (PCF IFS) is shorter than the DIFS.
• if, at the same time, a station wants to use only DCF and an AP wants to use PCF, the AP has
priority.
• Due to this priority of PCF over DCF, stations that only use DCF may not gain access to the channel.

• To overcome this problem, a repetition interval is defined that is repeated continuously. This repetition
interval starts with a special control frame called beacon frame.

MAC Frame Format

Frame Control:
Type of frame
Management frame – used for the initiate communication between station and AP.
Control frame – used for accessing the channel and ack frame.
Data frame- carrying data and control frame.
— Provides control information
• Includes whether frame is to or from DS, fragmentation information, and privacy
information
• Duration/Connection ID:
— If used as duration field, indicates time (in s) channel will be allocated for successful
transmission of MAC frame
— In some control frames, contains association or connection identifier
• Addresses:
— Number and meaning of address fields depend on context
— Types include source, destination, transmitting station, and receiving station
• Sequence Control:
— 4-bit fragment number subfield
• For fragmentation and reassembly
— 12-bit sequence number
— Number frames between given transmitter and receiver
• Frame Body:
— MSDU (or a fragment of)
• LLC PDU or MAC control information
• Frame Check Sequence:
— 32-bit cyclic redundancy check

Control Frames
• Request to Send (RTS)
— First frame in four-way frame exchange
• Clear to Send (CTS)
— Second frame in four-way exchange
• Acknowledgment (ACK)

Types of Security Services


 Authentication
 Establishes identity of stations to each other
 De-authentication
 Invoked when existing authentication is terminated
 Privacy
 Prevents message contents from being read by unintended recipient

Wireless LAN Applications:


Lists four application areas for wireless LANs:
 LAN extension,
 Cross building interconnect,
 Nomadic access
 Ad hoc networks.

Applications - LAN Extension


 Saves installation of LAN cabling
 Easy to relocate and other modifications to network structure
 In some environments, role for the wireless LAN
Buildings with large open areas
 Manufacturing plants, stock exchange trading floors,warehouses
 Historical buildings
 Small offices where wired LANs not economical
 May also have wired LAN
o Servers and stationary workstations
Nomadic Access
• Link between LAN hub and mobile data terminal
— Laptop or notepad computer
— Enable employee returning from trip to transfer data from portable computer to server
• Also useful in extended environment such as campus or cluster of buildings
— Users move around with portable computers
— May wish access to servers on wired LAN

Advantages of WLAN:
 User mobility
 Voice and data services
 Scalable architecture
 Access to central applications
 Handover between access points
 Robust model for industry
 Plug-and-Play architecture
 Robust controller

Disadvantages of WLAN:
 As the number of computers using the network increases, the data transfer rate to each computer
will decrease accordingly.
 As standards change, it may be necessary to replace wireless cards and/or access points.
 Lower wireless bandwidth means some applications such as video streaming will be more
effective on a wired LAN.
 Security is more difficult to guarantee and requires configuration.
 Devices will only operate at a limited distance from an access point, with the distance
determined by the standard used and buildings and other obstacles between the access point and
the user.
 A wired LAN is most likely to be required to provide a backbone to the WLAN; a WLAN should
be a supplement to a wired LAN and not a complete solution.
 Long-term cost benefits are harder to achieve in static environments that require few moves and
changes.

2.8 Bluetooth (802.15)

• Bluetooth is a wireless LAN technology designed to connect devices of different functions such
as telephones, notebooks, computers, cameras, printers, coffee makers, and so on. A Bluetooth
LAN is an ad hoc network, which means that the network is formed spontaneously.
• Bluetooth defines two types of networks:

• piconet

• scatternet.

Piconet

• A Bluetooth network is called a piconet, or a small net.

• It can have up to eight stations, one of which is called the master; the rest are called slaves.

• Maximum of seven slaves. Only one master.

• Master determines channel and phase

• Slaves synchronize their clocks and hopping sequence with the master.

• But an additional eight slaves can stay in parked state, which means they can be synchronized
with the master but cannot take part in communication until it is moved from the parked state.

P
S

S M SB

SB
S
P

Scatternet

• Piconets can be combined to form what is called a scatternet.

• A slave station in one piconet can become the master in another piconet.

Bluetooth devices has a built-in short-range radio transmitter.

 Standby - Waiting to join a piconet


 Active – participates in piconet
 Listens, transmits and receives frames
 Sniff – only listens on specified slots
 Hold – does not support ACL frames
 Reduced power status
 May still participate in SCO exchanges
 Park – does not participate on piconet

 Still retained as part of piconet


Bluetooth layers

Radio Layer:

Roughly equivalent to physical layer of the Internet model. Physical links can be synchronous or
asynchronous.

• Uses Frequency-hopping spread spectrum [Changing frequency of usage]. Changes it


modulation frequency 1600 times per second.

• Uses frequency shift keying (FSK )with Gaussian bandwidth filtering to transform bits to
a signal

Baseband layer:

Roughly equivalent to MAC sublayer in LANs. Access is using Time Division (Time slots).

• Length of time slot = dwell time = 625 microsec. So, during one frequency, a sender
sends a frame to a slave, or a slave sends a frame to the master.

• Time division duplexing TDMA (TDD-TDMA) is a kind of half-duplex communication in


which the slave and receiver send and receive data, but not at the same time (half-duplex).
• However, the communication for each direction uses different hops, like walkie-talkies.

Single-secondary communication

• Also called Single-slave communication

• Master uses even-numbered slots

• Slave uses odd-numbered slots

Multiple-secondary communication

Also called Multiple-slave communication

• Master uses even-numbered slots

• Slave sends in the next odd-numbered slot if the packet in the previous slot was
addressed to it.
Physical Links

• Synchronous connection-oriented (SCO)

• Latency is important than integrity.

• Transmission using slots.

• No retransmission.

• Asynchronous connectionless link (ACL)

• Integrity is important than latency.

• Does like multiple-slave communication.

• Retransmission is done.

• L2CAP (Logical Link Control and Adaptation Protocol)

• Adapts upper layer protocols to the baseband layer. Provides both connectionless and
connection-oriented services

• Equivalent to LLC sublayer in LANs.

• Used for data exchange on ACL Link. SCO channels do not use L2CAP.

• Frame format has 16-bit length [Size of data coming from upper layer in bytes], channel
ID, data and control.

• Can do Multiplexing, segmentation and Reassembly, QoS [with no QoS, best-effort


delivery is provided] and Group mangement [Can do like multicast group, using some
kind of logical addresses].

Frame format types

Access code

 used for timing synchronization, offset compensation, paging, and inquiry


 The access code is used for packet identification.

 Every packet exchanged on the channel is preceded by its access code

 Header

 used to identify frame type and carry protocol control information

 e.g.packetnumbering, flowcontrol, slave address

 M_ADDR: temporary address assigned to active members of the piconet,


 TYPE: type of packet. There are 12 types of packets for each SCO and ACL
physical links, and four types of common control packets for both.
 FLOW: for flow control.
 ARQN: for ACK.
 SEQN: contains sequence number for packet ordering.
 HEC: header error check for header integrity.

 Payload

 contains user voice or data and payload header, if present

L2CAP format

 Length – length of information payload, PSM fields


 Channel ID – 2, indicating connectionless channel

Bluetooth Security
• The following are the three basic security services specified in the Bluetooth standard:
– Authentication
• Verifying the identity of communicating devices. User authentication is not
provided natively by Bluetooth.
– Confidentiality
• Preventing information compromise caused by eavesdropping by ensuring that
only authorized devices can access and view data.
– Authorization
• allowing the control of resources by ensuring that a device is authorized to use a
service before permitting it to do so.
Advantages
– Bluetooth: interoperable
– IrDA: line of sight needed, point-to-point
– WLAN: higher power consumption
Disadvantages
– Bluetooth: onlyupto1Mbps
– IrDA: much cheaper, faster (upto16Mbps)
– WLAN: faster (upto11Mbps)
2.8 Connecting Devices
 Repeater – A repeater operates at the physical layer. ...
 Hub – A hub is basically a multiport repeater. ...
 Types of Hub.
 Bridge – A bridge operates at data link layer. ...
 Types of Bridges.

1. Repeater – A repeater operates at the physical layer. Its job is to regenerate the signal over the same
network before the signal becomes too weak or corrupted so as to extend the length to which the signal
can be transmitted over the same network. An important point to be noted about repeaters is that they do
not amplify the signal. When the signal becomes weak, they copy the signal bit by bit and regenerate it
at the original strength. It is a 2 port device.

3. Hub – A hub is basically a multiport repeater. A hub connects multiple wires coming from
different branches, for example, the connector in star topology which connects different stations.
Hubs cannot filter data, so data packets are sent to all connected devices. In other
words, collision domain of all hosts connected through Hub remains one. Also, they do not have
intelligence to find out best path for data packets which leads to inefficiencies and wastage.
Types of Hub
 Active Hub :- These are the hubs which have their own power supply and can clean , boost and
relay the signal along the network. It serves both as a repeater as well as wiring center. These are
used to extend maximum distance between nodes.
 Passive Hub :- These are the hubs which collect wiring from nodes and power supply from active
hub. These hubs relay signals onto the network without cleaning and boosting them and can’t be
used to extend distance between nodes.

3. Bridge – A bridge operates at data link layer. A bridge is a repeater, with add on functionality of
filtering content by reading the MAC addresses of source and destination. It is also used for
interconnecting two LANs working on the same protocol. It has a single input and single output port,
thus making it a 2 port device.
Types of Bridges
 Transparent Bridges :- These are the bridge in which the stations are completely unaware of the
bridge’s existence i.e. whether or not a bridge is added or deleted from the network ,
reconfiguration of
the stations is unnecessary. These bridges make use of two processes i.e. bridge forwarding and
bridge learning.
 Source Routing Bridges: - In these bridges, routing operation is performed by source station and
the frame specifies which route to follow. The hot can discover frame by sending a special frame
called discovery frame, which spreads through the entire network using all possible paths to
destination.

4. Switch – A switch is a multi port bridge with a buffer and a design that can boost its efficiency (large
number of ports implies less traffic) and performance. Switch is data link layer device. Switch can
perform error checking before forwarding data that makes it very efficient as it does not forward packets
that have errors and forward good packets selectively to correct port only. In other words, switch
divides collision domain of hosts, but broadcast domain remains same.

5. Routers – A router is a device like a switch that routes data packets based on their IP addresses.
Router is mainly a Network Layer device. Routers normally connect LANs and WANs together and
have a dynamically updating routing table based on which they make decisions on routing the data
packets. Router divide broadcast domains of hosts connected through it.

6. Gateway – A gateway, as the name suggests, is a passage to connect two networks together that may
work upon different networking models. They basically works as the messenger agents that take data
from one system, interpret it, and transfer it to another system. Gateways are also called protocol
converters and can operate at any network layer. Gateways are generally more complex than switch or
router.

7. Brouter – It is also known as bridging router is a device which combines features of both bridge and
router. It can work either at data link layer or at network layer. Working as router, it is capable of
routing packets across networks and working as bridge, it is capable of filtering local area network
traffic.

You might also like