Sei sulla pagina 1di 27

Local Area Networks

Dr. Ramana
I.I.T Rajasthan

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

1 / 27

Outline of the Lectures


1

Introduction
LAN Topologies
Frame Transmissions on Various Topologies

LAN Protocol Architechure


Logical Link Control - IEEE 802.2
Medium Access Control - MAC
Contention based MAC
Frame Formats - IEEE 802.3 and Ethernet-II
Token based MAC
LAN Devices
Spanning Tree Algorithm
Shared vs Switched Ethernets

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

2 / 27

Introduction

Introduction
LAN consists of a shared transmission medium and a set of
hardware and software devices for interfacing devices to the
medium.
A medium access mechanism is needed to allow an orderly
access to the shared medium.
Size is restricted to few kilometers.
Owned by a single organization.
Used mainly for carrying data traffic.
Data rates are higher and ranges from 100 Mbps to 10 Gbps.
Key elements:
Topology - bus,ring,tree,star,
Transmission medium - coax,twistedpair,optical fiber, wireless,
Medium access control - round-robin, reservation, contention
Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

3 / 27

Introduction

Layer 3
switch

1
Gbps

WAN
Router

1
Gbps
Layer 3
switch

1
Gbps
Layer 2
switch

1
Gbps
Layer 2
switch

Layer 2
switch
10/100
Mbps

10/100
Mbps

11
Mbps

Laptop with
wireless connection

Typical Premises Network Configuration

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

4 / 27

Tap

Flow of data

Introduction

LAN Topologies

Terminating
resistance

Repeater

(a) Bus
(c) Ring
Central Hub, Switch,
or Repeater

Headend

(b) Tree

(d) Star

LAN Topologies

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

5 / 27

Introduction

Frame Transmissions on Various Topologies

C transmits frame addressed to A

Frame is not addressed to B; B ignores it

A copies frame as it goes by

Frame Transmission on a Bus LAN

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

6 / 27

Introduction

Frame Transmissions on Various Topologies

C
A

(a) C transmits frame


addressed to A

C
B

(b) Frame is not addressed


to B; B ignores it

C
B

(c) A copies frame


as it goes by

C
B

(d) C absorbs
returning frame

Frame Transmission on a Ring LAN

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

7 / 27

LAN Protocol Architechure

Sublayers of Data Link Layer


LLC - provide an interface to higher layers and perform flow and
error contol
MAC - framing, frame transmission and reception, medium access
control
OSI Reference
Model
Application
Presentation
Session
Transport
Network
Data Link
Physical

Medium

IEEE 802
Reference
Model
Upper
Layer
Protocols

LLC Service
Access Point
(LSAP)

( )
( )
( )
Logical Link Control
Medium Access
Control

Physical

Scope
of
IEEE 802
Standards

Medium

IEEE 802 Protocol Layers Compared to OSI Model

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

8 / 27

LAN Protocol Architechure

Application Layer

Application data

TCP
header

TCP Layer

IP
header

IP Layer

LLC
header

LLC Layer

MAC
header

MAC
trailer

MAC Layer

TCP segment
IP datagram
LLC protocol data unit
MAC frame

LAN Protocols in Context

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

9 / 27

LAN Protocol Architechure

Logical Link Control - IEEE 802.2

LLC Details - IEEE 802.2


Derived from HDLC and provides 3 types of services to the users
Type 1 - Unacknowledged connectionless
Simple service, no flow and error controls
Delivery of data is not guaranteed (higher layers may take care of
the reliability of data)
Uses unnumbered frame to transfer the users data

Type 2 - Connection mode


logical connection will be setup between the two users
uses Asynchronous balanced mode of operations and other modes
are not supported
flow and error control are provided via S-frames
would be useful when no reliability is provided at higher layers

Type 3 - Acknowledged connectionless


no connection setup, but each transmitted frame is acked
to guard against lost frames, 1-bit sequence number is used.
would be useful when each transmission to be received by multiple
stations
Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

10 / 27

LAN Protocol Architechure

Medium Access Control - MAC

MAC - Overview
Governs access to the shared medium
Inaddtion, interface to physical layer, Sending/receiving frames,
Frame synchronization, and Error detection
Medium access mechanisms could be
either centralized or distributed
and synchronous or asynchronous
Synchronous: FDM, synchronous TDM, but not well used
Asynchronous: Round Robin, Reservation, Contention

Centralized vs. Distributed access control


Advantages of centralized control
Easier to provide centralized control with priorities, etc.
Individual node logic is simple
Avoids problem of group coordination

Disadvantages
Less reliable
May become bottleneck and reduce efficiency
Overheads may be higher if propagation delay is high
Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

11 / 27

LAN Protocol Architechure

Medium Access Control - MAC

(Cont.)
Access Control Mechanisms
Round-Robin
Each node, in turn, is given opportunity to transmit. Either a central
controller polls a node to permit to go, or nodes can coordinate
among themselves. Token is passed. Simple but overhead may
be high if traffic is high

Reservation
Partition channel so each node gets a slice of the bandwidth
Node wishing to transmit makes reservations for time slots in
advance. Central or distributed.

Contention (Random Access)


No control on who tries; If collision occurs, retransmission after
random timeout is attempted.

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

12 / 27

LAN Protocol Architechure

Contention based MAC

Contention based MAC - Overview

All the nodes contend for the medium. No control is exercised to


determine whose turn it is.
Simple to implment and suitable for bursty traffic in low and
moderate traffic volumes.
Performance may collapse under heavy loads.
Example: Aloha, Slotted Aloha, CSMA, 1 persistent, p-persistent,
non-persistent CSMA, CSMA/CD, CSMA/CA
CSMA-Carrier Sense Multiple Access, CD - Collision Detection,
CA - Collision Avoidance

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

13 / 27

LAN Protocol Architechure

Contention based MAC

Variants of CSMA

Constant or variable delay

Nonpersistent:
Transmit if idle
If busy, wait random time
and repeat process
If collision, back off

Channel Busy

time
Ready

1-Persistent:
Transmit as soon as
channel goes idle
If collision, back off

P-Persistent:
Transmit as soon as channel
goes idle with probability P
Otherwise, delay one time slot
and repeat process
If collision, back off

CSMA Persistence and Backoff

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

14 / 27

LAN Protocol Architechure

Contention based MAC

CSMA/CD
A

TIME t0
A's transmission
C's transmission
Signal on bus
TIME t1
A's transmission
C's transmission
Signal on bus
TIME t2
A's transmission
C's transmission
Signal on bus
TIME t3
A's transmission
C's transmission
Signal on bus

CSMA/CD Operation

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

15 / 27

LAN Protocol Architechure

Contention based MAC

CSMA/CD Flow chart

Packet?

Sense
Carrier

No
Send

Detect
Collision
Yes

Discard
Packet
attempts < 16

Jam channel
b=CalcBackoff();
wait(b);
attempts++;

attempts == 16

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

16 / 27

LAN Protocol Architechure

Contention based MAC

Binary Exponential Backoff (BEB) Algorithm


Adaptors detect collision based on voltage differences
Up on detecting collision, all transmitting nodes send a high
voltage signal, called JAM signal and execute BEB algorithm.
BEB-Algorithm for a frame under transmission, F
1

Increment number of collisions experience from frame F as


C C+1
If C < 16
1

Derive a random number K , which is number of timeslots, from a


contention window (cw) = {0, min(2C -1,1023)}.
Defer the transmission of F by time T = K slotlength, where
slotlength = 51.2s

Else
1

Discard frame F and reset C 0, proceed with the next frame


trasnmission

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

17 / 27

LAN Protocol Architechure

Contention based MAC

On Slot Time
Slotlength = 51.2s, which is minimum frame duration or
transmission time. It is equal to the transmission time of 64-byte
frame at date rate 10Mbps.
It is a function of datarate (10 Mbps), number of LAN segments
(5), length of each segment (500 meters), delay introduced by
each repeater (3 s)
LAN Length (L) = 500 x 5 = 2500 meters
Round Trip Distance = 5000 meters
5000
Total propagation time (tprop ) = 210
8 = 25s
Delay added by each repeater (trep ) = 3s x 2 (Bi-Direction) x 4
Repeaters = 24s
Round Trip Time (RTT) = tprop + trep = 25 + 24 = 49s.
The nearest frame size (in power of 2) which corresponds to this
minimum frame transmission time is 64 bytes. So the slottime @
10 Mbps data rate is 51.2s.
Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

18 / 27

LAN Protocol Architechure

Frame Formats - IEEE 802.3 and Ethernet-II

IEEE 802.3 and Ethernet-II Frame Format


7

1
S

Preamble

6
Destination
Address

6
Source

Address

46 1500

Length

802.2 Header and Data

FCS

46 1500

Type

Data

FCS

a) IEEE 802.3 frame


8
Preamble

Destination

Source

Address

Address

b) Ethernet II frame proposed by DIX (Digital, Intel, Xerox) consortium


Note: Field sizes are given in Bytes

Preamble: Alternating pattern of ones and zeros tells receiving stations that a frame is coming (Ethernet or IEEE 802.3).
Ethernet frame includes an additional byte that is the equivalent of the Start-of-Frame field specified in the IEEE 802.3 frame.

Start-of-Frame (SOF): The IEEE 802.3 delimiter byte ends with two consecutive 1 bits, which serve to synchronize the frame
reception portions of all stations on the LAN. SOF is explicitly specified in Ethernet.

Destination and Source Addresses: (MAC or Hardware address) Source address is always a unicast (single-node) address
and destination address can be unicast, multicast (group), or broadcast (all nodes).

Type (Ethernet): The type specifies the upper-layer protocol to receive the data after Ethernet processing is completed.

Length (IEEE 802.3): The length indicates the number of bytes of data that follows this field. Ex. IP 0x0800, ARP - 0x0806

Data (Ethernet): After physical-layer and link-layer processing is complete, the data contained in the frame is sent to an

upper-layer protocol, which is identified in the Type field. Although Ethernet-II does not specify any padding (in contrast to

IEEE 802.3), Ethernet expects at least 46 bytes of data. While in IEEE 802.3 padding bytes are inserted to ensure at least a
64-byte frame.

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

19 / 27

LAN Protocol Architechure

MAC
Frame

LLC
PDU

MAC
Control

Destination
MAC Address

Frame Formats - IEEE 802.3 and Ethernet-II

Source
MAC Address

LLC PDU

1 octet

1 or 2

variable

DSAP

SSAP

LLC Control

Information

I/G

DSAP value

C/R

SSAP value

CRC

LLC
Address Fields

I/G = Individual/Group
C/R = Command/Response

LLC PDU in a Generic MAC Frame Format

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

20 / 27

LAN Protocol Architechure

Token based MAC

Token based MAC

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

21 / 27

LAN Protocol Architechure

LAN Devices

Bridges and Switches

LAN A
Frames with
addresses 11 through
20 are accepted and
repeated on LAN B

Bridge

Station 1

Station 2

Station 10

Frames with
addresses 1 through
10 are accepted and
repeated on LAN A

LAN B


Station 11

Station 12

Station 20

Bridge Operation
Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

22 / 27

LAN Protocol Architechure

LAN Devices

(Cont.)

User
LLC
MAC
Physical

t1

t8

t2
t3

t7

LAN

t4

MAC
Physical

Physical

t5

LAN

t6

User
LLC
MAC
Physical

(a) Architecture

t1, t8

User Data

t2, t7

LLC-H

User Data

t3, t4, t5, t6

MAC-H LLC-H

User Data

MAC-T

(b) Operation

Connection of

Dr. Ramana ( I.I.T Rajasthan )

Two LANs by a Bridge

Local Area Networks

23 / 27

LAN Protocol Architechure

Spanning Tree Algorithm

Dealing with Loops - Spanning Tree Algorithm


Station 1

Station 2

Station 3

LAN A

Bridge
101

Bridge
107

LAN B

Bridge
102

LAN C

Bridge
103
LAN D

Bridge
104
LAN E

Station 4

Bridge
105
LAN F

Station 5

Station 6

Bridge
106
LAN G

Station 7

Configuration of Bridges and LANs,


with Alternate Routes

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

24 / 27

LAN Protocol Architechure

Spanning Tree Algorithm

Impact of Loops

Station B

LAN Y
t2

t1
Bridge
a
LAN X

Bridge
b
t0

t0

Station A
Loop of Bridges
Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

25 / 27

LAN Protocol Architechure

Shared vs Switched Ethernets

HUB

HHUB
Two cables
(twisted pair or
optical fiber)

IHUB

IHUB

Station

Transmit

Receive

Station

Station

Station

Station

Two-Level Star Topology


Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

26 / 27

LAN Protocol Architechure

Shared vs Switched Ethernets

Hubs vs Switches

10 Mbps

10 Mbps

10 Mbps

10 Mbps

Shared Bus - 10 Mbps

(a) Shared medium bus

Total capacity
up to 10 Mbps

10 Mbps

10 Mbps
10 Mbps

10 Mbps

(b) Shared medium hub

Total capacity
N 10 Mbps

10 Mbps

10 Mbps
10 Mbps

10 Mbps

(c) Layer 2 switch

LAN Hubs and Switches

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

27 / 27

Potrebbero piacerti anche