17
1 EEC-682/782 Computer Networks I Lecture 10 Wenbing Zhao [email protected] http://academic.csuohio.edu/zhao_w/teaching/eec682.htm (Lecture nodes are based on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall) Spring Semester 2005 EEC-682: Computer Networks I - Wenbing Zhao 2 Outline The Medium Access Control Sublayer Bluetooth Data link layer switching Reminder: Midterm #1, March 1 Tuesday Chapters 1-4 Closed book, closed notes Feedback Anonymous email account username: [email protected] password: anyone Spring Semester 2005 EEC-682: Computer Networks I - Wenbing Zhao 3 Bluetooth Bluetooth Architecture Bluetooth Applications The Bluetooth Protocol Stack The Bluetooth Frame Structure Spring Semester 2005 EEC-682: Computer Networks I - Wenbing Zhao 4 Bluetooth Bluetooth: a wireless standard for interconnecting computing and communication devices and accessories using short-range, low-power, inexpensive wireless radios Bluetooth SIG: formed by Ericsson, IBM, Intel, Nokia and Toshiba Named after Harald Blaatand (Bluetooth) II (940-981) A Viking king who unified Denmark and Norway, also without cables Bluetooth SIG issued a 1500-page spec v1.0, in 1999 IEEE 802.15 standardizes only the physical and data link layers As a personal area network (PAN) standard

EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

1

EEC-682/782Computer Networks I

Lecture 10

Wenbing [email protected]

http://academic.csuohio.edu/zhao_w/teaching/eec682.htm(Lecture nodes are based on materials supplied by

Dr. Louise Moser at UCSB and Prentice-Hall)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 2

Outline

The Medium Access Control SublayerBluetoothData link layer switching

Reminder: Midterm #1, March 1 TuesdayChapters 1-4Closed book, closed notes

FeedbackAnonymous email account

username: [email protected]: anyone

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 3

Bluetooth

Bluetooth ArchitectureBluetooth ApplicationsThe Bluetooth Protocol StackThe Bluetooth Frame Structure

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 4

Bluetooth

Bluetooth: a wireless standard for interconnecting computing and communication devices and accessories using short-range, low-power, inexpensive wireless radios

Bluetooth SIG: formed by Ericsson, IBM, Intel, Nokia and ToshibaNamed after Harald Blaatand (Bluetooth) II (940-981)

A Viking king who unified Denmark and Norway, also without cablesBluetooth SIG issued a 1500-page spec v1.0, in 1999IEEE 802.15 standardizes only the physical and data link layers

As a personal area network (PAN) standard

Page 2: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

2

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 5

Bluetooth ArchitecturePiconet – basic unit of a Bluetooth system

Consists of a master node and up to seven active slave nodes within a distance of 10 meters, and up to 255 parked nodesMaster node controls the clock and determines which device gets to communicate in which time slot, using TDMSlave nodes are fairly dumb, just doing whatever the master tells them to doParked nodes – devices that the master has switched to a low-power state, they respond only to an activation or beacon signal from the masterAll communication is between the master and a slave; direct slave-slave communication is not possible

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 6

Bluetooth Architecture

Scatternet – an interconnected collection of piconetsConnected via a bridge node

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 7

Bluetooth ApplicationsThe Bluetooth profiles.

Genericservices

networking

telephony

Exchangingobjects

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 8

The Bluetooth Protocol Stack

The 802.15 version of the Bluetooth protocol architecture.

Page 3: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

3

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 9

The Bluetooth Protocol Stack

Physical radio layer – deals with radio transmission and modulation

Low-power system with a range of 10 meters operating in the 2.4 GHz bandThe band is divided into 79 channels of 1MHz eachModulation is frequency shift keying, with 1 bit per Hz => gross data rate of 1 MbpsFrequency hopping spread spectrum, with 1600 hops/sec and dwell time of 625 μsecAll nodes in a piconet hop simultaneously, with master dictating the hop sequence

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 10

The Bluetooth Protocol StackBaseband layer – deals with how the master controls time slots and how these slots are grouped into frames

Master node in each piconet defines a series of 625 μsec time slots. Master node uses the even slots, slave nodes use the odd slotsFrames can be 1, 3, or 5 slots longA settling time of 250-260 μsec per hop to allow radio circuits to become stable

For single-slot frame, 366 left => 126 access code & header, only 240 bits for dataFor five-slot frame, 2781 bits for data

Each frame is transmitted over a logical channel, called a linkACL (Asynchronous Connection-Less) link – used for packet-switched data, go through L2CAP layer, best effortSCO (Synchronous Connection Oriented) link, for real-time data, using forward error correction, each SCO link can transmit one 64,000 bps PCM audio channel

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 11

The Bluetooth Protocol Stack

L2CAP (Logical link control adaptation protocol) –shields upper layers from details of transmission, analogous to 802 LLC sublayer

Accepts packets of up to 64 KB from upper layers, breaks (reassembles) them into (from) framesHandles multiplexing and de-multiplexing of multiple packet sources, determine which upper-layer protocol to hand it toHandles quality of service requirements, both when links are established and during normal operation

Negotiates max payload size allowed

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 12

The Bluetooth Protocol StackLink manager – handles establishment of logical channels between devices

Including power management, authentication, and quality of serviceAudio and control protocols – deals with audio and control, apps can use them directly Middleware layer – a mix of different protocols

LLC inserted by IEEE for compatibility with other 802 networksRFcomm – emulates standard serial port found on PCs for connecting keyboard, mouse and modemTelephony – a real-time protocol used for the three speech-oriented profiles, also manages call setup and terminationService discovery – used to locate services within network

Application layer – each app has its own dedicated subset of the protocols

Page 4: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

4

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 13

The Bluetooth Frame Structure

A typical Bluetooth data frame.Access code – identifies master node54-bit header containing typical MAC sublayer fieldsData field, up to 2744 bits (five-slot frame)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 14

Data Link Layer Switching

Bridges from 802.x to 802.yLocal InternetworkingSpanning Tree BridgesRemote BridgesRepeaters, Hubs, Bridges, Switches, Routers, GatewaysVirtual LANs

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 15

Data Link Layer Switching

Bridge – device that connects LANs togetherCommon situations in which bridges are used

Connects LANs that belong to different departmentsMultiple LANs came into existence due to autonomy of their owners

Connects LANs that geographically apartConnects LANs that were split to accommodate the load

Load might be local to a LANConnects LANs that were split for better reliability

To cope with a faulty NIC that broadcasts frames like crazyConnects LANs that were split for better security

Most NICs are capable of running promiscuous modeIsolate parts of the network so that its traffic cannot escape and fall into the wrong hands

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 16

Data Link Layer SwitchingMultiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN

Page 5: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

5

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 17

Bridges from 802.x to 802.y

Operation of a LAN bridge from 802.11 to 802.3.

Bridges from 802.x to 802.y Frame translation is not trivial

Reformatting necessary => takes CPU time, new CRC, may introduce undetected errors due to bad bits in bridge’s memoryLANs may have different data ratesLANs have different max frame sizeSecurity – some LAN uses encryption, some notQuality of service – some does, some does not

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 19

Local Internetworking

A configuration with four LANs and two bridges.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 20

Routing ProcedureUp on receiving a frame

If destination and source LANs are the same, discard the frameIf the destination and source LANs are different, forward the frameIf the destination LAN is unknown, use flooding

Flooding algorithmEvery incoming frame for an unknown destination is output on allthe LANs to which the bridge is connected except the one it arrived onAs time goes on, the bridges learn where destinations are

Backward Learning AlgorithmA bridge learns which machine is accessible on which LAN by looking at the source address of a frameIt makes an entry in its has table

Page 6: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

6

Spanning Tree BridgesTwo parallel transparent bridges

Used to increase reliability, But introduce problem – creates loops in the topologySolution – bridges communicate with each other and overlay the actual topology with a spanning tree that reaches every LAN. Some potential connections between LANs are ignored

Spanning Tree Bridges

Interconnected LANsA spanning tree covering the LANs. The dotted lines are not part of the spanning tree

How to build a spanning treeChoose one bridge as rootA tree of shortest paths from the root to every bridge and LAN is constructed => spanning treeIf a bridge of LAN fails, a new one is computed

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 23

Remote BridgesRemote bridges can be used to interconnect distant LANs. Various protocols can be used on the point-to-point lines

PPP, putting complete MAC frames in the payload fieldStrip off the MAC header and trailer, ship the rest as payload, then add a new MAC header & trailer at destination bridge

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 24

Repeaters, Hubs, Bridges, Switches, Routers and Gateways

(a) Which device is in which layer.(b) Frames, packets, and headers.

Page 7: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

7

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 25

(a) A hub. (b) A bridge. (c) a switch.

Repeaters, Hubs, Bridges, Switches, Routers and Gateways

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 26

Virtual LANsA building with centralized wiring using hubs and a switch

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 27

Virtual LANs

VLAN (Virtual LAN) - Rewire entirely in software for more flexibility

Based on specially-designed VLAN-aware switchesNetwork administrator decides

how many VLANs there will be, which computers will be on which VLAN, and what the VLANs will be called

Often VLANs are named by colorsHow a switch/bridge knows what color an incoming frame is?

Every port is assigned a VLAN colorEvery MAC address is assigned a VLAN colorEvery layer 3 protocol or IP address is assigned a VLAN color

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 28

Virtual LANs

Page 8: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

8

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 29

The IEEE 802.1Q Standard

Let the MAC frame itself carry the VLAN infoThe 802.3 (legacy) and 802.1Q Ethernet frame formats.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 30

The IEEE 802.1Q StandardTransition from legacy Ethernet to VLAN-aware Ethernet

New frame format is used at the first VLAN-aware switch, the VLAN field is stripped off before deliver to a legacy NIC

Channel Allocation Methods and Systems for A Common Channel

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 32

Chapter 1 - Introduction

Uses of computer networksNetwork HardwareNetwork softwareReference modelsExample networksNetwork standardization

Page 9: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

9

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 33

Network HardwareNo generally accepted taxonomy. Two dimensions

Transmission technologyScale

Transmission technologyBroadcast linksPoint-to-point links (unicasting)

ScalePersonal area networksLocal area networksMetropolitan area networksWide area networksThe Internet

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 34

Wide Area Networks

Spans a large geographical area, often a country or continentNetwork structure in WAN

Host or end systemCollection of machines that run user (application) programs

Communication Subnet – connects hostsTwo distinct components

Transmission lines – move bits (circuits, channels, trunks)Routers or switching elements that connect two or more transmission lines

Two types of designsPoint-to-point channelsBroadcast channels

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 35

Network SoftwareProtocol hierarchies / Network architecturesDesign issues for the layersConnection-oriented and connectionless servicesThe relationship of services to protocols

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 36

Protocol HierarchiesProtocol hierarchies are organized into layers or levels with different protocols at each layerEach layer offers certain services to higher layers, hiding the details of implementation of those servicesLayer n on one machine communicates with layer n on another machineInterface between adjacent layers defines operations and services offered by lower layer to upper layer

Page 10: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

10

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 37

Network Architectures

Network Architecture - A set of layers and protocolsMust contain enough information for implementationDoes not contain details of the implementation and specification of the interfacesIt is not even necessary that the interfaces on all machines in a network be the same

Protocol Stack - A list of protocols used by a certain system, one protocol per layerThe subjects of network architectures, protocols stacks, and the protocols themselves are the principal topics of this course

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 38

Design Issues for the Layers

Each layer needsMechanisms for connection management and addressingRules for data transferError controlFlow controlFinite buffersRouting

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 39

Connection-Oriented and Connectionless ServicesConnection-oriented service

Modeled after telephone system – establish connection before communicationSome service allow a negotiation among sender, receiver and subnet regarding the parameters to be used, such as max message size, etc.

Connectionless serviceModeled after postal system – a message carries full destination address, and each one is routed through the system independent of all the others

Ordering of messages are not guaranteedQuality of Service

Reliable service – it does not lose dataImplemented by having the receiver acknowledge the receipt of each messageThe acknowledgement process introduces overhead and delays

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 40

The OSI Reference Model

Page 11: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

11

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 41

TCP/IP Reference ModelTCP – Transmission Control ProtocolIP – Internet ProtocolUsed in Internet and its predecessor ARPANET

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 42

Comparing OSI and TCP/IP ModelsConcepts central to the OSI model

Services – what layer doesProtocols – how layer does itInterfaces – tells upper layer how to access services of lower layer

OSI model was devised before the corresponding protocols were invented

Good - Not biased toward one particular set of protocolsBad – designers did not have much experience with subject

MAC layer was grafted into data link layerTCP/IP model came after the protocols

Model simply a description of the existing protocolsNot good to describe protocols other than TCP/IP

Connectionless vs. connection-oriented communicationOSI model supports both in the network layer, but only connection-oriented comm. In transport layerTCP/IP model supports only connectionless comm. In the network layer, but support both in the transport layer, where it counts

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 43

Chapter 2 – Physical Layer

Theoretical basis for data communicationGuided transmission mediaWireless transmissionCommunication satellitesPublic switched telephone networkMobile telephone systemCable television

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 44

Fourier Analysis

Info is transmitted by varying voltage or currentLet f(t) be value of voltage or current at time t, any well-behaved periodic function g(t) with period T can be represented as Fourier series

where f=1/T, the fundamental frequency, an and bn are sine and cosine amplitudes of nth harmonics (terms)The amplitudes and constant are given by

Page 12: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

12

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 45

Bandwidth-Limited SignalsA binary signal and its root-mean-square Fourier amplitudes.(b) – (c) Successive approximations to the original signal.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 46

Maximum Data Rates of a Channel

Theorem (Nyquist 1924) for noiseless channelsIf an arbitrary signal is run through a low-pass filter of bandwidth H, then the filtered signal can be completely reconstructed by making on 2H samples per secondMax data rate = 2H log2V bits/sec, where signal consists of V discrete linesEx: H = 3000 Hz, V = 2 (binary)max data rate = 2*3000*log22 = 6000 bits/secEx: H = 3000 Hz, V = 64max data rate = 2*3000*log264 = 36,000 bits/sec

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 47

Maximum Data Rates of a Channel

Theorem (Shannon 1948) noisy channelsAmount of thermal noise = signal to noise ratio = signal power / noise power = S/N

Decibel (dB): 10 log10S/NMax data rate = H log2(1+S/N) bits/secEx: H = 3000 Hz, S/N = 30dB = 1000max data rate = 3000*log2(1+1000) = 30,000upper bound is hard to reach, 9600 bits/sec is good

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 48

Structure of the Telephone System

A typical circuit route for a medium-distance call.

Page 13: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

13

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 49

Modems

(a) A binary signal(b) Amplitude modulation(c) Frequency modulation(d) Phase modulation

Modem – device used between digital computer and analog telephone system. It converts digital bit stream into modulated analog signal and vice verseCodec – inverse of a modem. It is a device that converts a continuous analog signal into a digital bit streamBaud – number of samples per second. During each baud, one symbol is sent. One symbol can carry multiple bits

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 50

Modems

(a) QPSK: Quadrature Phase Shift Keying(b) QAM-16: Quadrature Amplitude Modulation(c) QAM-64.

Constellation Diagrams – legal combinations of amplitude and phase

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 51

Trunks and Multiplexing

Idea: multiplex many conversations over single physical channel with high bandwidthFDM – Frequency Division Multiplexing

Frequency spectrum divided into logical channelEach user has exclusive use of own frequency band

TDM – Time Division MultiplexingTime divided into slots each user has time slotUsers take turns in round robin fashion

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 52

Switching

Two types of switchingCircuit switching – physical path set up from source to destination before any data transmitted, e.g., phone system

Adv: no congestion problem, only delay is propagation timeDisadv: unused bandwidth on allocated circuit is wasted

Packet switching – store-and-forward, one hop at a time, uses pipelining, each packet has limited size

Adv: low overhead – no setup required, high utilizationDisadv: packets may be received out of order, packets may be lost due to buffer overflow

Page 14: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

14

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 53

CDMA – Code Division Multiple Access

Each station transmits over entire frequency spectrum all the timeEach station is assigned a unique m-bit code, called a chip sequence

To transmit a 1, it sends its chip sequenceTo transmit a 0, it sends the one’s complement of its chip sequenceAssumes multiple signals add linearly – colliding frames are not garbled!Chip sequences for different stations are orthogonal

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 54

CDMA – Code Division Multiple Access

Let S be m-chip vector for station SAll chip sequences are orthogonal

Normalized inner product of any two distinct chip seq, S and T, is 0, i.e., S*T=0

S*S = 1

(a) Binary chip sequences for four stations (b) Bipolar chip sequences (+1 for 1, and -1 for 0)(c) Six examples of transmissions(d) Recovery of station C’s signal

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 55

Chapter 3 – Data Link Layer

Data Link Layer Design IssuesError Detection and CorrectionElementary Data Link ProtocolsSliding Window ProtocolsProtocol verificationExample data link layer protocols

HDLC (High-level Data Link Control)PPP (Point-to-Point Protocol)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 56

Data Link Layer Design IssuesServices Provided to the Network Layer

Point-to-point, source-to-destination, “wirelike”

FramingPhysical bit stream divided up into frames

Error ControlAcks and nacks, retransmission, sequence numberHamming code and Cyclic redundancy code

Flow ControlSender may transmit frames faster than receiver can receive themThrottle sender so sends no faster than receiver can receive them

Page 15: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

15

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 57

Framing

How does DL layer form frames?Insert time gapes between frames

Too risky, no timing guarantees, not usedCharacter countFlag bytes with byte stuffingStarting and ending flags, with bit stuffingPhysical layer coding violations

Applies only if encoding on medium contain some redundancyExample: encode 1 bit with 2 bits

1 => 100 => 01Can use 00 or 11 to delimit frames

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 58

Error-Correcting CodesN-bit codeword – an n-bit unit containing data and check bits (m bits of data, r bits redundant/check bits)Given any two codewords, it is possible to determine how many corresponding bits differ, using exclusive OR and counting number of 1 bits in the resultHamming distance – number of bit positions in which two codewords differ

If two codewords are a Hamming distance d apart, it will require d single-bit errors to convert one into the other

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 59

Error-Correcting Codes

In general, all 2m possible data messages are legal, but not all 2n

possible codewords are usedGiven the algorithm for computing the check bits, it is possibleto

Construct a complete list of legal codewordsFind two codewords whose Hamming distance is minimumThis distance is the Hamming distance of the complete code

To detect d errors, need a distance d+1 codeNo way that d single-bit errors can change a valid codeword into another valid codeword

To correct d errors, need a distance 2d+1 codeLegal codewords are so far part that even with d changes, orginalcodeword is still closer than any other codeword, so it can be uniquely determined

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 60

Hamming CodeThe bits of codeword are numbered consecutively, starting with bit 1 at the left end, bit 2 to its immediate right and so onThe bits that are powers of 2 (1,2,4,8,16,etc) are check bits

The rest are filled up with the m data bitsEach parity bit calculates the parity for some of the bits in the code word. The position of the parity bit determines the sequence of bits that it alternately checks and skips.

Position 1: check 1 bit, skip 1 bit, check 1 bit, skip 1 bit, etc. (1,3,5,7,9,11,13,15,...)Position 2: check 2 bits, skip 2 bits, check 2 bits, skip 2 bits, etc. (2,3,6,7,10,11,14,15,...)Position 4: check 4 bits, skip 4 bits, check 4 bits, skip 4 bits, etc. (4,5,6,7,12,13,14,15,20,21,22,23,...)Position 8: check 8 bits, skip 8 bits, check 8 bits, skip 8 bits, etc. (8-15,24-31,40-47,...)etc.

Set a parity bit to 1 if the total number of ones in the positions it checks is odd. Set a parity bit to 0 if the total number of ones in the positions it checks is even (assuming even parity is used)

Page 16: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

16

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 61

Data Link Protocols

An Unrestricted Simplex ProtocolA Simplex Stop-and-Wait ProtocolA Simplex Protocol for a Noisy ChannelA One-Bit Sliding Window ProtocolA Protocol Using Go Back NA Protocol Using Selective Repeat

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 62

Finite State Machine Models

Each state is labeled by SRCS – frame the sender is trying to send: 0, 1R – frame the receiver expects: 0, 1C – state of the channel: 0, 1, A, - (empty)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 63

Petri Net Models – Example

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 64

Chapter 4 – Medium Access Control

The Channel allocation problemMultiple access protocolsIEEE 802 standardsData link layer switching

Page 17: EEC-682/782 Computer Networks I - Cleveland State University · 2005. 2. 25. · Virtual LANs Spring Semester 2005 EEC-682: Computer Networks I-Wenbnig Zhao 15 Data Link Layer Switching

17

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 65

Multiple Access Protocols

ALOHAPure Aloha and slotted Aloha

Carrier Sense Multiple Access Protocols1-persistant CSMA, p-persistant CSMA, non-persistant CSMACSMA/CD

Collision-Free ProtocolsBitmap protocol, binary countdown

Limited-Contention ProtocolsAdaptive tree walk protocol

Wavelength Division Multiple Access ProtocolsWireless LAN Protocols

MACA, MACAW

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 66

IEEE 802 Standards

IEEE 802 standards for LAN and MAN802.3 – Ethernet802.11 – Wireless LAN802.15 – Bluetooth802.16 – Wireless MAN802.2 – Logical link control sublayer

802.3 and 802.11 converge on 802.2